Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
nrf24l01p_settings.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2014 Hamburg University of Applied Sciences
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser General
5
* Public License v2.1. See the file LICENSE in the top level directory for more
6
* details.
7
*/
8
9
#pragma once
10
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
31
#define INITIAL_ADDRESS_WIDTH 5
32
#define NRF24L01P_MAX_DATA_LENGTH 32
33
#ifndef INITIAL_RF_CHANNEL
34
#define INITIAL_RF_CHANNEL 5
35
#endif
36
#define INITIAL_RX_POWER_0dB 0
43
#define DELAY_CS_TOGGLE_US 2
44
#define DELAY_AFTER_FUNC_US 2
45
#define DELAY_CE_HIGH_US (20)
46
#define DELAY_CHANGE_PWR_MODE_US (1500)
47
#define DELAY_CHANGE_TXRX_US (130)
48
#define DELAY_CE_START_US (5)
49
/*
50
* This is the time which is needed to physically transmit the data.
51
* Compare nrf24l01+ pruduct specification p.42. It is computed just
52
* for this setup
53
*/
54
#define DELAY_DATA_ON_AIR (1300)
61
#define CMD_R_REGISTER 0x00
62
#define CMD_W_REGISTER 0x20
63
#define CMD_R_RX_PAYLOAD 0x61
64
#define CMD_W_TX_PAYLOAD 0xa0
65
#define CMD_FLUSH_TX 0xe1
66
#define CMD_FLUSH_RX 0xe2
67
#define CMD_REUSE_TX_PL 0xe3
68
#define CMD_R_RX_PL_WID 0x60
69
#define CMD_W_ACK_PAYLOAD 0xa8
70
#define CMD_W_TX_PAYLOAD_NOACK 0xb0
71
#define CMD_NOOP 0xff
72
73
#define REGISTER_MASK 0x1F
80
#define REG_CONFIG 0x00
81
#define REG_EN_AA 0x01
82
#define REG_EN_RXADDR 0x02
83
#define REG_SETUP_AW 0x03
84
#define REG_SETUP_RETR 0x04
85
#define REG_RF_CH 0x05
86
#define REG_RF_SETUP 0x06
87
#define REG_STATUS 0x07
88
#define REG_OBSERVE_TX 0x08
89
#define REG_RPD 0x09
90
#define REG_RX_ADDR_P0 0x0a
91
#define REG_RX_ADDR_P1 0x0b
92
#define REG_RX_ADDR_P2 0x0c
93
#define REG_RX_ADDR_P3 0x0d
94
#define REG_RX_ADDR_P4 0x0e
95
#define REG_RX_ADDR_P5 0x0f
96
#define REG_TX_ADDR 0x10
97
#define REG_RX_PW_P0 0x11
98
#define REG_RX_PW_P1 0x12
99
#define REG_RX_PW_P2 0x13
100
#define REG_RX_PW_P3 0x14
101
#define REG_RX_PW_P4 0x15
102
#define REG_RX_PW_P5 0x16
103
#define REG_FIFO_STATUS 0x17
104
#define REG_DYNPD 0x1c
105
#define REG_FEATURE 0x1d
112
#define ENAA_P0 0x01
113
#define ENAA_P1 0x02
114
#define ENAA_P2 0x04
115
#define ENAA_P3 0x08
116
#define ENAA_P4 0x10
117
#define ENAA_P5 0x20
124
#define MASK_RX_DR 0x40
125
#define MASK_TX_DS 0x20
126
#define MASK_MAX_RT 0x10
127
#define EN_CRC 0x08
128
#define CRCO 0x04
129
#define PWR_UP 0x02
130
#define PRIM_RX 0x01
137
#define RX_DR 0x40
138
#define TX_DS 0x20
139
#define MAX_RT 0x10
140
#define RX_P_NO 0x0e
141
#define TX_FULL 0x01
142
#define ALL_INT_MASK 0x70
149
#define RF_SETUP_CONT_WAVE (1 << 7)
150
#define RF_SETUP_RF_DR_LOW (1 << 5)
151
#define RF_SETUP_PLL_LOCK (1 << 4)
152
#define RF_SETUP_RF_DR_HIGH (1 << 3)
153
#define RF_SETUP_RF_PWR (3 << 1)
159
#define RF_CH_MASK 0x7f
160
165
#define DYNPD_DPL_P5 (1 << 5)
166
#define DYNPD_DPL_P4 (1 << 4)
167
#define DYNPD_DPL_P3 (1 << 3)
168
#define DYNPD_DPL_P2 (1 << 2)
169
#define DYNPD_DPL_P1 (1 << 1)
170
#define DYNPD_DPL_P0 (1 << 0)
177
#define FEATURE_EN_DPL (1 << 2)
178
#define FEATURE_EN_ACK_PAY (1 << 1)
179
#define FEATURE_EN_DYN_ACK (1 << 0)
182
#ifdef __cplusplus
183
}
184
#endif
185
Generated on Mon Jun 30 2025 18:46:46 by
1.9.1