27#if (HAL_USE_MAC == TRUE) || defined(__DOXYGEN__)
33#if (MAC_USE_ZERO_COPY == TRUE) && (MAC_SUPPORTS_ZERO_COPY == FALSE)
34#error "MAC_USE_ZERO_COPY not supported by this implementation"
85#if MAC_USE_EVENTS == TRUE
110#if defined(MAC_LLD_ENHANCED_API)
void macStop(MACDriver *macp)
Deactivates the MAC peripheral.
void macInit(void)
MAC Driver initialization.
struct hal_mac_driver MACDriver
Type of a structure representing a MAC driver.
void macObjectInit(MACDriver *macp)
Initialize the standard part of a MACDriver structure.
void mac_lld_init(void)
Low level MAC initialization.
struct hal_mac_receive_descriptor MACReceiveDescriptor
Type of structure representing a MAC receive descriptor.
struct hal_mac_transmit_descriptor MACTransmitDescriptor
Type of structure representing a MAC transmit descriptor.
msg_t macWaitTransmitDescriptor(MACDriver *macp, MACTransmitDescriptor *tdp, sysinterval_t timeout)
Allocates a transmission descriptor.
msg_t macStart(MACDriver *macp, const MACConfig *config)
Configures and activates the MAC peripheral.
#define macGetTransmitDescriptorX(macp, tdp)
Returns a transmission descriptor.
void mac_lld_stop(MACDriver *macp)
Deactivates the MAC peripheral.
eventflags_t macGetAndClearEventsI(MACDriver *macp)
Get and clears MAC event flags.
void mac_lld_start(MACDriver *macp)
Configures and activates the MAC peripheral.
msg_t macWaitReceiveDescriptor(MACDriver *macp, MACReceiveDescriptor *rdp, sysinterval_t timeout)
Waits for a received frame.
bool mac_lld_poll_link_status(MACDriver *macp)
Updates and returns the link status.
#define macGetReceiveDescriptorX(macp, rdp)
Returns a receive descriptor.
bool macPollLinkStatus(MACDriver *macp)
Updates and returns the link status.
struct hal_mac_config MACConfig
Type of structure representing a MAC configuration.
msg_t osalThreadEnqueueTimeoutS(threads_queue_t *tqp, sysinterval_t timeout)
Enqueues the caller thread.
static void osalSysLock(void)
Enters a critical zone from thread context.
static void osalSysUnlock(void)
Leaves a critical zone from thread context.
static void osalThreadQueueObjectInit(threads_queue_t *tqp)
Initializes a threads queue object.
static void osalEventObjectInit(event_source_t *esp)
Initializes an event source object.
#define osalDbgAssert(c, remark)
Condition assertion.
#define osalDbgCheck(c)
Function parameters check.
#define MSG_OK
Normal wakeup message.
#define MSG_TIMEOUT
Wakeup caused by a timeout condition.
uint64_t sysinterval_t
Type of time interval.
const MACConfig * config
Current configuration data.
macstate_t state
Driver state.
threads_queue_t rdqueue
Receive threads queue.
event_source_t es
MAC events source.
eventflags_t flags
Locally held event flags for callback use.
maccb_t cb
Events callback.
threads_queue_t tdqueue
Transmit threads queue.