lan9250_driver.c
bool_t osSetEventFromIsr(OsEvent *event)
Set an event object to the signaled state from an interrupt service routine.
Definition: os_port_chibios.c:270
void nicNotifyLinkChange(NetInterface *interface)
Process link state change notification.
Definition: nic.c:559
error_t lan9250Init(NetInterface *interface)
LAN9250 controller initialization.
Definition: lan9250_driver.c:71
#define LAN9250_PHY_SPECIAL_CONTROL_STATUS_SPEED_10BT_FD
Definition: lan9250_driver.h:755
error_t lan9250UpdateMacAddrFilter(NetInterface *interface)
Configure MAC address filtering.
Definition: lan9250_driver.c:612
size_t netBufferRead(void *dest, const NetBuffer *src, size_t srcOffset, size_t length)
Read data from a multi-part buffer.
Definition: net_mem.c:690
void lan9250WriteFifo(NetInterface *interface, const uint8_t *data, size_t length)
Write TX FIFO.
Definition: lan9250_driver.c:1003
#define LAN9250_PHY_INTERRUPT_MASK_LINK_DOWN
Definition: lan9250_driver.h:745
void lan9250ReadFifo(NetInterface *interface, uint8_t *data, size_t length)
Read RX FIFO.
Definition: lan9250_driver.c:1042
#define LAN9250_TX_CMD_A_START_OFFSET_0B
Definition: lan9250_driver.h:76
void lan9250DropPacket(NetInterface *interface, size_t length)
Drop the received packet.
Definition: lan9250_driver.c:573
#define LAN9250_PHY_INTERRUPT_SOURCE_LINK_DOWN
Definition: lan9250_driver.h:735
void nicProcessPacket(NetInterface *interface, uint8_t *packet, size_t length, NetRxAncillary *ancillary)
Handle a packet received by the network controller.
Definition: nic.c:392
#define LAN9250_PHY_INTERRUPT_SOURCE_LINK_UP
Definition: lan9250_driver.h:731
#define LAN9250_PHY_SPECIAL_CONTROL_STATUS_SPEED_10BT_HD
Definition: lan9250_driver.h:753
void lan9250WriteMacReg(NetInterface *interface, uint8_t address, uint32_t data)
Write host MAC CSR register.
Definition: lan9250_driver.c:755
uint16_t lan9250ReadPhyReg(NetInterface *interface, uint8_t address)
Read PHY register.
Definition: lan9250_driver.c:887
uint16_t lan9250ReadMmdReg(NetInterface *interface, uint8_t devAddr, uint16_t regAddr)
Read MMD register.
Definition: lan9250_driver.c:975
#define LAN9250_PHY_SPECIAL_CONTROL_STATUS_SPEED
Definition: lan9250_driver.h:752
#define LAN9250_TX_CMD_A_BUFFER_ALIGN_4B
Definition: lan9250_driver.h:72
error_t lan9250ReceivePacket(NetInterface *interface)
Receive a packet.
Definition: lan9250_driver.c:498
void lan9250DumpSysReg(NetInterface *interface)
Dump system CSR registers for debugging purpose.
Definition: lan9250_driver.c:731
#define LAN9250_PHY_SPECIAL_CONTROL_STATUS_SPEED_100BTX_HD
Definition: lan9250_driver.h:754
#define LAN9250_PHY_MMD_ACCESS_FUNC_DATA_NO_POST_INC
Definition: lan9250_driver.h:680
error_t lan9250SendPacket(NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Send a packet.
Definition: lan9250_driver.c:429
void lan9250WritePhyReg(NetInterface *interface, uint8_t address, uint16_t data)
Write PHY register.
Definition: lan9250_driver.c:849
uint32_t lan9250ReadMacReg(NetInterface *interface, uint8_t address)
Read host MAC CSR register.
Definition: lan9250_driver.c:792
#define LAN9250_PHY_BASIC_STATUS_LINK_STATUS
Definition: lan9250_driver.h:610
size_t netBufferGetLength(const NetBuffer *buffer)
Get the actual length of a multi-part buffer.
Definition: net_mem.c:297
#define LAN9250_PHY_INTERRUPT_MASK_LINK_UP
Definition: lan9250_driver.h:741
void lan9250DumpPhyReg(NetInterface *interface)
Dump PHY registers for debugging purpose.
Definition: lan9250_driver.c:921
#define LAN9250_PHY_SPECIAL_CONTROL_STATUS
Definition: lan9250_driver.h:247
#define LAN9250_PHY_SPECIAL_CONTROL_STATUS_SPEED_100BTX_FD
Definition: lan9250_driver.h:756
void lan9250EventHandler(NetInterface *interface)
LAN9250 event handler.
Definition: lan9250_driver.c:319
void lan9250WriteMmdReg(NetInterface *interface, uint8_t devAddr, uint16_t regAddr, uint16_t data)
Write MMD register.
Definition: lan9250_driver.c:946
#define LAN9250_IRQ_CFG_INT_DEAS_100US
Definition: lan9250_driver.h:276
bool_t lan9250IrqHandler(NetInterface *interface)
LAN9250 interrupt service routine.
Definition: lan9250_driver.c:246
LAN9250 Ethernet controller.
void lan9250WriteSysReg(NetInterface *interface, uint16_t address, uint32_t data)
Write system CSR register.
Definition: lan9250_driver.c:667
uint32_t lan9250ReadSysReg(NetInterface *interface, uint16_t address)
Read system CSR register.
Definition: lan9250_driver.c:698
uint32_t lan9250CalcCrc(const void *data, size_t length)
CRC calculation.
Definition: lan9250_driver.c:1080
void lan9250DumpMacReg(NetInterface *interface)
Dump host MAC CSR registers for debugging purpose.
Definition: lan9250_driver.c:825
__weak_func void lan9250InitHook(NetInterface *interface)
LAN9250 custom configuration.
Definition: lan9250_driver.c:195
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.
Definition: os_port_chibios.c:202
#define LAN9250_HMAC_MII_DATA_MII_DATA
Definition: lan9250_driver.h:548
#define LAN9250_PHY_MMD_ACCESS_FUNC_ADDR
Definition: lan9250_driver.h:679
TCP/IP stack core.
#define LAN9250_HMAC_MII_ACC_PHY_ADDR_DEFAULT
Definition: lan9250_driver.h:542
Debugging facilities.