nrfxlib API 0.1.0
Loading...
Searching...
No Matches
util.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 __UTIL_H__
13#define __UTIL_H__
14
15#include "osal_api.h"
16#include "host_rpu_umac_if.h"
17
18#ifndef ARRAY_SIZE
19#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
20#endif
21
22/* Convert power from mBm to dBm */
23#define MBM_TO_DBM(gain) ((gain) / 100)
24
25int nrf_wifi_utils_hex_str_to_val(unsigned char *hex_arr,
26 unsigned int hex_arr_sz,
27 unsigned char *str);
28
29bool nrf_wifi_utils_is_mac_addr_valid(const char *mac_addr);
30
32 unsigned short chan);
33#endif /* __UTIL_H__ */
nrf_wifi_band
Represents the values that can be used to specify the frequency band.
Definition: host_rpu_umac_if.h:255
int nrf_wifi_utils_hex_str_to_val(unsigned char *hex_arr, unsigned int hex_arr_sz, unsigned char *str)
bool nrf_wifi_utils_is_mac_addr_valid(const char *mac_addr)
int nrf_wifi_utils_chan_to_freq(enum nrf_wifi_band band, unsigned short chan)