nrfxlib API 0.1.0
Loading...
Searching...
No Matches
bal_ops.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
12#ifndef __BAL_OPS_H__
13#define __BAL_OPS_H__
14
29 void * (*init)(void *cfg_params,
30 enum nrf_wifi_status (*intr_callbk_fn)(void *hal_ctx));
31
37 void (*deinit)(void *bus_priv);
38
46 void * (*dev_add)(void *bus_priv,
47 void *bal_dev_ctx);
48
54 void (*dev_rem)(void *bus_dev_ctx);
55
62 enum nrf_wifi_status (*dev_init)(void *bus_dev_ctx);
63
69 void (*dev_deinit)(void *bus_dev_ctx);
70
78 unsigned int (*read_word)(void *bus_dev_ctx,
79 unsigned long addr_offset);
80
88 void (*write_word)(void *bus_dev_ctx,
89 unsigned long addr_offset,
90 unsigned int val);
91
100 void (*read_block)(void *bus_dev_ctx,
101 void *dest_addr,
102 unsigned long src_addr_offset,
103 size_t len);
104
113 void (*write_block)(void *bus_dev_ctx,
114 unsigned long dest_addr_offset,
115 const void *src_addr,
116 size_t len);
117
127 unsigned long (*dma_map)(void *bus_dev_ctx,
128 unsigned long virt_addr,
129 size_t len,
130 enum nrf_wifi_osal_dma_dir dma_dir);
131
141 unsigned long (*dma_unmap)(void *bus_dev_ctx,
142 unsigned long phy_addr,
143 size_t len,
144 enum nrf_wifi_osal_dma_dir dma_dir);
145
146#if defined(CONFIG_NRF_WIFI_LOW_POWER) || defined(__DOXYGEN__)
152 void (*rpu_ps_sleep)(void *bus_dev_ctx);
153
159 void (*rpu_ps_wake)(void *bus_dev_ctx);
160
167 int (*rpu_ps_status)(void *bus_dev_ctx);
168#endif /* CONFIG_NRF_WIFI_LOW_POWER */
169};
170
177#endif /* __BAL_OPS_H__ */
struct nrf_wifi_bal_ops * get_bus_ops(void)
Get the bus operations.
nrf_wifi_status
The status of an operation performed by the RPU driver.
Definition: osal_structs.h:29
nrf_wifi_osal_dma_dir
DMA direction for a DMA operation.
Definition: osal_structs.h:39
void(* dev_rem)(void *bus_dev_ctx)
Remove a device from the bus.
Definition: bal_ops.h:54
unsigned long(* dma_unmap)(void *bus_dev_ctx, unsigned long phy_addr, size_t len, enum nrf_wifi_osal_dma_dir dma_dir)
Unmap a DMA buffer.
Definition: bal_ops.h:141
void(* write_block)(void *bus_dev_ctx, unsigned long dest_addr_offset, const void *src_addr, size_t len)
Write a block of data to the bus.
Definition: bal_ops.h:113
void(* read_block)(void *bus_dev_ctx, void *dest_addr, unsigned long src_addr_offset, size_t len)
Read a block of data from the bus.
Definition: bal_ops.h:100
void(* dev_deinit)(void *bus_dev_ctx)
Deinitialize a device on the bus.
Definition: bal_ops.h:69
unsigned long(* dma_map)(void *bus_dev_ctx, unsigned long virt_addr, size_t len, enum nrf_wifi_osal_dma_dir dma_dir)
Map a DMA buffer.
Definition: bal_ops.h:127
enum nrf_wifi_status(* dev_init)(void *bus_dev_ctx)
Initialize a device on the bus.
Definition: bal_ops.h:62
unsigned int(* read_word)(void *bus_dev_ctx, unsigned long addr_offset)
Read a word from the bus.
Definition: bal_ops.h:78
void(* write_word)(void *bus_dev_ctx, unsigned long addr_offset, unsigned int val)
Write a word to the bus.
Definition: bal_ops.h:88
void(* deinit)(void *bus_priv)
Deinitialize the bus.
Definition: bal_ops.h:37
Header containing the OPs declarations for the Bus Abstraction Layer (BAL) of the Wi-Fi driver.
Definition: bal_ops.h:21