adin2111_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
#define ADIN2111_PHY_SUBSYS_IRQ_MASK_LINK_STAT_CHNG_IRQ_EN
Definition: adin2111_driver.h:1231
#define ADIN2111_CONFIG2_P2_FWD_UNK2P1
Definition: adin2111_driver.h:398
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 adin2111LinkChangeEventHandler(NetInterface *interface)
ADIN2111 link status change event handler.
Definition: adin2111_driver.c:479
void adin2111WriteFifo(NetInterface *interface, uint16_t header, const uint8_t *data, size_t length)
Write TX FIFO.
Definition: adin2111_driver.c:1135
#define ADIN2111_MDIOACC_MDIO_ST_CLAUSE_45
Definition: adin2111_driver.h:483
void adin2111WriteMmdReg(NetInterface *interface, uint8_t port, uint8_t devAddr, uint16_t regAddr, uint16_t data)
Write MMD register.
Definition: adin2111_driver.c:1037
void adin2111DisableIrq(NetInterface *interface)
Disable interrupts.
Definition: adin2111_driver.c:263
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 ADIN2111_ADDR_FILT_LWR_MAC_ADDR_31_0
Definition: adin2111_driver.h:630
#define ADIN2111_MDIOACC_MDIO_OP_WRITE
Definition: adin2111_driver.h:487
bool_t adin2111GetLinkState(NetInterface *interface, uint8_t port)
Get link state.
Definition: adin2111_driver.c:820
#define ADIN2111_ADDR_FILT_UPR_MAC_ADDR_47_32
Definition: adin2111_driver.h:627
#define ADIN2111_ADDR_FILT_UPR_TO_HOST
Definition: adin2111_driver.h:626
bool_t adin2111IrqHandler(NetInterface *interface)
ADIN2111 interrupt service routine.
Definition: adin2111_driver.c:279
error_t adin2111Init(NetInterface *interface)
ADIN2111 controller initialization.
Definition: adin2111_driver.c:71
uint16_t adin2111ReadMmdReg(NetInterface *interface, uint8_t port, uint8_t devAddr, uint16_t regAddr)
Read MMD register.
Definition: adin2111_driver.c:1086
#define ADIN2111_PHYID_REVISION_DEFAULT
Definition: adin2111_driver.h:354
#define ADIN2111_P2_RX_FSIZE_P2_RX_FRM_SIZE
Definition: adin2111_driver.h:688
error_t adin2111SendPacket(NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Send a packet.
Definition: adin2111_driver.c:585
#define ADIN2111_PHY_SUBSYS_IRQ_STATUS_LINK_STAT_CHNG_LH
Definition: adin2111_driver.h:1225
uint16_t adin2111ReadPhyReg(NetInterface *interface, uint8_t port, uint8_t address)
Read PHY register.
Definition: adin2111_driver.c:976
#define ADIN2111_MDIOACC_MDIO_ST_CLAUSE_22
Definition: adin2111_driver.h:484
void adin2111ReadFifo(NetInterface *interface, uint8_t port, uint16_t *header, uint8_t *data, size_t length)
Read RX FIFO.
Definition: adin2111_driver.c:1178
#define ADIN2111_MI_STATUS_MI_LINK_STAT_LAT
Definition: adin2111_driver.h:752
#define ADIN2111_CRSM_SFT_PD_CNTRL_CRSM_SFT_PD
Definition: adin2111_driver.h:1073
size_t netBufferGetLength(const NetBuffer *buffer)
Get the actual length of a multi-part buffer.
Definition: net_mem.c:297
ADIN2111 2-port 10Base-T1L Ethernet switch driver.
#define ADIN2111_IMASK1_P1_RX_RDY_MASK
Definition: adin2111_driver.h:475
void adin2111WriteReg(NetInterface *interface, uint16_t address, uint32_t data)
Write SPI register.
Definition: adin2111_driver.c:854
void adin2111DumpReg(NetInterface *interface)
Dump SPI registers for debugging purpose.
Definition: adin2111_driver.c:915
#define ADIN2111_LED_POLARITY_LED1_POLARITY_ACTIVE_HIGH
Definition: adin2111_driver.h:1198
#define ADIN2111_ADDR_FILT_UPR_APPLY2PORT2
Definition: adin2111_driver.h:622
#define ADIN2111_IMASK1_P2_RX_RDY_MASK
Definition: adin2111_driver.h:470
#define ADIN2111_P1_RX_FSIZE_P1_RX_FRM_SIZE
Definition: adin2111_driver.h:649
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.
Definition: os_port_chibios.c:202
#define ADIN2111_LED_CNTRL_LED0_FUNCTION_LINKUP_TXRX_ACTIVITY
Definition: adin2111_driver.h:1165
#define ADIN2111_IMASK1_P2_PHYINT_MASK
Definition: adin2111_driver.h:469
#define ADIN2111_PHY_SUBSYS_IRQ_STATUS
Definition: adin2111_driver.h:317
error_t adin2111UpdateMacAddrFilter(NetInterface *interface)
Configure MAC address filtering.
Definition: adin2111_driver.c:734
TCP/IP stack core.
void adin2111EventHandler(NetInterface *interface)
ADIN2111 event handler.
Definition: adin2111_driver.c:383
__weak_func void adin2111InitHook(NetInterface *interface)
ADIN2111 custom configuration.
Definition: adin2111_driver.c:228
#define ADIN2111_LED_CNTRL_LED1_FUNCTION_OFF
Definition: adin2111_driver.h:1146
void adin2111WritePhyReg(NetInterface *interface, uint8_t port, uint8_t address, uint16_t data)
Write PHY register.
Definition: adin2111_driver.c:940
#define ADIN2111_CONFIG2_P1_FWD_UNK2P2
Definition: adin2111_driver.h:399
uint32_t adin2111ReadReg(NetInterface *interface, uint16_t address)
Read SPI register.
Definition: adin2111_driver.c:882
#define ADIN2111_ADDR_FILT_UPR_APPLY2PORT1
Definition: adin2111_driver.h:623
void adin2111ReceivePacket(NetInterface *interface, uint8_t port)
Receive a packet.
Definition: adin2111_driver.c:682
Debugging facilities.
#define ADIN2111_LED_POLARITY_LED0_POLARITY_ACTIVE_HIGH
Definition: adin2111_driver.h:1202
#define ADIN2111_ADDR_FILT_UPR_TO_OTHER_PORT
Definition: adin2111_driver.h:625
void adin2111DumpPhyReg(NetInterface *interface, uint8_t port)
Dump PHY registers for debugging purpose.
Definition: adin2111_driver.c:1011