![]() |
Morse Micro IoT SDK
2.6.4-esp32
|
API for allocating and freeing packet memory.
Data Structures | |
| struct | mmhal_wlan_pktmem_init_args |
| Initialization arguments passed to mmhal_wlan_pktmem_init(). More... | |
Typedefs | |
| typedef void(* | mmhal_wlan_pktmem_tx_flow_control_cb_t) (enum mmwlan_tx_flow_control_state state) |
| Flow control callback that can be invoked by the transmit packet memory manager to pause and resume the data path in response to resource availability. More... | |
Enumerations | |
| enum | mmhal_wlan_pkt_class { MMHAL_WLAN_PKT_DATA_TID0 , MMHAL_WLAN_PKT_DATA_TID1 , MMHAL_WLAN_PKT_DATA_TID2 , MMHAL_WLAN_PKT_DATA_TID3 , MMHAL_WLAN_PKT_DATA_TID4 , MMHAL_WLAN_PKT_DATA_TID5 , MMHAL_WLAN_PKT_DATA_TID6 , MMHAL_WLAN_PKT_DATA_TID7 , MMHAL_WLAN_PKT_MANAGEMENT , MMHAL_WLAN_PKT_COMMAND } |
| Enumeration of packet classes used by mmhal_wlan_alloc_mmpkt_for_tx(). More... | |
Functions | |
| void | mmhal_wlan_pktmem_init (struct mmhal_wlan_pktmem_init_args *args) |
| Invoked by the driver to initialize the packet memory in the HAL. More... | |
| void | mmhal_wlan_pktmem_deinit (void) |
| Invoked by the driver to deinitialize the packet memory in the HAL. More... | |
| struct mmpkt * | mmhal_wlan_alloc_mmpkt_for_tx (uint8_t pkt_class, uint32_t space_at_start, uint32_t space_at_end, uint32_t metadata_length) |
| Allocates an mmpkt for transmission. More... | |
| struct mmpkt * | mmhal_wlan_alloc_mmpkt_for_rx (uint32_t capacity, uint32_t metadata_length) |
| Allocates an mmpkt for reception. More... | |
| typedef void(* mmhal_wlan_pktmem_tx_flow_control_cb_t) (enum mmwlan_tx_flow_control_state state) |
Flow control callback that can be invoked by the transmit packet memory manager to pause and resume the data path in response to resource availability.
| state | Current flow control state. |
Definition at line 355 of file mmhal_wlan.h.
| enum mmhal_wlan_pkt_class |
Enumeration of packet classes used by mmhal_wlan_alloc_mmpkt_for_tx().
These definitions must match the corresponding values in mmdrv_pkt_class.
Definition at line 382 of file mmhal_wlan.h.
| struct mmpkt * mmhal_wlan_alloc_mmpkt_for_rx | ( | uint32_t | capacity, |
| uint32_t | metadata_length | ||
| ) |
Allocates an mmpkt for reception.
| capacity | Amount of space to allocate for data. |
| metadata_length | Amount of space to allocate for metadata (used internally by the Morse driver). |
NULL on allocation failure. | struct mmpkt * mmhal_wlan_alloc_mmpkt_for_tx | ( | uint8_t | pkt_class, |
| uint32_t | space_at_start, | ||
| uint32_t | space_at_end, | ||
| uint32_t | metadata_length | ||
| ) |
Allocates an mmpkt for transmission.
When the pool of mmpkt buffers available for TX is exhausted, the HAL should pause the TX path using the flow control callback that was registered when mmhal_wlan_pktmem_init() was invoked. Similarly, when the buffers become available again (and assuming the TX path is not otherwise blocked) the driver should unpause the TX path.
| pkt_class | The class of packet (to allow for prioritization). |
| space_at_start | Amount of space to allocate at start of mmpkt (for prepend). |
| space_at_end | Amount of space to allocate at end of mmpkt (for append). |
| metadata_length | Amount of space to allocate for metadata (used internally by the Morse driver). |
NULL on allocation failure. | void mmhal_wlan_pktmem_deinit | ( | void | ) |
Invoked by the driver to deinitialize the packet memory in the HAL.
This can free reserved memory and check for memory leaks.
| void mmhal_wlan_pktmem_init | ( | struct mmhal_wlan_pktmem_init_args * | args | ) |
Invoked by the driver to initialize the packet memory in the HAL.
| args | Initialization arguments. |