nrfxlib API 0.1.0
|
File containing OPs declarations for the OSAL Layer of the Wi-Fi driver. More...
#include <osal_ops.h>
Data Fields | |
void *(* | mem_alloc )(size_t size) |
Allocate memory. | |
void *(* | mem_zalloc )(size_t size) |
Allocate zero-initialized memory. | |
void(* | mem_free )(void *buf) |
Free allocated memory. | |
void *(* | mem_cpy )(void *dest, const void *src, size_t count) |
Copy memory. | |
void *(* | mem_set )(void *start, int val, size_t size) |
Set memory. | |
int(* | mem_cmp )(const void *addr1, const void *addr2, size_t size) |
Compare memory. | |
void *(* | iomem_mmap )(unsigned long addr, unsigned long size) |
Map IO memory into CPU space. | |
void(* | iomem_unmap )(volatile void *addr) |
Unmap IO memory from CPU space. | |
unsigned int(* | iomem_read_reg32 )(const volatile void *addr) |
Read a 32-bit value from a device register using a memory mapped address. | |
void(* | iomem_write_reg32 )(volatile void *addr, unsigned int val) |
Write a 32-bit value to a device register using a memory mapped address. | |
void(* | iomem_cpy_from )(void *dest, const volatile void *src, size_t count) |
Copy data from memory mapped device memory to host memory. | |
void(* | iomem_cpy_to )(volatile void *dest, const void *src, size_t count) |
Copy data from host memory to memory mapped device memory. | |
unsigned int(* | qspi_read_reg32 )(void *priv, unsigned long addr) |
Read a 32-bit value from a QSPI device register. | |
void(* | qspi_write_reg32 )(void *priv, unsigned long addr, unsigned int val) |
Write a 32-bit value to a QSPI device register. | |
void(* | qspi_cpy_from )(void *priv, void *dest, unsigned long addr, size_t count) |
Copy data from QSPI device memory to host memory. | |
void(* | qspi_cpy_to )(void *priv, unsigned long addr, const void *src, size_t count) |
Copy data from host memory to QSPI device memory. | |
unsigned int(* | spi_read_reg32 )(void *priv, unsigned long addr) |
Read a 32-bit value from a SPI device register. | |
void(* | spi_write_reg32 )(void *priv, unsigned long addr, unsigned int val) |
Write a 32-bit value to a SPI device register. | |
void(* | spi_cpy_from )(void *priv, void *dest, unsigned long addr, size_t count) |
Copy data from SPI device memory to host memory. | |
void(* | spi_cpy_to )(void *priv, unsigned long addr, const void *src, size_t count) |
Copy data from host memory to SPI device memory. | |
void *(* | spinlock_alloc )(void) |
Allocate a spinlock. | |
void(* | spinlock_free )(void *lock) |
Free a spinlock. | |
void(* | spinlock_init )(void *lock) |
Initialize a spinlock. | |
void(* | spinlock_take )(void *lock) |
Acquire a spinlock. | |
void(* | spinlock_rel )(void *lock) |
Release a spinlock. | |
void(* | spinlock_irq_take )(void *lock, unsigned long *flags) |
Save interrupt states, disable interrupts, and acquire a spinlock. | |
void(* | spinlock_irq_rel )(void *lock, unsigned long *flags) |
Restore interrupt states and release a spinlock. | |
int(* | log_dbg )(const char *fmt, va_list args) |
Log a debug message. | |
int(* | log_info )(const char *fmt, va_list args) |
Log an informational message. | |
int(* | log_err )(const char *fmt, va_list args) |
Log an error message. | |
void *(* | llist_node_alloc )(void) |
Allocate a linked list node. | |
void(* | llist_node_free )(void *node) |
Free a linked list node. | |
void *(* | llist_node_data_get )(void *node) |
Get the pointer to the data which the linked list node points to. | |
void(* | llist_node_data_set )(void *node, void *data) |
Store the pointer to the data in the linked list node. | |
void *(* | llist_alloc )(void) |
Allocate a linked list. | |
void(* | llist_free )(void *llist) |
Free a linked list. | |
void(* | llist_init )(void *llist) |
Initialize a linked list. | |
void(* | llist_add_node_tail )(void *llist, void *llist_node) |
Add a linked list node to the tail of a linked list. | |
void(* | llist_add_node_head )(void *llist, void *llist_node) |
Add a linked list node to the head of a linked list. | |
void *(* | llist_get_node_head )(void *llist) |
Return the head node from a linked list. | |
void *(* | llist_get_node_nxt )(void *llist, void *llist_node) |
Return the node next to the given node in the linked list. | |
void(* | llist_del_node )(void *llist, void *llist_node) |
Remove a node from the linked list. | |
unsigned int(* | llist_len )(void *llist) |
Return the length of the linked list. | |
void *(* | nbuf_alloc )(unsigned int size) |
Allocate a network buffer. | |
void(* | nbuf_free )(void *nbuf) |
Free a network buffer. | |
void(* | nbuf_headroom_res )(void *nbuf, unsigned int size) |
Reserve headroom at the beginning of the data area of a network buffer. | |
unsigned int(* | nbuf_headroom_get )(void *nbuf) |
Get the size of the reserved headroom at the beginning of the data area of a network buffer. | |
unsigned int(* | nbuf_data_size )(void *nbuf) |
Get the size of the data area of a network buffer. | |
void *(* | nbuf_data_get )(void *nbuf) |
Get the pointer to the data area of a network buffer. | |
void *(* | nbuf_data_put )(void *nbuf, unsigned int size) |
Increase the data area of a network buffer at the end of the area. | |
void *(* | nbuf_data_push )(void *nbuf, unsigned int size) |
Increase the data area of a network buffer at the start of the area. | |
void *(* | nbuf_data_pull )(void *nbuf, unsigned int size) |
Decrease the data area of a network buffer at the start of the area. | |
unsigned char(* | nbuf_get_priority )(void *nbuf) |
Get the priority of a network buffer. | |
unsigned char(* | nbuf_get_chksum_done )(void *nbuf) |
Get the checksum status of a network buffer. | |
void(* | nbuf_set_chksum_done )(void *nbuf, unsigned char chksum_done) |
Set the checksum status of a network buffer. | |
void *(* | tasklet_alloc )(int type) |
Allocate a tasklet structure. | |
void(* | tasklet_free )(void *tasklet) |
Free a tasklet structure. | |
void(* | tasklet_init )(void *tasklet, void(*callback)(unsigned long), unsigned long data) |
Initialize a tasklet structure. | |
void(* | tasklet_schedule )(void *tasklet) |
Schedule a tasklet. | |
void(* | tasklet_kill )(void *tasklet) |
Terminate a tasklet. | |
int(* | sleep_ms )(int msecs) |
Sleep for a specified number of milliseconds. | |
int(* | delay_us )(int usecs) |
Delay for a specified number of microseconds. | |
unsigned long(* | time_get_curr_us )(void) |
Get the current time of the day in microseconds. | |
unsigned int(* | time_elapsed_us )(unsigned long start_time) |
Return the time elapsed in microseconds since a specified time instant. | |
void *(* | bus_pcie_init )(const char *dev_name, unsigned int vendor_id, unsigned int sub_vendor_id, unsigned int device_id, unsigned int sub_device_id) |
Initialize the PCIe bus. | |
void(* | bus_pcie_deinit )(void *os_pcie_priv) |
Deinitialize the PCIe bus. | |
void *(* | bus_pcie_dev_add )(void *pcie_priv, void *osal_pcie_dev_ctx) |
Add a PCIe device to the bus. | |
void(* | bus_pcie_dev_rem )(void *os_pcie_dev_ctx) |
Remove a PCIe device from the bus. | |
enum nrf_wifi_status(* | bus_pcie_dev_init )(void *os_pcie_dev_ctx) |
Initialize a PCIe device. | |
void(* | bus_pcie_dev_deinit )(void *os_pcie_dev_ctx) |
Deinitialize a PCIe device. | |
enum nrf_wifi_status(* | bus_pcie_dev_intr_reg )(void *os_pcie_dev_ctx, void *callbk_data, int(*callback_fn)(void *callbk_data)) |
Register an interrupt handler for a PCIe device. | |
void(* | bus_pcie_dev_intr_unreg )(void *os_pcie_dev_ctx) |
Unregister the interrupt handler for a PCIe device. | |
void *(* | bus_pcie_dev_dma_map )(void *os_pcie_dev_ctx, void *virt_addr, size_t size, enum nrf_wifi_osal_dma_dir dir) |
Map a DMA buffer for a PCIe device. | |
void(* | bus_pcie_dev_dma_unmap )(void *os_pcie_dev_ctx, void *dma_addr, size_t size, enum nrf_wifi_osal_dma_dir dir) |
Unmap a DMA buffer for a PCIe device. | |
void(* | bus_pcie_dev_host_map_get )(void *os_pcie_dev_ctx, struct nrf_wifi_osal_host_map *host_map) |
Get the host mapping of a PCIe device. | |
void *(* | bus_qspi_init )(void) |
Initialize the QSPI bus. | |
void(* | bus_qspi_deinit )(void *os_qspi_priv) |
Deinitialize the QSPI bus. | |
void *(* | bus_qspi_dev_add )(void *qspi_priv, void *osal_qspi_dev_ctx) |
Add a QSPI device to the bus. | |
void(* | bus_qspi_dev_rem )(void *os_qspi_dev_ctx) |
Remove a QSPI device from the bus. | |
enum nrf_wifi_status(* | bus_qspi_dev_init )(void *os_qspi_dev_ctx) |
Initialize a QSPI device. | |
void(* | bus_qspi_dev_deinit )(void *os_qspi_dev_ctx) |
Deinitialize a QSPI device. | |
enum nrf_wifi_status(* | bus_qspi_dev_intr_reg )(void *os_qspi_dev_ctx, void *callbk_data, int(*callback_fn)(void *callbk_data)) |
Register an interrupt handler for a QSPI device. | |
void(* | bus_qspi_dev_intr_unreg )(void *os_qspi_dev_ctx) |
Unregister the interrupt handler for a QSPI device. | |
void(* | bus_qspi_dev_host_map_get )(void *os_qspi_dev_ctx, struct nrf_wifi_osal_host_map *host_map) |
Get the host mapping of a QSPI device. | |
void *(* | bus_spi_init )(void) |
Initialize the SPI bus. | |
void(* | bus_spi_deinit )(void *os_spi_priv) |
Deinitialize the SPI bus. | |
void *(* | bus_spi_dev_add )(void *spi_priv, void *osal_spi_dev_ctx) |
Add a SPI device to the bus. | |
void(* | bus_spi_dev_rem )(void *os_spi_dev_ctx) |
Remove a SPI device from the bus. | |
enum nrf_wifi_status(* | bus_spi_dev_init )(void *os_spi_dev_ctx) |
Initialize a SPI device. | |
void(* | bus_spi_dev_deinit )(void *os_spi_dev_ctx) |
Deinitialize a SPI device. | |
enum nrf_wifi_status(* | bus_spi_dev_intr_reg )(void *os_spi_dev_ctx, void *callbk_data, int(*callback_fn)(void *callbk_data)) |
Register an interrupt handler for a SPI device. | |
void(* | bus_spi_dev_intr_unreg )(void *os_spi_dev_ctx) |
Unregister the interrupt handler for a SPI device. | |
void(* | bus_spi_dev_host_map_get )(void *os_spi_dev_ctx, struct nrf_wifi_osal_host_map *host_map) |
Get the host mapping of a SPI device. | |
void(* | assert )(int test_val, int val, enum nrf_wifi_assert_op_type op, char *assert_msg) |
Assert a condition and display an error message if the condition is false. | |
unsigned int(* | strlen )(const void *str) |
Get the length of a string. | |
File containing OPs declarations for the OSAL Layer of the Wi-Fi driver.
struct nrf_wifi_osal_ops - Ops to be provided by a specific OS implementation.
This structure exposes Ops which need to be implemented by the underlying OS in order for the WLAN driver to work. The Ops can be directly mapped to OS primitives where a one-to-one mapping is available. In case a mapping is not available, an equivalent function will need to be implemented and that function will then need to be mapped to the corresponding Op.