Loading...
Searching...
No Matches
nrf24l01p_ng_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 Otto-von-Guericke-Universität Magdeburg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
17#ifndef NRF24L01P_NG_PARAMS_H
18#define NRF24L01P_NG_PARAMS_H
19
20#include "board.h"
21#include "periph/gpio.h"
22#include "periph/spi.h"
23#include "kernel_defines.h"
25#include "nrf24l01p_ng.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31#ifndef NRF24L01P_NG_PARAM_SPI
35#define NRF24L01P_NG_PARAM_SPI SPI_DEV(0)
36#endif
37
38#ifndef NRF24L01P_NG_PARAM_SPI_CLK
42#define NRF24L01P_NG_PARAM_SPI_CLK SPI_CLK_5MHZ
43#endif
44
45#ifndef NRF24L01P_NG_PARAM_CS
49#define NRF24L01P_NG_PARAM_CS GPIO_UNDEF
50#endif
51
52#ifndef NRF24L01P_NG_PARAM_CE
56#define NRF24L01P_NG_PARAM_CE GPIO_UNDEF
57#endif
58
59#ifndef NRF24L01P_NG_PARAM_IRQ
63#define NRF24L01P_NG_PARAM_IRQ GPIO_UNDEF
64#endif
65
66#ifndef NRF24L01P_NG_PARAM_CRC_LEN
71#define NRF24L01P_NG_PARAM_CRC_LEN (NRF24L01P_NG_CRC_2BYTE)
72#endif
73
74#ifndef NRF24L01P_NG_PARAM_TX_POWER
79#define NRF24L01P_NG_PARAM_TX_POWER (NRF24L01P_NG_TX_POWER_0DBM)
80#endif
81
82#ifndef NRF24L01P_NG_PARAM_DATA_RATE_LVL
87#define NRF24L01P_NG_PARAM_DATA_RATE (NRF24L01P_NG_RF_DR_2MBPS)
88#endif
89
90#ifndef NRF24L01P_NG_PARAM_CHANNEL
94#define NRF24L01P_NG_PARAM_CHANNEL (4)
95#endif
96
97#ifndef NRF24L01P_NG_PARAM_MAX_RETRANSM
101#define NRF24L01P_NG_PARAM_MAX_RETRANSM (5)
102#endif
103
104#ifndef NRF24L01P_NG_PARAM_RETRANSM_DELAY
109#define NRF24L01P_NG_PARAM_RETRANSM_DELAY (NRF24L01P_NG_ARD_2750US)
110#endif
111
112#ifndef NRF24L01P_NG_PARAMS
116#define NRF24L01P_NG_PARAMS { \
117 .spi = NRF24L01P_NG_PARAM_SPI, \
118 .spi_clk = NRF24L01P_NG_PARAM_SPI_CLK, \
119 .pin_cs = NRF24L01P_NG_PARAM_CS, \
120 .pin_ce = NRF24L01P_NG_PARAM_CE, \
121 .pin_irq = NRF24L01P_NG_PARAM_IRQ, \
122 .config = { \
123 .cfg_crc = NRF24L01P_NG_PARAM_CRC_LEN, \
124 .cfg_tx_power = NRF24L01P_NG_PARAM_TX_POWER, \
125 .cfg_data_rate = NRF24L01P_NG_PARAM_DATA_RATE, \
126 .cfg_channel = NRF24L01P_NG_PARAM_CHANNEL, \
127 .cfg_max_retr = NRF24L01P_NG_PARAM_MAX_RETRANSM, \
128 .cfg_retr_delay = NRF24L01P_NG_PARAM_RETRANSM_DELAY, \
129 } \
130}
131#endif
132
139
143#define NRF24L01P_NG_NUM ARRAY_SIZE(nrf24l01p_ng_params)
144
145#ifdef __cplusplus
146}
147#endif
148
149#endif /* NRF24L01P_NG_PARAMS_H */
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.