![]() |
Morse Micro IoT SDK
2.9.7
|
API for communicating with the WLAN transceiver.
There are different interfaces supported for communicating with the transceiver:
Modules | |
| WLAN HAL API for SPI interface | |
| API for communicating with the WLAN transceiver over an SPI interface. | |
| WLAN HAL API for packet memory allocation | |
| API for allocating and freeing packet memory. | |
| WLAN HAL API for SDIO interface | |
| API for communicating with the WLAN transceiver over an SDIO interface. | |
Data Structures | |
| struct | mmhal_robuf |
| Read-only buffer data structure. More... | |
Macros | |
| #define | MMHAL_WLAN_FW_BCF_MIN_READ_LENGTH (4) |
| Minimum length of data to be returned by mmhal_wlan_read_bcf_file() and mmhal_wlan_read_fw_file(). More... | |
| #define | MMHAL_WLAN_MMPKT_TX_MAX_SIZE (1664) |
| This value represents the maximum size of a TX packet that can be allocated within the TX pool. More... | |
| #define | MMHAL_WLAN_MMPKT_RX_MAX_SIZE (1668) |
| This value represents the maximum size of a RX packet that can be allocated within the RX pool. More... | |
| #define | MMPKTMEM_TX_POOL_N_BLOCKS (20) |
| Size of the TX pool in blocks. More... | |
| #define | MMPKTMEM_RX_POOL_N_BLOCKS (23) |
| Size of the RX pool in blocks. More... | |
Typedefs | |
| typedef void(* | mmhal_irq_handler_t) (void) |
| Function prototype for interrupt handler callbacks. More... | |
Functions | |
| void | mmhal_wlan_init (void) |
| Initialize the WLAN HAL. More... | |
| void | mmhal_wlan_deinit (void) |
| Deinitialize the WLAN HAL. More... | |
| void | mmhal_read_mac_addr (uint8_t *mac_addr) |
| Get MAC address override. More... | |
| void | mmhal_wlan_wake_assert (void) |
| Assert the WLAN wake pin. | |
| void | mmhal_wlan_wake_deassert (void) |
| Deassert the WLAN wake pin. | |
| bool | mmhal_wlan_busy_is_asserted (void) |
| Tests whether the busy pin is currently asserted. More... | |
| void | mmhal_wlan_register_busy_irq_handler (mmhal_irq_handler_t handler) |
| Register a handler for busy interrupts. More... | |
| void | mmhal_wlan_set_busy_irq_enabled (bool enabled) |
| Sets whether the busy interrupt is enabled. More... | |
| void | mmhal_wlan_read_bcf_file (uint32_t offset, uint32_t requested_len, struct mmhal_robuf *robuf) |
| Retrieves the content of the Morse Micro Board Configuration File and places it into the given buffer. More... | |
| void | mmhal_wlan_read_fw_file (uint32_t offset, uint32_t requested_len, struct mmhal_robuf *robuf) |
| Retrieves the content of the Morse Micro Chip Firmware and places it into the given buffer. More... | |
| #define MMHAL_WLAN_FW_BCF_MIN_READ_LENGTH (4) |
Minimum length of data to be returned by mmhal_wlan_read_bcf_file() and mmhal_wlan_read_fw_file().
Definition at line 182 of file mmhal_wlan.h.
| #define MMHAL_WLAN_MMPKT_RX_MAX_SIZE (1668) |
This value represents the maximum size of a RX packet that can be allocated within the RX pool.
It includes the packet size and the RX metadata
Definition at line 456 of file mmhal_wlan.h.
| #define MMHAL_WLAN_MMPKT_TX_MAX_SIZE (1664) |
This value represents the maximum size of a TX packet that can be allocated within the TX pool.
It includes the packet size and the TX metadata.
Definition at line 450 of file mmhal_wlan.h.
| #define MMPKTMEM_RX_POOL_N_BLOCKS (23) |
Size of the RX pool in blocks.
Definition at line 471 of file mmhal_wlan.h.
| #define MMPKTMEM_TX_POOL_N_BLOCKS (20) |
Size of the TX pool in blocks.
Definition at line 462 of file mmhal_wlan.h.
| typedef void(* mmhal_irq_handler_t) (void) |
Function prototype for interrupt handler callbacks.
Definition at line 42 of file mmhal_wlan.h.
| void mmhal_read_mac_addr | ( | uint8_t * | mac_addr | ) |
Get MAC address override.
This function allows the HAL to override the MAC address to be used by the device. The MAC address override should be written to mac_addr. If no override is required then mac_addr should be left untouched.
| mac_addr | Location where the MAC address will be stored. When called this will contain the MAC address provided by the transceiver if available or all zeros if no MAC address is available from the transceiver. |
| bool mmhal_wlan_busy_is_asserted | ( | void | ) |
Tests whether the busy pin is currently asserted.
true if asserted, else false. | void mmhal_wlan_deinit | ( | void | ) |
Deinitialize the WLAN HAL.
Things to do here may include:
| void mmhal_wlan_init | ( | void | ) |
Initialize the WLAN HAL.
Things to do here may include:
| void mmhal_wlan_read_bcf_file | ( | uint32_t | offset, |
| uint32_t | requested_len, | ||
| struct mmhal_robuf * | robuf | ||
| ) |
Retrieves the content of the Morse Micro Board Configuration File and places it into the given buffer.
| offset | Offset from which to start reading the bcf |
| requested_len | Length of data we would like to read. The length of the data returned by this function may be less than requested_len, but must be at least MMHAL_WLAN_FW_BCF_MIN_READ_LENGTH. |
| robuf | Read-only buffer data structure to be filled out by this function. |
robuf->buf to NULL. robuf before invoking the function. robuf->free_cb and calling when the buffer is no longer required. Ignored if robuf->free_cb is NULL. | void mmhal_wlan_read_fw_file | ( | uint32_t | offset, |
| uint32_t | requested_len, | ||
| struct mmhal_robuf * | robuf | ||
| ) |
Retrieves the content of the Morse Micro Chip Firmware and places it into the given buffer.
| offset | Offset from which to start reading the bcf |
| requested_len | Length of data we would like to read. The length of the data returned by this function may be less than requested_len, but must be at least MMHAL_WLAN_FW_BCF_MIN_READ_LENGTH. |
| robuf | Read-only buffer data structure to be filled out by this function. |
robuf->buf to NULL. robuf before invoking the function. robuf->free_cb and calling when the buffer is no longer required. Ignored if robuf->free_cb is NULL. | void mmhal_wlan_register_busy_irq_handler | ( | mmhal_irq_handler_t | handler | ) |
Register a handler for busy interrupts.
| handler | The handler to register. |
| void mmhal_wlan_set_busy_irq_enabled | ( | bool | enabled | ) |
Sets whether the busy interrupt is enabled.
| enabled | true to enable or false to disable. |