|
Contiki 3.x
|
Functions | |
| static uint16_t | NicPhyRead (uint8_t reg) |
| Read contents of PHY register. More... | |
| static void | NicPhyWrite (uint8_t reg, uint16_t val) |
| Write value to PHY register. More... | |
| static int | NicPhyConfig (void) |
| Configure the internal PHY. More... | |
| static INLINE int | NicMmuWait (uint16_t tmo) |
| Wait until MMU is ready. More... | |
| static int | NicReset (void) |
| Reset the Ethernet controller. More... | |
| static NETBUF * | NicGetPacket (void) |
| Fetch the next packet out of the receive ring buffer. More... | |
Variables | |
| static struct etimer | et |
| NIC receiver thread. | |
|
static |
Fetch the next packet out of the receive ring buffer.
Nic interrupts must be disabled when calling this funtion.
|
static |
Wait until MMU is ready.
Poll the MMU command register until MMUCR_BUSY is cleared.
| tmo | Timeout in milliseconds. |
Definition at line 742 of file lanc111.c.
References MMUCR_BUSY, and NIC_MMUCR.
Referenced by NicReset().
|
static |
Configure the internal PHY.
Reset the PHY and initiate auto-negotiation.
Definition at line 650 of file lanc111.c.
References NIC_PHYANAD, NIC_PHYCFR1, NIC_PHYCR, NIC_PHYMSK, NIC_PHYSOR, NIC_PHYSR, NIC_RPCR, NicPhyRead(), NicPhyWrite(), PHYANAD_10_HDX, PHYANAD_10FDX, PHYANAD_CSMA, PHYANAD_TX_FDX, PHYANAD_TX_HDX, PHYCR_ANEG_EN, PHYCR_ANEG_RST, PHYCR_RST, PHYMSK_MCWRD, PHYMSK_MDPLDT, PHYMSK_MESD, PHYMSK_MJAB, PHYMSK_MLOSSSYN, PHYMSK_MRPOL, PHYMSK_MSPDDT, PHYMSK_MSSD, PHYSR_ANEG_ACK, RPCR_ANEG, RPCR_LEDA_PAT, and RPCR_LEDB_PAT.
|
static |
Read contents of PHY register.
| reg | PHY register number. |
Definition at line 580 of file lanc111.c.
References MGMT_MCLK, MGMT_MDI, MGMT_MDOE, NIC_MGMT, and NicPhyRegSelect().
Referenced by NicPhyConfig().
|
static |
Write value to PHY register.
| reg | PHY register number. |
| val | Value to write. |
Definition at line 616 of file lanc111.c.
References MGMT_MCLK, MGMT_MDO, MGMT_MDOE, NIC_MGMT, and NicPhyRegSelect().
Referenced by NicPhyConfig().
|
static |
Reset the Ethernet controller.
Definition at line 757 of file lanc111.c.
References CR_EPH_EN, CTR_AUTO_RELEASE, NIC_CR, NIC_CTR, NIC_MMUCR, NIC_MSK, NIC_RCR, NIC_TCR, NicMmuWait(), and RCR_SOFT_RST.
1.8.6