-/*\r
- * FreeRTOS+TCP V2.0.11\r
- * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
- * this software and associated documentation files (the "Software"), to deal in\r
- * the Software without restriction, including without limitation the rights to\r
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\r
- * the Software, and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be included in all\r
- * copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- *\r
- * http://aws.amazon.com/freertos\r
- * http://www.FreeRTOS.org\r
- */\r
-\r
/*\r
* Handling of Ethernet PHY's\r
* PHY's communicate with an EMAC either through\r
#endif\r
\r
/* A generic user-provided function that reads from the PHY-port at 'xAddress'( 0-based ). A 16-bit value shall be stored in\r
- '*pusValue'. xRegister is the register number ( 0 .. 31 ). In fact all PHY registers are 16-bit.\r
+ '*pulValue'. xRegister is the register number ( 0 .. 31 ). In fact all PHY registers are 16-bit.\r
Return non-zero in case the action failed. */\r
typedef BaseType_t ( *xApplicationPhyReadHook_t )( BaseType_t xAddress, BaseType_t xRegister, uint32_t *pulValue );\r
\r
-/* A generic user-provided function that writes 'usValue' to the\r
+/* A generic user-provided function that writes 'ulValue' to the\r
PHY-port at 'xAddress' ( 0-based ). xRegister is the register number ( 0 .. 31 ).\r
Return non-zero in case the action failed. */\r
typedef BaseType_t ( *xApplicationPhyWriteHook_t )( BaseType_t xAddress, BaseType_t xRegister, uint32_t ulValue );\r
/* Discover all PHY's connected by polling 32 indexes ( zero-based ) */\r
BaseType_t xPhyDiscover( EthernetPhy_t *pxPhyObject );\r
\r
-/* Send a reset commando to the connected PHY ports and send configuration. */\r
+/* Send a reset command to the connected PHY ports and send configuration. */\r
BaseType_t xPhyConfigure( EthernetPhy_t *pxPhyObject, const PhyProperties_t *pxPhyProperties );\r
\r
-/* Give a commando to start auto negotiation on a set of PHY port's. */\r
+/* Give a command to start auto negotiation on a set of PHY port's. */\r
BaseType_t xPhyStartAutoNegotiation( EthernetPhy_t *pxPhyObject, uint32_t ulPhyMask );\r
\r
/* Do not use auto negotiation but use predefined values from 'pxPhyObject->xPhyPreferences'. */\r
last call to this function. */\r
BaseType_t xPhyCheckLinkStatus( EthernetPhy_t *pxPhyObject, BaseType_t xHadReception );\r
\r
-static __inline uint32_t xPhyGetMask( EthernetPhy_t *pxPhyObject )\r
-{\r
- return ( ( ( uint32_t ) 1u ) << pxPhyObject-> xPortCount ) - 1;\r
-}\r
+/* Get the bitmask of a given 'EthernetPhy_t'. */\r
+#define xPhyGetMask( pxPhyObject ) \\r
+ ( ( ( ( uint32_t ) 1u ) << ( pxPhyObject )->xPortCount ) - 1u )\r
\r
#ifdef __cplusplus\r
} /* extern "C" */\r