#ifndef ETH_H
#define ETH_H
/** initialize MAC address */
void eth_mac_init(void);
/** initialize receiver */
void eth_rx_init(void);
/** initialize transmitter */
void eth_tx_init(void);
/**
* @brief get next received packet
* @param[out] *pptr pointer to packet data
* @param[out] *psz size of packet
* @return if a packet was received
*/
int eth_rx(void **pptr, unsigned int *psz);
/**
* @brief transmit packet
* @param[in] ptr pointer to packet data
* @param[in] sz size of packet
*
* Padding will be appended if sz is not a multiple of 4 or smaller 60 bytes.
* The buffer pointed to by ptr must be sufficiently large.
*/
void eth_tx(const void *ptr, unsigned int sz);
/** get number of received packets */
unsigned int eth_rx_get_cnt(void);
/** get number of transmitted packets */
unsigned int eth_tx_get_cnt(void);
#endif /* #ifndef ETH_H */