nrfxlib API 0.1.0
Loading...
Searching...
No Matches
bal_api.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_API_H__
13#define __BAL_API_H__
14
15#include "osal_api.h"
16#include "bal_structs.h"
17
34 enum nrf_wifi_status (*intr_callbk_fn)(void *hal_ctx));
35
36
49
60 void *hal_dev_ctx);
61
71
81
91
100unsigned int nrf_wifi_bal_read_word(void *ctx, unsigned long addr_offset);
101
112 unsigned long addr_offset,
113 unsigned int val);
114
126 void *dest_addr,
127 unsigned long src_addr_offset,
128 size_t len);
129
141 unsigned long dest_addr_offset,
142 const void *src_addr,
143 size_t len);
144
155unsigned long nrf_wifi_bal_dma_map(void *ctx,
156 unsigned long virt_addr,
157 size_t len,
158 enum nrf_wifi_osal_dma_dir dma_dir);
159
170unsigned long nrf_wifi_bal_dma_unmap(void *ctx,
171 unsigned long phy_addr,
172 size_t len,
173 enum nrf_wifi_osal_dma_dir dma_dir);
174
183
192
201
202#if defined(CONFIG_NRF_WIFI_LOW_POWER) || defined(__DOXYGEN__)
210void nrf_wifi_bal_rpu_ps_sleep(void *ctx);
211
219void nrf_wifi_bal_rpu_ps_wake(void *ctx);
220
228int nrf_wifi_bal_rpu_ps_status(void *ctx);
229#endif /* CONFIG_NRF_WIFI_LOW_POWER */
230#endif /* __BAL_API_H__ */
unsigned long nrf_wifi_bal_dma_unmap(void *ctx, unsigned long phy_addr, size_t len, enum nrf_wifi_osal_dma_dir dma_dir)
Unmap a physical address for DMA transfer.
void nrf_wifi_bal_write_block(void *ctx, unsigned long dest_addr_offset, const void *src_addr, size_t len)
Write a block of data to a specific address offset.
enum nrf_wifi_status nrf_wifi_bal_dev_init(struct nrf_wifi_bal_dev_ctx *bal_dev_ctx)
Initialize a device context in the BAL layer.
struct nrf_wifi_bal_priv * nrf_wifi_bal_init(struct nrf_wifi_bal_cfg_params *cfg_params, enum nrf_wifi_status(*intr_callbk_fn)(void *hal_ctx))
Header containing the API declarations for the Bus Abstraction Layer (BAL) of the Wi-Fi driver.
void nrf_wifi_bal_bus_access_cnt_print(void *ctx)
Print bus access count.
void nrf_wifi_bal_dev_rem(struct nrf_wifi_bal_dev_ctx *bal_dev_ctx)
Remove a device context from the BAL layer.
unsigned int nrf_wifi_bal_read_word(void *ctx, unsigned long addr_offset)
Read a word from a specific address offset.
void nrf_wifi_bal_dev_deinit(struct nrf_wifi_bal_dev_ctx *bal_dev_ctx)
Deinitialize a device context in the BAL layer.
void nrf_wifi_bal_write_word(void *ctx, unsigned long addr_offset, unsigned int val)
Write a word to a specific address offset.
void nrf_wifi_bal_bus_access_rec_disab(void *ctx)
Disable bus access recording.
unsigned long nrf_wifi_bal_dma_map(void *ctx, unsigned long virt_addr, size_t len, enum nrf_wifi_osal_dma_dir dma_dir)
Map a virtual address to a physical address for DMA transfer.
void nrf_wifi_bal_read_block(void *ctx, void *dest_addr, unsigned long src_addr_offset, size_t len)
Read a block of data from a specific address offset.
struct nrf_wifi_bal_dev_ctx * nrf_wifi_bal_dev_add(struct nrf_wifi_bal_priv *bpriv, void *hal_dev_ctx)
Add a device context to the BAL layer.
void nrf_wifi_bal_bus_access_rec_enab(void *ctx)
Enable bus access recording.
void nrf_wifi_bal_deinit(struct nrf_wifi_bal_priv *bpriv)
Deinitialize the BAL layer.
Header containing the structure declarations for the Bus Abstraction Layer (BAL) of the Wi-Fi driver.
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
Structure holding configuration parameters for the BAL.
Definition: bal_structs.h:23
void * hal_dev_ctx
Definition: bal_structs.h:51
struct nrf_wifi_bal_priv * bpriv
Definition: bal_structs.h:49
Structure holding the device context for the BAL.
Definition: bal_structs.h:47
enum nrf_wifi_status(* intr_callbk_fn)(void *ctx)
Definition: bal_structs.h:41
Structure holding context information for the BAL.
Definition: bal_structs.h:31