Go to the documentation of this file.
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"
82 #if MAC_USE_EVENTS == TRUE
bool macPollLinkStatus(MACDriver *macp)
Updates and returns the link status.
void mac_lld_init(void)
Low level MAC initialization.
void mac_lld_release_transmit_descriptor(MACTransmitDescriptor *tdp)
Releases a transmit descriptor and starts the transmission of the enqueued data as a single frame.
void mac_lld_start(MACDriver *macp)
Configures and activates the MAC peripheral.
void mac_lld_stop(MACDriver *macp)
Deactivates the MAC peripheral.
Structure representing a receive descriptor.
Driver configuration structure.
void macReleaseTransmitDescriptor(MACTransmitDescriptor *tdp)
Releases a transmit descriptor and starts the transmission of the enqueued data as a single frame.
static void osalSysUnlock(void)
Leaves a critical zone from thread context.
void macInit(void)
MAC Driver initialization.
threads_queue_t rdqueue
Receive semaphore.
static void osalEventObjectInit(event_source_t *esp)
Initializes an event source object.
msg_t macWaitReceiveDescriptor(MACDriver *macp, MACReceiveDescriptor *rdp, sysinterval_t timeout)
Waits for a received frame.
void mac_lld_release_receive_descriptor(MACReceiveDescriptor *rdp)
Releases a receive descriptor.
void macReleaseReceiveDescriptor(MACReceiveDescriptor *rdp)
Releases a receive descriptor.
msg_t macWaitTransmitDescriptor(MACDriver *macp, MACTransmitDescriptor *tdp, sysinterval_t timeout)
Allocates a transmission descriptor.
void macObjectInit(MACDriver *macp)
Initialize the standard part of a MACDriver structure.
msg_t mac_lld_get_receive_descriptor(MACDriver *macp, MACReceiveDescriptor *rdp)
Returns a receive descriptor.
const MACConfig * config
Current configuration data.
Structure representing a transmit descriptor.
threads_queue_t tdqueue
Transmit semaphore.
event_source_t rdevent
Receive event.
#define MSG_OK
Normal wakeup message.
msg_t osalThreadEnqueueTimeoutS(threads_queue_t *tqp, sysinterval_t timeout)
Enqueues the caller thread.
#define osalDbgCheck(c)
Function parameters check.
void macStart(MACDriver *macp, const MACConfig *config)
Configures and activates the MAC peripheral.
macstate_t state
Driver state.
uint64_t sysinterval_t
Type of time interval.
static void osalSysLock(void)
Enters a critical zone from thread context.
#define MSG_TIMEOUT
Wakeup caused by a timeout condition.
Structure representing a MAC driver.
#define osalDbgAssert(c, remark)
Condition assertion.
bool mac_lld_poll_link_status(MACDriver *macp)
Updates and returns the link status.
void macStop(MACDriver *macp)
Deactivates the MAC peripheral.
static void osalThreadQueueObjectInit(threads_queue_t *tqp)
Initializes a threads queue object.
msg_t mac_lld_get_transmit_descriptor(MACDriver *macp, MACTransmitDescriptor *tdp)
Returns a transmission descriptor.