Go to the documentation of this file.
32 #define TRACE_LEVEL NIC_TRACE_LEVEL
68 if(interface->phyAddr >= 32)
75 if(interface->smiDriver != NULL)
77 interface->smiDriver->init();
81 if(interface->extIntDriver != NULL)
83 interface->extIntDriver->init();
120 interface->phyEvent =
TRUE;
150 if(interface->extIntDriver == NULL)
158 if(linkState && !interface->linkState)
161 interface->phyEvent =
TRUE;
166 else if(!linkState && interface->linkState)
169 interface->phyEvent =
TRUE;
185 if(interface->extIntDriver != NULL)
187 interface->extIntDriver->enableIrq();
200 if(interface->extIntDriver != NULL)
202 interface->extIntDriver->disableIrq();
249 interface->linkState =
TRUE;
252 interface->nicDriver->updateMacConfig(interface);
257 interface->linkState =
FALSE;
277 if(interface->smiDriver != NULL)
302 if(interface->smiDriver != NULL)
328 for(i = 0; i < 32; i++)
331 TRACE_DEBUG(
"%02" PRIu8
": 0x%04" PRIX16
"\r\n", i,
void nicNotifyLinkChange(NetInterface *interface)
Process link state change notification.
DP83640 Ethernet PHY driver.
#define DP83640_BMSR_LINK_STATUS
void dp83640DumpPhyReg(NetInterface *interface)
Dump PHY registers for debugging purpose.
void dp83640EventHandler(NetInterface *interface)
DP83640 event handler.
const PhyDriver dp83640PhyDriver
DP83640 Ethernet PHY driver.
#define DP83640_PTP_COC_PTP_CLKOUT_EN
__weak_func void dp83640InitHook(NetInterface *interface)
DP83640 custom configuration.
#define DP83640_MICR_INTEN
uint16_t dp83640ReadPhyReg(NetInterface *interface, uint8_t address)
Read PHY register.
#define DP83640_MISR_LINK_INT_EN
#define DP83640_MISR_LINK_INT
#define DP83640_PHYSTS_LINK_STATUS
#define DP83640_BMCR_RESET
#define DP83640_MICR_INT_OE
void dp83640DisableIrq(NetInterface *interface)
Disable interrupts.
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.
#define DP83640_PHYSTS_DUPLEX_STATUS
void dp83640EnableIrq(NetInterface *interface)
Enable interrupts.
#define DP83640_PHYSTS_SPEED_STATUS
void dp83640Tick(NetInterface *interface)
DP83640 timer handler.
void dp83640WritePhyReg(NetInterface *interface, uint8_t address, uint16_t data)
Write PHY register.
error_t dp83640Init(NetInterface *interface)
DP83640 PHY transceiver initialization.