nrfxlib API 0.1.0
Loading...
Searching...
No Matches
nrf_802154_pib.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017, Nordic Semiconductor ASA
3 * All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright notice, this
11 * list of conditions and the following disclaimer.
12 *
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
18 * contributors may be used to endorse or promote products derived from this
19 * software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 *
33 */
34
40#ifndef NRF_802154_PIB_H_
41#define NRF_802154_PIB_H_
42
43#include <stdbool.h>
44#include <stdint.h>
45
46#include "nrf_802154.h"
47
48#ifdef __cplusplus
49extern "C" {
50#endif
51
56
64
71
79
86
94
101
109
116
123
129void nrf_802154_pib_channel_set(uint8_t channel);
130
137
144
150const uint8_t * nrf_802154_pib_pan_id_get(void);
151
159void nrf_802154_pib_pan_id_set(const uint8_t * p_pan_id);
160
167
175void nrf_802154_pib_extended_address_set(const uint8_t * p_extended_address);
176
183
191void nrf_802154_pib_short_address_set(const uint8_t * p_short_address);
192
200
207
217
224
234
241
242#if NRF_802154_CSMA_CA_ENABLED
251bool nrf_802154_pib_csmaca_min_be_set(uint8_t min_be);
252
258uint8_t nrf_802154_pib_csmaca_min_be_get(void);
259
268bool nrf_802154_pib_csmaca_max_be_set(uint8_t max_be);
269
275uint8_t nrf_802154_pib_csmaca_max_be_get(void);
276
283void nrf_802154_pib_csmaca_max_backoffs_set(uint8_t max_backoffs);
284
291uint8_t nrf_802154_pib_csmaca_max_backoffs_get(void);
292#endif // NRF_802154_CSMA_CA_ENABLED
293
294#if NRF_802154_IFS_ENABLED
300nrf_802154_ifs_mode_t nrf_802154_pib_ifs_mode_get(void);
301
310bool nrf_802154_pib_ifs_mode_set(nrf_802154_ifs_mode_t mode);
311
317uint16_t nrf_802154_pib_ifs_min_sifs_period_get(void);
318
326void nrf_802154_pib_ifs_min_sifs_period_set(uint16_t period);
327
333uint16_t nrf_802154_pib_ifs_min_lifs_period_get(void);
334
340void nrf_802154_pib_ifs_min_lifs_period_set(uint16_t period);
341#endif // NRF_802154_IFS_ENABLED
342
343#if NRF_802154_TEST_MODES_ENABLED
349nrf_802154_test_mode_csmaca_backoff_t nrf_802154_pib_test_mode_csmaca_backoff_get(void);
350
356void nrf_802154_pib_test_mode_csmaca_backoff_set(nrf_802154_test_mode_csmaca_backoff_t value);
357
358#endif // NRF_802154_TEST_MODES_ENABLED
359
360#ifdef __cplusplus
361}
362#endif
363
364#endif /* NRF_802154_PIB_H_ */
uint8_t nrf_802154_coex_tx_request_mode_t
Mode of triggering transmit request to Coex arbiter.
Definition: nrf_802154_types.h:237
uint8_t nrf_802154_ifs_mode_t
Mode of handling Interframe spacing.
Definition: nrf_802154_types.h:252
uint8_t nrf_802154_test_mode_csmaca_backoff_t
Type holding the CSMA/CA backoff control test mode.
Definition: nrf_802154_types.h:208
uint8_t nrf_802154_coex_rx_request_mode_t
Mode of triggering receive request to Coex arbiter.
Definition: nrf_802154_types.h:222
const uint8_t * nrf_802154_pib_extended_address_get(void)
Gets the extended address of this device.
const uint8_t * nrf_802154_pib_pan_id_get(void)
Gets the PAN ID used by this device.
uint8_t nrf_802154_pib_channel_get(void)
Gets the currently used channel.
nrf_802154_coex_rx_request_mode_t nrf_802154_pib_coex_rx_request_mode_get(void)
Gets Coex request mode used in receive operations.
bool nrf_802154_pib_auto_ack_get(void)
Checks if the auto ACK procedure is enabled.
void nrf_802154_pib_tx_power_set(int8_t dbm)
Sets the transmit power used for ACK frames.
bool nrf_802154_pib_pan_coord_get(void)
Checks if the radio is configured as the PAN coordinator.
void nrf_802154_pib_channel_set(uint8_t channel)
Sets the channel that will be used by the driver.
void nrf_802154_pib_extended_address_set(const uint8_t *p_extended_address)
Sets the extended address of this device.
void nrf_802154_pib_auto_ack_set(bool enabled)
Enables or disables the auto ACK procedure.
void nrf_802154_pib_cca_cfg_set(const nrf_802154_cca_cfg_t *p_cca_cfg)
Sets the radio CCA mode and threshold.
void nrf_802154_pib_pan_coord_set(bool enabled)
Configures the device as the PAN coordinator.
void nrf_802154_pib_pan_id_set(const uint8_t *p_pan_id)
Sets the PAN ID used by this device.
nrf_802154_coex_tx_request_mode_t nrf_802154_pib_coex_tx_request_mode_get(void)
Gets Coex request mode used in transmit operations.
const uint8_t * nrf_802154_pib_short_address_get(void)
Gets the short address of this device.
bool nrf_802154_pib_rx_on_when_idle_get(void)
Checks if the RxOnWhenIdle mode is enabled.
int8_t nrf_802154_pib_tx_power_get(void)
Gets the transmit power.
void nrf_802154_pib_init(void)
Module that implements the storage of PIB attributes in the nRF 802.15.4 radio driver.
void nrf_802154_pib_rx_on_when_idle_set(bool enabled)
Enables or disables the RxOnWhenIdle mode.
void nrf_802154_pib_short_address_set(const uint8_t *p_short_address)
Sets the short address of this device.
bool nrf_802154_pib_coex_tx_request_mode_set(nrf_802154_coex_tx_request_mode_t mode)
Sets Coex request mode used in transmit operations.
bool nrf_802154_pib_coex_rx_request_mode_set(nrf_802154_coex_rx_request_mode_t mode)
Sets Coex request mode used in receive operations.
void nrf_802154_pib_cca_cfg_get(nrf_802154_cca_cfg_t *p_cca_cfg)
Gets the current radio CCA configuration.
void nrf_802154_pib_promiscuous_set(bool enabled)
Enables or disables the promiscuous mode.
bool nrf_802154_pib_promiscuous_get(void)
Checks if the promiscuous mode is enabled.
Structure for configuring CCA.
Definition: nrf_802154_types.h:163