![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
Modules | |
| CHIP: LPC17xx/40xx Ethernet driver build options | |
Typedefs | |
| typedef IP_ENET_002_TXDESC_T | ENET_TXDESC_T |
| typedef IP_ENET_002_TXSTAT_T | ENET_TXSTAT_T |
| typedef IP_ENET_002_RXDESC_T | ENET_RXDESC_T |
| typedef IP_ENET_002_RXSTAT_T | ENET_RXSTAT_T |
| typedef IP_ENET_002_BUFF_STATUS_T | ENET_BUFF_STATUS |
Functions | |
| STATIC INLINE void | Chip_ENET_Reset (LPC_ENET_T *pENET) |
| Resets the ethernet interface. | |
| STATIC INLINE void | Chip_ENET_SetADDR (LPC_ENET_T *pENET, const uint8_t *macAddr) |
| Sets the address of the interface. | |
| STATIC INLINE void | Chip_ENET_SetupMII (LPC_ENET_T *pENET, uint32_t div, uint8_t addr) |
| Sets up the PHY link clock divider and PHY address. | |
| STATIC INLINE void | Chip_ENET_StartMIIWrite (LPC_ENET_T *pENET, uint8_t reg, uint16_t data) |
| Starts a PHY write via the MII. | |
| STATIC INLINE void | Chip_ENET_StartMIIRead (LPC_ENET_T *pENET, uint8_t reg) |
| Starts a PHY read via the MII. | |
| STATIC INLINE bool | Chip_ENET_IsMIIBusy (LPC_ENET_T *pENET) |
| Returns MII link (PHY) busy status. | |
| STATIC INLINE uint16_t | Chip_ENET_ReadMIIData (LPC_ENET_T *pENET) |
| Returns the value read from the PHY. | |
| STATIC INLINE void | Chip_ENET_TXEnable (LPC_ENET_T *pENET) |
| Enables ethernet transmit. | |
| STATIC INLINE void | Chip_ENET_TXDisable (LPC_ENET_T *pENET) |
| Disables ethernet transmit. | |
| STATIC INLINE void | Chip_ENET_RXEnable (LPC_ENET_T *pENET) |
| Enables ethernet packet reception. | |
| STATIC INLINE void | Chip_ENET_RXDisable (LPC_ENET_T *pENET) |
| Disables ethernet packet reception. | |
| STATIC INLINE void | Chip_ENET_ResetTXLogic (LPC_ENET_T *pENET) |
| Reset Tx Logic. | |
| STATIC INLINE void | Chip_ENET_ResetRXLogic (LPC_ENET_T *pENET) |
| Reset Rx Logic. | |
| STATIC INLINE void | Chip_ENET_EnableRXFilter (LPC_ENET_T *pENET, uint32_t mask) |
| Enable Rx Filter. | |
| STATIC INLINE void | Chip_ENET_DisableRXFilter (LPC_ENET_T *pENET, uint32_t mask) |
| Disable Rx Filter. | |
| STATIC INLINE void | Chip_ENET_SetFullDuplex (LPC_ENET_T *pENET) |
| Sets full duplex operation for the interface. | |
| STATIC INLINE void | Chip_ENET_SetHalfDuplex (LPC_ENET_T *pENET) |
| Sets half duplex operation for the interface. | |
| STATIC INLINE void | Chip_ENET_Set100Mbps (LPC_ENET_T *pENET) |
| Selects 100Mbps for the current speed. | |
| STATIC INLINE void | Chip_ENET_Set10Mbps (LPC_ENET_T *pENET) |
| Selects 10Mbps for the current speed. | |
| STATIC INLINE void | Chip_ENET_InitTxDescriptors (LPC_ENET_T *pENET, ENET_TXDESC_T *pDescs, ENET_TXSTAT_T *pStatus, uint32_t descNum) |
| Configures the initial ethernet transmit descriptors. | |
| STATIC INLINE void | Chip_ENET_InitRxDescriptors (LPC_ENET_T *pENET, ENET_RXDESC_T *pDescs, ENET_RXSTAT_T *pStatus, uint32_t descNum) |
| Configures the initial ethernet receive descriptors. | |
| STATIC INLINE uint16_t | Chip_ENET_GetTXProduceIndex (LPC_ENET_T *pENET) |
| Get the current Tx Produce Descriptor Index. | |
| STATIC INLINE uint16_t | Chip_ENET_GetTXConsumeIndex (LPC_ENET_T *pENET) |
| Get the current Tx Consume Descriptor Index. | |
| STATIC INLINE uint16_t | Chip_ENET_GetRXProduceIndex (LPC_ENET_T *pENET) |
| Get the current Rx Produce Descriptor Index. | |
| STATIC INLINE uint16_t | Chip_ENET_GetRXConsumeIndex (LPC_ENET_T *pENET) |
| Get the current Rx Consume Descriptor Index. | |
| STATIC INLINE ENET_BUFF_STATUS | Chip_ENET_GetBufferStatus (LPC_ENET_T *pENET, uint16_t produceIndex, uint16_t consumeIndex, uint16_t buffSize) |
| Get the buffer status with the current Produce Index and Consume Index. | |
| STATIC INLINE uint32_t | Chip_ENET_GetFillDescNum (LPC_ENET_T *pENET, uint16_t produceIndex, uint16_t consumeIndex, uint16_t buffSize) |
| Get the number of descriptors filled. | |
| STATIC INLINE uint32_t | Chip_ENET_GetFreeDescNum (LPC_ENET_T *pENET, uint16_t produceIndex, uint16_t consumeIndex, uint16_t buffSize) |
| Get the number of free descriptors. | |
| STATIC INLINE bool | Chip_ENET_IsTxFull (LPC_ENET_T *pENET) |
| Check if Tx buffer is full. | |
| STATIC INLINE bool | Chip_ENET_IsRxEmpty (LPC_ENET_T *pENET) |
| Check if Rx buffer is empty. | |
| STATIC INLINE uint16_t | Chip_ENET_IncTXProduceIndex (LPC_ENET_T *pENET) |
| Increase the current Tx Produce Descriptor Index. | |
| STATIC INLINE uint16_t | Chip_ENET_IncRXConsumeIndex (LPC_ENET_T *pENET) |
| Increase the current Rx Consume Descriptor Index. | |
| STATIC INLINE void | Chip_ENET_EnableInt (LPC_ENET_T *pENET, uint32_t mask) |
| Enable ENET interrupts. | |
| STATIC INLINE void | Chip_ENET_DisableInt (LPC_ENET_T *pENET, uint32_t mask) |
| Disable ENET interrupts. | |
| STATIC INLINE uint32_t | Chip_ENET_GetIntStatus (LPC_ENET_T *pENET) |
| Get the interrupt status. | |
| STATIC INLINE void | Chip_ENET_ClearIntStatus (LPC_ENET_T *pENET, uint32_t mask) |
| Clear the interrupt status. | |
| void | Chip_ENET_Init (LPC_ENET_T *pENET) |
| Initialize ethernet interface. | |
| void | Chip_ENET_DeInit (LPC_ENET_T *pENET) |
| De-initialize the ethernet interface. | |
| uint32_t | Chip_ENET_FindMIIDiv (LPC_ENET_T *pENET, uint32_t clockRate) |
| Find the divider index for a desired MII clock rate. | |
Definition at line 64 of file enet_17xx_40xx.h.
| typedef IP_ENET_002_RXDESC_T ENET_RXDESC_T |
Definition at line 62 of file enet_17xx_40xx.h.
| typedef IP_ENET_002_RXSTAT_T ENET_RXSTAT_T |
Definition at line 63 of file enet_17xx_40xx.h.
| typedef IP_ENET_002_TXDESC_T ENET_TXDESC_T |
Definition at line 60 of file enet_17xx_40xx.h.
| typedef IP_ENET_002_TXSTAT_T ENET_TXSTAT_T |
Definition at line 61 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_ClearIntStatus | ( | LPC_ENET_T * | pENET, |
| uint32_t | mask | ||
| ) |
Clear the interrupt status.
| pENET | : The base of ENET peripheral on the chip |
| mask | : Interrupt mask (Or-ed bit values of ENET_INT_*) |
Definition at line 463 of file enet_17xx_40xx.h.
| void Chip_ENET_DeInit | ( | LPC_ENET_T * | pENET | ) |
De-initialize the ethernet interface.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 93 of file enet_17xx_40xx.c.
| STATIC INLINE void Chip_ENET_DisableInt | ( | LPC_ENET_T * | pENET, |
| uint32_t | mask | ||
| ) |
Disable ENET interrupts.
| pENET | : The base of ENET peripheral on the chip |
| mask | : Interrupt mask (Or-ed bit values of ENET_INT_*) |
Definition at line 442 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_DisableRXFilter | ( | LPC_ENET_T * | pENET, |
| uint32_t | mask | ||
| ) |
Disable Rx Filter.
| pENET | : The base of ENET peripheral on the chip |
| mask | : Filter mask (Or-ed bit values of ENET_RXFILTERCTRL_*) |
Definition at line 229 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_EnableInt | ( | LPC_ENET_T * | pENET, |
| uint32_t | mask | ||
| ) |
Enable ENET interrupts.
| pENET | : The base of ENET peripheral on the chip |
| mask | : Interrupt mask (Or-ed bit values of ENET_INT_*) |
Definition at line 431 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_EnableRXFilter | ( | LPC_ENET_T * | pENET, |
| uint32_t | mask | ||
| ) |
Enable Rx Filter.
| pENET | : The base of ENET peripheral on the chip |
| mask | : Filter mask (Or-ed bit values of ENET_RXFILTERCTRL_*) |
Definition at line 218 of file enet_17xx_40xx.h.
| uint32_t Chip_ENET_FindMIIDiv | ( | LPC_ENET_T * | pENET, |
| uint32_t | clockRate | ||
| ) |
Find the divider index for a desired MII clock rate.
| pENET | : The base of ENET peripheral on the chip |
| clockRate | : Clock rate to get divider index for |
Definition at line 73 of file enet_17xx_40xx.c.
| STATIC INLINE ENET_BUFF_STATUS Chip_ENET_GetBufferStatus | ( | LPC_ENET_T * | pENET, |
| uint16_t | produceIndex, | ||
| uint16_t | consumeIndex, | ||
| uint16_t | buffSize | ||
| ) |
Get the buffer status with the current Produce Index and Consume Index.
| pENET | : The base of ENET peripheral on the chip |
| produceIndex | : Produce Index |
| consumeIndex | : Consume Index |
| buffSize | : Buffer size |
Definition at line 352 of file enet_17xx_40xx.h.
| STATIC INLINE uint32_t Chip_ENET_GetFillDescNum | ( | LPC_ENET_T * | pENET, |
| uint16_t | produceIndex, | ||
| uint16_t | consumeIndex, | ||
| uint16_t | buffSize | ||
| ) |
Get the number of descriptors filled.
| pENET | : The base of ENET peripheral on the chip |
| produceIndex | : Produce Index |
| consumeIndex | : Consume Index |
| buffSize | : Buffer size |
Definition at line 367 of file enet_17xx_40xx.h.
| STATIC INLINE uint32_t Chip_ENET_GetFreeDescNum | ( | LPC_ENET_T * | pENET, |
| uint16_t | produceIndex, | ||
| uint16_t | consumeIndex, | ||
| uint16_t | buffSize | ||
| ) |
Get the number of free descriptors.
| pENET | : The base of ENET peripheral on the chip |
| produceIndex | : Produce Index |
| consumeIndex | : Consume Index |
| buffSize | : Buffer size |
Definition at line 380 of file enet_17xx_40xx.h.
| STATIC INLINE uint32_t Chip_ENET_GetIntStatus | ( | LPC_ENET_T * | pENET | ) |
Get the interrupt status.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 452 of file enet_17xx_40xx.h.
| STATIC INLINE uint16_t Chip_ENET_GetRXConsumeIndex | ( | LPC_ENET_T * | pENET | ) |
Get the current Rx Consume Descriptor Index.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 339 of file enet_17xx_40xx.h.
| STATIC INLINE uint16_t Chip_ENET_GetRXProduceIndex | ( | LPC_ENET_T * | pENET | ) |
Get the current Rx Produce Descriptor Index.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 329 of file enet_17xx_40xx.h.
| STATIC INLINE uint16_t Chip_ENET_GetTXConsumeIndex | ( | LPC_ENET_T * | pENET | ) |
Get the current Tx Consume Descriptor Index.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 319 of file enet_17xx_40xx.h.
| STATIC INLINE uint16_t Chip_ENET_GetTXProduceIndex | ( | LPC_ENET_T * | pENET | ) |
Get the current Tx Produce Descriptor Index.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 309 of file enet_17xx_40xx.h.
| STATIC INLINE uint16_t Chip_ENET_IncRXConsumeIndex | ( | LPC_ENET_T * | pENET | ) |
Increase the current Rx Consume Descriptor Index.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 420 of file enet_17xx_40xx.h.
| STATIC INLINE uint16_t Chip_ENET_IncTXProduceIndex | ( | LPC_ENET_T * | pENET | ) |
Increase the current Tx Produce Descriptor Index.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 410 of file enet_17xx_40xx.h.
| void Chip_ENET_Init | ( | LPC_ENET_T * | pENET | ) |
Initialize ethernet interface.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 55 of file enet_17xx_40xx.c.
| STATIC INLINE void Chip_ENET_InitRxDescriptors | ( | LPC_ENET_T * | pENET, |
| ENET_RXDESC_T * | pDescs, | ||
| ENET_RXSTAT_T * | pStatus, | ||
| uint32_t | descNum | ||
| ) |
Configures the initial ethernet receive descriptors.
| pENET | : The base of ENET peripheral on the chip |
| pDescs | : Pointer to TX descriptor list |
| pStatus | : Pointer to TX status list |
| descNum | : the number of desciptors |
Definition at line 297 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_InitTxDescriptors | ( | LPC_ENET_T * | pENET, |
| ENET_TXDESC_T * | pDescs, | ||
| ENET_TXSTAT_T * | pStatus, | ||
| uint32_t | descNum | ||
| ) |
Configures the initial ethernet transmit descriptors.
| pENET | : The base of ENET peripheral on the chip |
| pDescs | : Pointer to TX descriptor list |
| pStatus | : Pointer to TX status list |
| descNum | : the number of desciptors |
Definition at line 282 of file enet_17xx_40xx.h.
| STATIC INLINE bool Chip_ENET_IsMIIBusy | ( | LPC_ENET_T * | pENET | ) |
Returns MII link (PHY) busy status.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 137 of file enet_17xx_40xx.h.
| STATIC INLINE bool Chip_ENET_IsRxEmpty | ( | LPC_ENET_T * | pENET | ) |
Check if Rx buffer is empty.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 400 of file enet_17xx_40xx.h.
| STATIC INLINE bool Chip_ENET_IsTxFull | ( | LPC_ENET_T * | pENET | ) |
Check if Tx buffer is full.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 390 of file enet_17xx_40xx.h.
| STATIC INLINE uint16_t Chip_ENET_ReadMIIData | ( | LPC_ENET_T * | pENET | ) |
Returns the value read from the PHY.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 147 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_Reset | ( | LPC_ENET_T * | pENET | ) |
Resets the ethernet interface.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 73 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_ResetRXLogic | ( | LPC_ENET_T * | pENET | ) |
Reset Rx Logic.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 207 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_ResetTXLogic | ( | LPC_ENET_T * | pENET | ) |
Reset Tx Logic.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 197 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_RXDisable | ( | LPC_ENET_T * | pENET | ) |
Disables ethernet packet reception.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 187 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_RXEnable | ( | LPC_ENET_T * | pENET | ) |
Enables ethernet packet reception.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 177 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_Set100Mbps | ( | LPC_ENET_T * | pENET | ) |
Selects 100Mbps for the current speed.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 259 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_Set10Mbps | ( | LPC_ENET_T * | pENET | ) |
Selects 10Mbps for the current speed.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 269 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_SetADDR | ( | LPC_ENET_T * | pENET, |
| const uint8_t * | macAddr | ||
| ) |
Sets the address of the interface.
| pENET | : The base of ENET peripheral on the chip |
| macAddr | : Pointer to the 6 bytes used for the MAC address |
Definition at line 84 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_SetFullDuplex | ( | LPC_ENET_T * | pENET | ) |
Sets full duplex operation for the interface.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 239 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_SetHalfDuplex | ( | LPC_ENET_T * | pENET | ) |
Sets half duplex operation for the interface.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 249 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_SetupMII | ( | LPC_ENET_T * | pENET, |
| uint32_t | div, | ||
| uint8_t | addr | ||
| ) |
Sets up the PHY link clock divider and PHY address.
| pENET | : The base of ENET peripheral on the chip |
| div | : Divider index, not a divider value, see user manual |
| addr | : PHY address, used with MII read and write |
Definition at line 99 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_StartMIIRead | ( | LPC_ENET_T * | pENET, |
| uint8_t | reg | ||
| ) |
Starts a PHY read via the MII.
| pENET | : The base of ENET peripheral on the chip |
| reg | : PHY register to read |
Definition at line 127 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_StartMIIWrite | ( | LPC_ENET_T * | pENET, |
| uint8_t | reg, | ||
| uint16_t | data | ||
| ) |
Starts a PHY write via the MII.
| pENET | : The base of ENET peripheral on the chip |
| reg | : PHY register to write |
| data | : Data to write to PHY register |
Definition at line 113 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_TXDisable | ( | LPC_ENET_T * | pENET | ) |
Disables ethernet transmit.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 167 of file enet_17xx_40xx.h.
| STATIC INLINE void Chip_ENET_TXEnable | ( | LPC_ENET_T * | pENET | ) |
Enables ethernet transmit.
| pENET | : The base of ENET peripheral on the chip |
Definition at line 157 of file enet_17xx_40xx.h.