|
ChibiOS/RT
2.6.0 |
MAC Driver macros and structures.
Definition in file mac.h.
#include "mac_lld.h"Go to the source code of this file.
Functions | |
| void | macInit (void) |
| MAC Driver initialization. | |
| void | macObjectInit (MACDriver *macp) |
Initialize the standard part of a MACDriver structure. | |
| void | macStart (MACDriver *macp, const MACConfig *config) |
| Configures and activates the MAC peripheral. | |
| void | macStop (MACDriver *macp) |
| Deactivates the MAC peripheral. | |
| msg_t | macWaitTransmitDescriptor (MACDriver *macp, MACTransmitDescriptor *tdp, systime_t time) |
| Allocates a transmission descriptor. | |
| void | macReleaseTransmitDescriptor (MACTransmitDescriptor *tdp) |
| Releases a transmit descriptor and starts the transmission of the enqueued data as a single frame. | |
| msg_t | macWaitReceiveDescriptor (MACDriver *macp, MACReceiveDescriptor *rdp, systime_t time) |
| Waits for a received frame. | |
| void | macReleaseReceiveDescriptor (MACReceiveDescriptor *rdp) |
| Releases a receive descriptor. | |
| bool_t | macPollLinkStatus (MACDriver *macp) |
| Updates and returns the link status. | |
Defines | |
MAC configuration options | |
| #define | MAC_USE_ZERO_COPY FALSE |
| Enables an event sources for incoming packets. | |
| #define | MAC_USE_EVENTS TRUE |
| Enables an event sources for incoming packets. | |
Macro Functions | |
| #define | macGetReceiveEventSource(macp) (&(macp)->rdevent) |
| Returns the received frames event source. | |
| #define | macWriteTransmitDescriptor(tdp, buf, size) mac_lld_write_transmit_descriptor(tdp, buf, size) |
| Writes to a transmit descriptor's stream. | |
| #define | macReadReceiveDescriptor(rdp, buf, size) mac_lld_read_receive_descriptor(rdp, buf, size) |
| Reads from a receive descriptor's stream. | |
| #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. | |
| #define | macGetNextReceiveBuffer(rdp, sizep) mac_lld_get_next_receive_buffer(rdp, sizep) |
| Returns a pointer to the next receive buffer in the descriptor chain. | |
Typedefs | |
| typedef struct MACDriver | MACDriver |
| Type of a structure representing a MAC driver. | |
Enumerations | |
| enum | macstate_t { MAC_UNINIT = 0, MAC_STOP = 1, MAC_ACTIVE = 2 } |
| Driver state machine possible states. More... | |