Go to the documentation of this file.
32 #define TRACE_LEVEL NIC_TRACE_LEVEL
66 if(interface->phyAddr >= 32)
73 if(interface->smiDriver != NULL)
75 interface->smiDriver->init();
79 if(interface->extIntDriver != NULL)
81 interface->extIntDriver->init();
103 interface->phyEvent =
TRUE;
133 if(interface->extIntDriver == NULL)
141 if(linkState && !interface->linkState)
144 interface->phyEvent =
TRUE;
149 else if(!linkState && interface->linkState)
152 interface->phyEvent =
TRUE;
168 if(interface->extIntDriver != NULL)
170 interface->extIntDriver->enableIrq();
183 if(interface->extIntDriver != NULL)
185 interface->extIntDriver->disableIrq();
274 interface->linkState =
TRUE;
277 interface->nicDriver->updateMacConfig(interface);
282 interface->linkState =
FALSE;
302 if(interface->smiDriver != NULL)
327 if(interface->smiDriver != NULL)
353 for(i = 0; i < 32; i++)
356 TRACE_DEBUG(
"%02" PRIu8
": 0x%04" PRIX16
"\r\n", i,
void nicNotifyLinkChange(NetInterface *interface)
Process link state change notification.
uint16_t dm9162ReadPhyReg(NetInterface *interface, uint8_t address)
Read PHY register.
void dm9162EventHandler(NetInterface *interface)
DM9162 event handler.
__weak_func void dm9162InitHook(NetInterface *interface)
DM9162 custom configuration.
#define DM9162_BMSR_LINK_STATUS
void dm9162DumpPhyReg(NetInterface *interface)
Dump PHY registers for debugging purpose.
#define DM9162_DSCSR_10FDX
error_t dm9162Init(NetInterface *interface)
DM9162 PHY transceiver initialization.
void dm9162DisableIrq(NetInterface *interface)
Disable interrupts.
#define DM9162_DSCSR_ANMB_LINK_READY
#define DM9162_DSCSR_ANMB
#define DM9162_DSCSR_ANMB_ACK_MATCH
#define DM9162_DSCSR_ANMB_CONSIST_MATCH
#define DM9162_MDINTR_LINK_CHANGE
#define DM9162_DSCSR_100HDX
DM9162 Ethernet PHY driver.
#define DM9162_BMCR_RESET
void dm9162Tick(NetInterface *interface)
DM9162 timer handler.
#define DM9162_DSCSR_ANMB_ABILITY_MATCH
void dm9162WritePhyReg(NetInterface *interface, uint8_t address, uint16_t data)
Write PHY register.
#define TRACE_WARNING(...)
#define DM9162_MDINTR_INTR_MASK
#define DM9162_DSCSR_100FDX
#define DM9162_MDINTR_LINK_MASK
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.
#define DM9162_DSCSR_10HDX
void dm9162EnableIrq(NetInterface *interface)
Enable interrupts.
const PhyDriver dm9162PhyDriver
DM9162 Ethernet PHY driver.