LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CHIP: LPC18xx/43xx Ethernet driver

Modules

 CHIP: LPC18xx/43xx Ethernet driver build options
 

Functions

void Chip_ENET_Init (void)
 Initialize ethernet interface.
 
void Chip_ENET_DeInit (void)
 De-initialize the ethernet interface.
 
STATIC INLINE void Chip_ENET_Reset (void)
 Resets the ethernet interface.
 
STATIC INLINE void Chip_ENET_SetADDR (const uint8_t *macAddr)
 Sets the address of the interface.
 
STATIC INLINE void Chip_ENET_Setup_MII (uint32_t div, uint8_t addr)
 Sets up the PHY link clock divider and PHY address.
 
STATIC INLINE void Chip_ENET_Start_MII_Write (uint8_t reg, uint16_t data)
 Starts a PHY write via the MII.
 
STATIC INLINE void Chip_ENET_Start_MII_Read (uint8_t reg)
 Starts a PHY read via the MII.
 
STATIC INLINE bool Chip_ENET_Is_MII_Busy (void)
 Returns MII link (PHY) busy status.
 
STATIC INLINE uint16_t Chip_ENET_Read_MII_Data (void)
 Returns the value read from the PHY.
 
STATIC INLINE void Chip_ENET_TX_Enable (bool Enable)
 Enables or disables ethernet transmit.
 
STATIC INLINE void Chip_ENET_RX_Enable (bool Enable)
 Enables or disables ethernet packet reception.
 
STATIC INLINE void Chip_ENET_Set_Duplex (bool full)
 Sets full or half duplex for the interface.
 
STATIC INLINE void Chip_ENET_Set_Speed (bool speed100)
 Sets speed for the interface.
 
STATIC INLINE void Chip_ENET_InitDescriptors (IP_ENET_001_ENHTXDESC_Type *pTXDescs, IP_ENET_001_ENHRXDESC_Type *pRXDescs)
 Configures the initial ethernet descriptors.
 
STATIC INLINE void Chip_ENET_RXStart (void)
 Starts receive polling of RX descriptors.
 
STATIC INLINE void Chip_ENET_TXStart (void)
 Starts transmit polling of TX descriptors.
 

Detailed Description

Function Documentation

void Chip_ENET_DeInit ( void  )

De-initialize the ethernet interface.

Returns
Nothing

Definition at line 78 of file enet_18xx_43xx.c.

void Chip_ENET_Init ( void  )

Initialize ethernet interface.

Returns
Nothing Performs basic initialization of the ethernet interface in a default state. This is enough to place the interface in a usable state, but may require more setup outside this function.

Definition at line 51 of file enet_18xx_43xx.c.

STATIC INLINE void Chip_ENET_InitDescriptors ( IP_ENET_001_ENHTXDESC_Type pTXDescs,
IP_ENET_001_ENHRXDESC_Type pRXDescs 
)

Configures the initial ethernet descriptors.

Parameters
pTXDescs: Pointer to TX descriptor list
pRXDescs: Pointer to RX descriptor list
Returns
Nothing

Definition at line 198 of file enet_18xx_43xx.h.

STATIC INLINE bool Chip_ENET_Is_MII_Busy ( void  )

Returns MII link (PHY) busy status.

Returns
Returns true if busy, otherwise false

Definition at line 138 of file enet_18xx_43xx.h.

STATIC INLINE uint16_t Chip_ENET_Read_MII_Data ( void  )

Returns the value read from the PHY.

Returns
Read value from PHY

Definition at line 147 of file enet_18xx_43xx.h.

STATIC INLINE void Chip_ENET_Reset ( void  )

Resets the ethernet interface.

Returns
Nothing Resets the ethernet interface. This should be called prior to Chip_ENET_Init with a small delay after this call.

Definition at line 82 of file enet_18xx_43xx.h.

STATIC INLINE void Chip_ENET_RX_Enable ( bool  Enable)

Enables or disables ethernet packet reception.

Parameters
Enable: true to enable receive, false to disable
Returns
Nothing

Definition at line 167 of file enet_18xx_43xx.h.

STATIC INLINE void Chip_ENET_RXStart ( void  )

Starts receive polling of RX descriptors.

Returns
Nothing

Definition at line 208 of file enet_18xx_43xx.h.

STATIC INLINE void Chip_ENET_Set_Duplex ( bool  full)

Sets full or half duplex for the interface.

Parameters
full: true to selected full duplex, false for half
Returns
Nothing

Definition at line 177 of file enet_18xx_43xx.h.

STATIC INLINE void Chip_ENET_Set_Speed ( bool  speed100)

Sets speed for the interface.

Parameters
speed100: true to select 100Mbps mode, false for 10Mbps
Returns
Nothing

Definition at line 187 of file enet_18xx_43xx.h.

STATIC INLINE void Chip_ENET_SetADDR ( const uint8_t *  macAddr)

Sets the address of the interface.

Parameters
macAddr: Pointer to the 6 bytes used for the MAC address
Returns
Nothing

Definition at line 92 of file enet_18xx_43xx.h.

STATIC INLINE void Chip_ENET_Setup_MII ( uint32_t  div,
uint8_t  addr 
)

Sets up the PHY link clock divider and PHY address.

Parameters
div: Divider value, may vary per chip
addr: PHY address, used with MII read and write
Returns
Nothing

Definition at line 103 of file enet_18xx_43xx.h.

STATIC INLINE void Chip_ENET_Start_MII_Read ( uint8_t  reg)

Starts a PHY read via the MII.

Parameters
reg: PHY register to read
Returns
Nothing Start a PHY read operation. Does not block, requires calling IP_ENET_IsMIIBusy to determine when read is complete and calling IP_ENET_ReadMIIData to get the data.

Definition at line 129 of file enet_18xx_43xx.h.

STATIC INLINE void Chip_ENET_Start_MII_Write ( uint8_t  reg,
uint16_t  data 
)

Starts a PHY write via the MII.

Parameters
reg: PHY register to write
data: Data to write to PHY register
Returns
Nothing Start a PHY write operation. Does not block, requires calling IP_ENET_IsMIIBusy to determine when write is complete.

Definition at line 116 of file enet_18xx_43xx.h.

STATIC INLINE void Chip_ENET_TX_Enable ( bool  Enable)

Enables or disables ethernet transmit.

Parameters
Enable: true to enable transmit, false to disable
Returns
Nothing

Definition at line 157 of file enet_18xx_43xx.h.

STATIC INLINE void Chip_ENET_TXStart ( void  )

Starts transmit polling of TX descriptors.

Returns
Nothing

Definition at line 217 of file enet_18xx_43xx.h.