Microchip® Advanced Software Framework

gmac_device Struct Reference

GMAC driver structure.

#include <gmac_raw.h>

Data Fields

gmac_dev_tx_cb_t func_rx_cb
 Optional callback to be invoked once a frame has been received. More...
 
gmac_dev_tx_cb_tfunc_tx_cb_list
 Optional callback list to be invoked once TD has been processed. More...
 
gmac_dev_wakeup_cb_t func_wakeup_cb
 Optional callback to be invoked once several TDs have been released. More...
 
struct netifnetif
 Reference to lwIP netif structure. More...
 
Gmac * p_hw
 Pointer to HW register base. More...
 
uint8_t * p_rx_buffer
 Pointer to allocated RX buffer. More...
 
gmac_rx_descriptor_tp_rx_dscr
 Pointer to Rx TDs (must be 8-byte aligned) More...
 
uint8_t * p_tx_buffer
 Pointer to allocated TX buffer. More...
 
gmac_tx_descriptor_tp_tx_dscr
 Pointer to Tx TDs (must be 8-byte aligned) More...
 
gmac_rx_descriptor_t rx_desc [GMAC_RX_BUFFERS]
 Pointer to allocated TX buffer. More...
 
struct pbufrx_pbuf [GMAC_RX_BUFFERS]
 RX pbuf pointer list. More...
 
sys_sem_t rx_sem
 RX task notification semaphore. More...
 
uint8_t tx_buf [GMAC_TX_BUFFERS][GMAC_TX_UNITSIZE]
 TX buffers. More...
 
gmac_tx_descriptor_t tx_desc [GMAC_TX_BUFFERS]
 Pointer to Tx descriptor list (must be 8-byte aligned). More...
 
uint8_t uc_wakeup_threshold
 Number of free TD before wakeup callback is invoked. More...
 
uint16_t us_rx_idx
 RX index for current processing TD. More...
 
uint32_t us_rx_idx
 RX index for current processing TD. More...
 
uint16_t us_rx_list_size
 RX TD list size. More...
 
uint16_t us_tx_head
 Circular buffer head pointer by upper layer (buffer to be sent) More...
 
uint32_t us_tx_idx
 Circular buffer head pointer by upper layer (buffer to be sent). More...
 
uint16_t us_tx_list_size
 TX TD list size. More...
 
uint16_t us_tx_tail
 Circular buffer tail pointer incremented by handlers (buffer sent) More...
 

gmac_dev_tx_cb_t gmac_device::func_rx_cb

Optional callback to be invoked once a frame has been received.

Referenced by gmac_dev_set_rx_callback(), and gmac_handler().

gmac_dev_tx_cb_t* gmac_device::func_tx_cb_list

Optional callback list to be invoked once TD has been processed.

Referenced by gmac_dev_write(), gmac_dev_write_nocopy(), gmac_handler(), and gmac_init_mem().

gmac_dev_wakeup_cb_t gmac_device::func_wakeup_cb

Optional callback to be invoked once several TDs have been released.

Referenced by gmac_dev_set_tx_wakeup_callback(), and gmac_handler().

struct netif* gmac_device::netif

Reference to lwIP netif structure.

Referenced by ethernetif_init(), and gmac_task().

uint8_t* gmac_device::p_rx_buffer

Pointer to allocated RX buffer.

Referenced by gmac_init_mem(), and gmac_reset_rx_mem().

gmac_rx_descriptor_t* gmac_device::p_rx_dscr

Pointer to Rx TDs (must be 8-byte aligned)

Referenced by gmac_dev_read(), gmac_dev_rx_buf_used(), gmac_init_mem(), and gmac_reset_rx_mem().

uint8_t* gmac_device::p_tx_buffer

Pointer to allocated TX buffer.

Section 3.6 of AMBA 2.0 spec states that burst should not cross 1K Boundaries. Receive buffer manager writes are burst of 2 words => 3 lsb bits of the address shall be set to 0.

Referenced by gmac_init_mem(), and gmac_reset_tx_mem().

gmac_rx_descriptor_t gmac_device::rx_desc[GMAC_RX_BUFFERS]

Pointer to allocated TX buffer.

Section 3.6 of AMBA 2.0 spec states that burst should not cross 1K Boundaries. Receive buffer manager writes are burst of 2 words => 3 lsb bits of the address shall be set to 0.Pointer to Rx descriptor list (must be 8-byte aligned).

Referenced by gmac_low_level_input(), gmac_rx_init(), and gmac_rx_populate_queue().

struct pbuf* gmac_device::rx_pbuf[GMAC_RX_BUFFERS]

RX pbuf pointer list.

Referenced by gmac_low_level_input(), gmac_rx_init(), and gmac_rx_populate_queue().

sys_sem_t gmac_device::rx_sem

RX task notification semaphore.

Referenced by ethernetif_init(), GMAC_Handler(), and gmac_task().

uint8_t gmac_device::tx_buf[GMAC_TX_BUFFERS][GMAC_TX_UNITSIZE]

TX buffers.

Referenced by gmac_tx_init().

gmac_tx_descriptor_t gmac_device::tx_desc[GMAC_TX_BUFFERS]

Pointer to Tx descriptor list (must be 8-byte aligned).

Referenced by gmac_low_level_output(), and gmac_tx_init().

uint8_t gmac_device::uc_wakeup_threshold

Number of free TD before wakeup callback is invoked.

Referenced by gmac_dev_set_tx_wakeup_callback(), and gmac_handler().

uint16_t gmac_device::us_rx_idx

RX index for current processing TD.

uint32_t gmac_device::us_rx_idx

RX index for current processing TD.

Referenced by gmac_dev_read(), gmac_low_level_input(), gmac_reset_rx_mem(), and gmac_rx_init().

uint16_t gmac_device::us_rx_list_size
uint16_t gmac_device::us_tx_head

Circular buffer head pointer by upper layer (buffer to be sent)

Referenced by gmac_dev_get_tx_buffer(), gmac_dev_get_tx_load(), gmac_dev_write(), gmac_dev_write_nocopy(), gmac_handler(), and gmac_reset_tx_mem().

uint32_t gmac_device::us_tx_idx

Circular buffer head pointer by upper layer (buffer to be sent).

Referenced by gmac_low_level_output(), and gmac_tx_init().

uint16_t gmac_device::us_tx_tail

Circular buffer tail pointer incremented by handlers (buffer sent)

Referenced by gmac_dev_get_tx_buffer(), gmac_dev_get_tx_load(), gmac_dev_write(), gmac_handler(), and gmac_reset_tx_mem().