![]() |
Morse Micro IoT SDK
2.9.7
|
Data Structures | |
| struct | mmwlan_tx_metadata |
| Metadata for TX packets. More... | |
Macros | |
| #define | MMWLAN_TX_DEFAULT_TIMEOUT_MS (1000) |
| Default transmit timeout. More... | |
| #define | MMWLAN_TX_DEFAULT_QOS_TID (0) |
Default QoS Traffic ID (TID) to use for transmit (mmwlan_tx()). More... | |
| #define | MMWLAN_MAX_QOS_TID (7) |
| Maximum Traffic ID (TID) supported for QoS traffic. More... | |
| #define | MMWLAN_TX_METADATA_INIT { MMWLAN_TX_DEFAULT_QOS_TID } |
| Initializer for mmwlan_tx_metadata. More... | |
Typedefs | |
| typedef void(* | mmwlan_link_state_cb_t) (enum mmwlan_link_state link_state, void *arg) |
| Prototype for link state change callbacks. More... | |
| typedef void(* | mmwlan_rx_cb_t) (uint8_t *header, unsigned header_len, uint8_t *payload, unsigned payload_len, void *arg) |
| Receive data packet callback function. More... | |
| typedef void(* | mmwlan_rx_pkt_cb_t) (struct mmpkt *mmpkt, void *arg) |
| Receive data packet callback function, consuming an mmpkt. More... | |
| typedef void(* | mmwlan_tx_flow_control_cb_t) (enum mmwlan_tx_flow_control_state state, void *arg) |
| Transmit flow control callback function type. More... | |
Enumerations | |
| enum | mmwlan_link_state { MMWLAN_LINK_DOWN , MMWLAN_LINK_UP } |
| Enumeration of link states. More... | |
| enum | mmwlan_tx_flow_control_state { MMWLAN_TX_READY , MMWLAN_TX_PAUSED } |
| Enumeration of states that can be returned by the transmit flow control callback (as registered by mmwlan_register_tx_flow_control_cb(). More... | |
Functions | |
| enum mmwlan_status | mmwlan_register_link_state_cb (mmwlan_link_state_cb_t callback, void *arg) |
| Register a link status callback. More... | |
| enum mmwlan_status | mmwlan_register_rx_cb (mmwlan_rx_cb_t callback, void *arg) |
| Register a receive callback. More... | |
| enum mmwlan_status | mmwlan_register_rx_pkt_cb (mmwlan_rx_pkt_cb_t callback, void *arg) |
| Register a receive callback which consumes an mmpkt. More... | |
| enum mmwlan_status | mmwlan_tx_wait_until_ready (uint32_t timeout_ms) |
| Blocks until the transmit path is ready for transmit. More... | |
| struct mmpkt * | mmwlan_alloc_mmpkt_for_tx (uint32_t payload_len, uint8_t tid) |
Allocate an mmpkt data structure for transmission with at least enough space for the given payload length. More... | |
| enum mmwlan_status | mmwlan_tx_pkt (struct mmpkt *pkt, const struct mmwlan_tx_metadata *metadata) |
| Transmit the given packet. More... | |
| static enum mmwlan_status | mmwlan_tx_tid (const uint8_t *data, unsigned len, uint8_t tid) |
| Transmit the given packet using the given QoS Traffic ID (TID). More... | |
| static enum mmwlan_status | mmwlan_tx (const uint8_t *data, unsigned len) |
| Transmit the given packet using MMWLAN_TX_DEFAULT_QOS_TID. More... | |
| enum mmwlan_status | mmwlan_register_tx_flow_control_cb (mmwlan_tx_flow_control_cb_t cb, void *arg) |
| Register a transmit flow control callback. More... | |
| #define MMWLAN_MAX_QOS_TID (7) |
| #define MMWLAN_TX_DEFAULT_QOS_TID (0) |
Default QoS Traffic ID (TID) to use for transmit (mmwlan_tx()).
| #define MMWLAN_TX_DEFAULT_TIMEOUT_MS (1000) |
Default transmit timeout.
Used by mmwlan_tx() and mmwlan_tx_tid().
| #define MMWLAN_TX_METADATA_INIT { MMWLAN_TX_DEFAULT_QOS_TID } |
Initializer for mmwlan_tx_metadata.
| typedef void(* mmwlan_link_state_cb_t) (enum mmwlan_link_state link_state, void *arg) |
| typedef void(* mmwlan_rx_cb_t) (uint8_t *header, unsigned header_len, uint8_t *payload, unsigned payload_len, void *arg) |
Receive data packet callback function.
| header | Buffer containing the 802.3 header for this packet. |
| header_len | Length of the header. |
| payload | Packet payload (excluding header). |
| payload_len | Length of payload. |
| arg | Opaque argument that was given when the callback was registered. |
Receive data packet callback function, consuming an mmpkt.
| mmpkt | The mmpkt containing the received packet, including an 802.3 header. Ownership of the mmpkt is passed to this callback. |
| arg | Opaque argument that was given when the callback was registered. |
| typedef void(* mmwlan_tx_flow_control_cb_t) (enum mmwlan_tx_flow_control_state state, void *arg) |
Transmit flow control callback function type.
When registered, this callback will be invoked when the transmit data path is paused and when unpaused.
| state | Current transmit flow control state. |
| arg | Opaque argument that was given when the function was registered. |
| enum mmwlan_link_state |
Enumeration of states that can be returned by the transmit flow control callback (as registered by mmwlan_register_tx_flow_control_cb().
| Enumerator | |
|---|---|
| MMWLAN_TX_READY | Transmit data path ready for packets (not paused). |
| MMWLAN_TX_PAUSED | Transmit data path paused (blocked). |
| struct mmpkt * mmwlan_alloc_mmpkt_for_tx | ( | uint32_t | payload_len, |
| uint8_t | tid | ||
| ) |
Allocate an mmpkt data structure for transmission with at least enough space for the given payload length.
The return mmpkt can be passed to mmwlan_tx_pkt().
| payload_len | Minimum space required for payload. |
| tid | The TID that this packet will be transmitted at. This may be used by the allocation function to, for example, prioritize allocation of certain classes of traffic. |
NULL on failure. | enum mmwlan_status mmwlan_register_link_state_cb | ( | mmwlan_link_state_cb_t | callback, |
| void * | arg | ||
| ) |
Register a link status callback.
| callback | The callback to register. |
| arg | Opaque argument to be passed to the callback. |
| enum mmwlan_status mmwlan_register_rx_cb | ( | mmwlan_rx_cb_t | callback, |
| void * | arg | ||
| ) |
Register a receive callback.
| callback | The callback to register (NULL to unregister). |
| arg | Opaque argument to be passed to the callback. |
| enum mmwlan_status mmwlan_register_rx_pkt_cb | ( | mmwlan_rx_pkt_cb_t | callback, |
| void * | arg | ||
| ) |
Register a receive callback which consumes an mmpkt.
| callback | The callback to register (NULL to unregister). |
| arg | Opaque argument to be passed to the callback. |
| enum mmwlan_status mmwlan_register_tx_flow_control_cb | ( | mmwlan_tx_flow_control_cb_t | cb, |
| void * | arg | ||
| ) |
Register a transmit flow control callback.
This callback will be invoked when the tx data path is paused and when unpaused.
| cb | The callback to register. |
| arg | Opaque argument to pass to the callback. |
|
inlinestatic |
Transmit the given packet using MMWLAN_TX_DEFAULT_QOS_TID.
The packet must start with an 802.3 header that will be translated into an 802.11 header.
| data | Packet data. |
| len | Length of packet. |
| enum mmwlan_status mmwlan_tx_pkt | ( | struct mmpkt * | pkt, |
| const struct mmwlan_tx_metadata * | metadata | ||
| ) |
Transmit the given packet.
The packet must start with an 802.3 header, which will be translated into an 802.11 header by this function.
txbuf before invoking this function.txbuf must be allocated by mmwlan_alloc_mmpkt_for_tx().| pkt | mmpkt containing the packet to transmit. This will be consumed by this function. |
| metadata | Extra information relating to the packet transmission. May be NULL, in which case default values will be used. |
|
inlinestatic |
Transmit the given packet using the given QoS Traffic ID (TID).
The packet must start with an 802.3 header that will be translated into an 802.11 header.
| data | Packet data. |
| len | Length of packet. |
| tid | TID to use (0 - MMWLAN_MAX_QOS_TID). |
| enum mmwlan_status mmwlan_tx_wait_until_ready | ( | uint32_t | timeout_ms | ) |
Blocks until the transmit path is ready for transmit.
| timeout_ms | The maximum time to wait, in milliseconds. If zero then this function does not block. |