Loading...
Searching...
No Matches
nrf24l01p_ng_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Otto-von-Guericke-Universität Magdeburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "periph/gpio.h"
20#include "periph/spi.h"
21#include "kernel_defines.h"
23#include "nrf24l01p_ng.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#ifndef NRF24L01P_NG_PARAM_SPI
33#define NRF24L01P_NG_PARAM_SPI SPI_DEV(0)
34#endif
35
36#ifndef NRF24L01P_NG_PARAM_SPI_CLK
40#define NRF24L01P_NG_PARAM_SPI_CLK SPI_CLK_5MHZ
41#endif
42
43#ifndef NRF24L01P_NG_PARAM_CS
47#define NRF24L01P_NG_PARAM_CS GPIO_UNDEF
48#endif
49
50#ifndef NRF24L01P_NG_PARAM_CE
54#define NRF24L01P_NG_PARAM_CE GPIO_UNDEF
55#endif
56
57#ifndef NRF24L01P_NG_PARAM_IRQ
61#define NRF24L01P_NG_PARAM_IRQ GPIO_UNDEF
62#endif
63
64#ifndef NRF24L01P_NG_PARAM_CRC_LEN
69#define NRF24L01P_NG_PARAM_CRC_LEN (NRF24L01P_NG_CRC_2BYTE)
70#endif
71
72#ifndef NRF24L01P_NG_PARAM_TX_POWER
77#define NRF24L01P_NG_PARAM_TX_POWER (NRF24L01P_NG_TX_POWER_0DBM)
78#endif
79
80#ifndef NRF24L01P_NG_PARAM_DATA_RATE_LVL
85#define NRF24L01P_NG_PARAM_DATA_RATE (NRF24L01P_NG_RF_DR_2MBPS)
86#endif
87
88#ifndef NRF24L01P_NG_PARAM_CHANNEL
92#define NRF24L01P_NG_PARAM_CHANNEL (4)
93#endif
94
95#ifndef NRF24L01P_NG_PARAM_MAX_RETRANSM
99#define NRF24L01P_NG_PARAM_MAX_RETRANSM (5)
100#endif
101
102#ifndef NRF24L01P_NG_PARAM_RETRANSM_DELAY
107#define NRF24L01P_NG_PARAM_RETRANSM_DELAY (NRF24L01P_NG_ARD_2750US)
108#endif
109
110#ifndef NRF24L01P_NG_PARAMS
114#define NRF24L01P_NG_PARAMS { \
115 .spi = NRF24L01P_NG_PARAM_SPI, \
116 .spi_clk = NRF24L01P_NG_PARAM_SPI_CLK, \
117 .pin_cs = NRF24L01P_NG_PARAM_CS, \
118 .pin_ce = NRF24L01P_NG_PARAM_CE, \
119 .pin_irq = NRF24L01P_NG_PARAM_IRQ, \
120 .config = { \
121 .cfg_crc = NRF24L01P_NG_PARAM_CRC_LEN, \
122 .cfg_tx_power = NRF24L01P_NG_PARAM_TX_POWER, \
123 .cfg_data_rate = NRF24L01P_NG_PARAM_DATA_RATE, \
124 .cfg_channel = NRF24L01P_NG_PARAM_CHANNEL, \
125 .cfg_max_retr = NRF24L01P_NG_PARAM_MAX_RETRANSM, \
126 .cfg_retr_delay = NRF24L01P_NG_PARAM_RETRANSM_DELAY, \
127 } \
128}
129#endif
130
137
141#define NRF24L01P_NG_NUM ARRAY_SIZE(nrf24l01p_ng_params)
142
143#ifdef __cplusplus
144}
145#endif
146
Low-level GPIO peripheral driver interface definitions.
Common macros and compiler attributes/pragmas configuration.
Public interface for NRF24L01+ (NG) devices.
Constants from the datasheet of the NRF24L01+ (NG) transceiver.
#define NRF24L01P_NG_PARAMS
Default NRF24L01+ device parameters.
static const nrf24l01p_ng_params_t nrf24l01p_ng_params[]
Static array that holds NRF24L01+ device configurations.
Low-level SPI peripheral driver interface definition.
Struct of NRF24L01+ initialization parameters.