Microchip® Advanced Software Framework

gmac_raw_2.h File Reference

GMAC (Ethernet MAC) driver for SAM.

Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.

#include "compiler.h"

Data Structures

struct  gmac_device
 GMAC driver structure. More...
 
struct  gmac_options
 Input parameters when initializing the gmac module mode. More...
 
struct  gmac_queue
 

Typedefs

typedef void(* gmac_dev_tx_cb_t )(uint32_t ul_status)
 RX callback. More...
 
typedef void(* gmac_dev_wakeup_cb_t )(void)
 Wakeup callback. More...
 
typedef struct gmac_device gmac_device_t
 GMAC driver structure. More...
 
typedef struct gmac_options gmac_options_t
 Input parameters when initializing the gmac module mode. More...
 
typedef struct gmac_queue gmac_queue_t
 

Functions

uint8_t * gmac_dev_get_tx_buffer (gmac_device_t *p_gmac_dev, gmac_quelist_t queue_idx)
 
uint32_t gmac_dev_get_tx_load (gmac_device_t *p_gmac_dev, gmac_quelist_t queue_idx)
 Get current load of transmit. More...
 
void gmac_dev_init (Gmac *p_gmac, gmac_device_t *p_gmac_dev, gmac_options_t *p_opt)
 Initialize the GMAC driver. More...
 
uint32_t gmac_dev_read (gmac_device_t *p_gmac_dev, gmac_quelist_t queue_idx, uint8_t *p_frame, uint32_t ul_frame_size, uint32_t *p_rcv_size)
 Frames can be read from the GMAC in multiple sections. More...
 
void gmac_dev_reset (gmac_device_t *p_gmac_dev, gmac_quelist_t queue_idx)
 Reset TX & RX queue & statistics. More...
 
uint32_t gmac_dev_rx_buf_used (gmac_device_t *p_gmac_dev, gmac_quelist_t queue_idx)
 Return the number of RX buffer full. More...
 
void gmac_dev_set_rx_callback (gmac_device_t *p_gmac_dev, gmac_quelist_t queue_idx, gmac_dev_tx_cb_t func_rx_cb)
 Register/Clear RX callback. More...
 
uint8_t gmac_dev_set_tx_wakeup_callback (gmac_device_t *p_gmac_dev, gmac_quelist_t queue_idx, gmac_dev_wakeup_cb_t func_wakeup, uint8_t uc_threshold)
 Register/Clear TX wakeup callback. More...
 
uint32_t gmac_dev_tx_buf_used (gmac_device_t *p_gmac_dev, gmac_quelist_t queue_idx)
 Return the number of TX buffer waiting for transfer. More...
 
uint32_t gmac_dev_write (gmac_device_t *p_gmac_dev, gmac_quelist_t queue_idx, void *p_buffer, uint32_t ul_size, gmac_dev_tx_cb_t func_tx_cb)
 Send ulLength bytes from pcFrom. More...
 
uint32_t gmac_dev_write_nocopy (gmac_device_t *p_gmac_dev, gmac_quelist_t queue_idx, uint32_t ul_size, gmac_dev_tx_cb_t func_tx_cb)
 
void gmac_handler (gmac_device_t *p_gmac_dev, gmac_quelist_t queue_idx)
 GMAC Interrupt handler. More...
 

typedef void(* gmac_dev_tx_cb_t)(uint32_t ul_status)

RX callback.

typedef void(* gmac_dev_wakeup_cb_t)(void)

Wakeup callback.

typedef struct gmac_device gmac_device_t

GMAC driver structure.

typedef struct gmac_options gmac_options_t

Input parameters when initializing the gmac module mode.

typedef struct gmac_queue gmac_queue_t