#include "board.h"
Go to the source code of this file.
Data Structures | |
struct | GMacb |
Defines | |
#define | GMACB_RESET_LENGTH 0xD |
Functions | |
void | GMACB_SetupTimeout (GMacb *pMacb, uint32_t toMax) |
Setup the maximum timeout count of the driver. | |
void | GMACB_Init (GMacb *pMacb, sGmacd *pGmacd, uint8_t phyAddress) |
Initialize the MACB instance. | |
uint8_t | GMACB_InitPhy (GMacb *pMacb, uint32_t mck, const Pin *pResetPins, uint32_t nbResetPins, const Pin *pEmacPins, uint32_t nbEmacPins) |
Do a HW initialize to the PHY ( via RSTC ) and set up clocks & PIOs This should be called only once to initialize the PHY pre-settings. The PHY address is reset status of CRS,RXD[3:0] (the emacPins' pullups). The COL pin is used to select MII mode on reset (pulled up for Reduced MII) The RXDV pin is used to select test mode on reset (pulled up for test mode) The above pins should be predefined for corresponding settings in resetPins The GMAC peripheral pins are configured after the reset done. | |
uint8_t | GMACB_AutoNegotiate (GMacb *pMacb) |
Issue a Auto Negotiation of the PHY. | |
uint8_t | GMACB_GetLinkSpeed (GMacb *pMacb, uint8_t applySettings) |
uint8_t | GMACB_Send (GMacb *pMacb, void *pBuffer, uint32_t size) |
uint32_t | GMACB_Poll (GMacb *pMacb, uint8_t *pBuffer, uint32_t size) |
void | GMACB_DumpRegisters (GMacb *pMacb) |
Dump all the useful registers. | |
uint8_t | GMACB_ResetPhy (GMacb *pMacb) |
Issue a SW reset to reset all registers of the PHY. |
Definition in file gmacb_phy.h.
#define GMACB_RESET_LENGTH 0xD |
The reset length setting for external reset configuration
Definition at line 69 of file gmacb_phy.h.
uint8_t GMACB_AutoNegotiate | ( | GMacb * | pMacb | ) |
Issue a Auto Negotiation of the PHY.
pMacb | Pointer to the MACB instance |
Set the Auto_negotiation Advertisement Register, MII advertising for Next page 100BaseTxFD and HD, 10BaseTFD and HD, IEEE 802.3
Definition at line 372 of file gmacb_phy.c.
void GMACB_DumpRegisters | ( | GMacb * | pMacb | ) |
Dump all the useful registers.
pMacb | Pointer to the MACB instance |
Definition at line 191 of file gmacb_phy.c.
Initialize the MACB instance.
pMacb | Pointer to the MACB instance | |
phyAddress | The PHY address used to access the PHY |
Definition at line 253 of file gmacb_phy.c.
uint8_t GMACB_InitPhy | ( | GMacb * | pMacb, | |
uint32_t | mck, | |||
const Pin * | pResetPins, | |||
uint32_t | nbResetPins, | |||
const Pin * | pGmacPins, | |||
uint32_t | nbGmacPins | |||
) |
Do a HW initialize to the PHY ( via RSTC ) and set up clocks & PIOs This should be called only once to initialize the PHY pre-settings. The PHY address is reset status of CRS,RXD[3:0] (the emacPins' pullups). The COL pin is used to select MII mode on reset (pulled up for Reduced MII) The RXDV pin is used to select test mode on reset (pulled up for test mode) The above pins should be predefined for corresponding settings in resetPins The GMAC peripheral pins are configured after the reset done.
pMacb | Pointer to the MACB instance | |
mck | Main clock setting to initialize clock | |
resetPins | Pointer to list of PIOs to configure before HW RESET (for PHY power on reset configuration latch) | |
nbResetPins | Number of PIO items that should be configured | |
emacPins | Pointer to list of PIOs for the EMAC interface | |
nbEmacPins | Number of PIO items that should be configured |
Definition at line 317 of file gmacb_phy.c.
uint8_t GMACB_ResetPhy | ( | GMacb * | pMacb | ) |
Issue a SW reset to reset all registers of the PHY.
pMacb | Pointer to the MACB instance |
Definition at line 267 of file gmacb_phy.c.
void GMACB_SetupTimeout | ( | GMacb * | pMacb, | |
uint32_t | toMax | |||
) |
Setup the maximum timeout count of the driver.
pMacb | Pointer to the MACB instance | |
toMax | Timeout maximum count. |
Definition at line 243 of file gmacb_phy.c.