ChibiOS/HAL  6.1.0
hal_mac.h File Reference

MAC Driver macros and structures. More...

#include "hal_mac_lld.h"

Go to the source code of this file.

Macros

MAC configuration options
#define MAC_USE_ZERO_COPY   FALSE
 Enables an event sources for incoming packets. More...
 
#define MAC_USE_EVENTS   TRUE
 Enables an event sources for incoming packets. More...
 
Macro Functions
#define macGetReceiveEventSource(macp)   (&(macp)->rdevent)
 Enables the zero-copy API. More...
 
#define macWriteTransmitDescriptor(tdp, buf, size)   mac_lld_write_transmit_descriptor(tdp, buf, size)
 Writes to a transmit descriptor's stream. More...
 
#define macReadReceiveDescriptor(rdp, buf, size)   mac_lld_read_receive_descriptor(rdp, buf, size)
 Reads from a receive descriptor's stream. More...
 
#define macGetNextTransmitBuffer(tdp, size, sizep)   mac_lld_get_next_transmit_buffer(tdp, size, sizep)
 Returns a pointer to the next transmit buffer in the descriptor chain. More...
 
#define macGetNextReceiveBuffer(rdp, sizep)   mac_lld_get_next_receive_buffer(rdp, sizep)
 Returns a pointer to the next receive buffer in the descriptor chain. More...
 

Typedefs

typedef struct MACDriver MACDriver
 Type of a structure representing a MAC driver. More...
 

Enumerations

Functions

void macInit (void)
 MAC Driver initialization. More...
 
void macObjectInit (MACDriver *macp)
 Initialize the standard part of a MACDriver structure. More...
 
void macStart (MACDriver *macp, const MACConfig *config)
 Configures and activates the MAC peripheral. More...
 
void macStop (MACDriver *macp)
 Deactivates the MAC peripheral. More...
 
msg_t macWaitTransmitDescriptor (MACDriver *macp, MACTransmitDescriptor *tdp, sysinterval_t timeout)
 Allocates a transmission descriptor. More...
 
void macReleaseTransmitDescriptor (MACTransmitDescriptor *tdp)
 Releases a transmit descriptor and starts the transmission of the enqueued data as a single frame. More...
 
msg_t macWaitReceiveDescriptor (MACDriver *macp, MACReceiveDescriptor *rdp, sysinterval_t timeout)
 Waits for a received frame. More...
 
void macReleaseReceiveDescriptor (MACReceiveDescriptor *rdp)
 Releases a receive descriptor. More...
 
bool macPollLinkStatus (MACDriver *macp)
 Updates and returns the link status. More...
 

Detailed Description

MAC Driver macros and structures.

Definition in file hal_mac.h.