nrf_to_nrf - NRF52 Radio Driver v1.2.2
TMRh20 2023 - OSI Layer 2 radio driver using RF24 API
Loading...
Searching...
No Matches
nrf_to_nrf.h File Reference
#include <Arduino.h>

Go to the source code of this file.

Classes

class  nrf_to_nrf
 Driver for the 2.4GHz radio in nRF52x and nRF54x chips, using the RF24 API. More...

Macros

#define NRF52_RADIO_LIBRARY
#define DEFAULT_MAX_PAYLOAD_SIZE   32
#define ACTUAL_MAX_PAYLOAD_SIZE   258
#define ACK_TIMEOUT_1MBPS   600
#define ACK_TIMEOUT_2MBPS   400
#define ACK_TIMEOUT_250KBPS   800
#define ACK_TIMEOUT_1MBPS_OFFSET   300
#define ACK_TIMEOUT_2MBPS_OFFSET   135
#define ACK_TIMEOUT_250KBPS_OFFSET   300
#define ACK_PAYLOAD_TIMEOUT_OFFSET   750
#define CCM_ENCRYPTION_ENABLED
#define MAX_PACKET_SIZE   ACTUAL_MAX_PAYLOAD_SIZE
#define CCM_KEY_SIZE   16
#define CCM_IV_SIZE   5
#define CCM_IV_SIZE_ACTUAL   8
#define CCM_COUNTER_SIZE   3
#define CCM_MIC_SIZE   4
#define CCM_START_SIZE   3
#define CCM_MODE_LENGTH_EXTENDED   16

Enumerations

enum  nrf_pa_dbm_e {
  NRF_PA_MIN = 0 , NRF_PA_LOW , NRF_PA_HIGH , NRF_PA_MAX ,
  NRF_PA_ERROR
}
enum  nrf_datarate_e { NRF_1MBPS = 0 , NRF_2MBPS , NRF_250KBPS }
enum  nrf_crclength_e { NRF_CRC_DISABLED = 0 , NRF_CRC_8 , NRF_CRC_16 , NRF_CRC_24 }

Detailed Description

Class declaration for nrf52840_nrf24l01

Definition in file nrf_to_nrf.h.

Macro Definition Documentation

◆ NRF52_RADIO_LIBRARY

#define NRF52_RADIO_LIBRARY

Definition at line 19 of file nrf_to_nrf.h.

◆ DEFAULT_MAX_PAYLOAD_SIZE

#define DEFAULT_MAX_PAYLOAD_SIZE   32

Definition at line 20 of file nrf_to_nrf.h.

◆ ACTUAL_MAX_PAYLOAD_SIZE

#define ACTUAL_MAX_PAYLOAD_SIZE   258

Definition at line 21 of file nrf_to_nrf.h.

◆ ACK_TIMEOUT_1MBPS

#define ACK_TIMEOUT_1MBPS   600

Definition at line 22 of file nrf_to_nrf.h.

◆ ACK_TIMEOUT_2MBPS

#define ACK_TIMEOUT_2MBPS   400

Definition at line 23 of file nrf_to_nrf.h.

◆ ACK_TIMEOUT_250KBPS

#define ACK_TIMEOUT_250KBPS   800

Definition at line 24 of file nrf_to_nrf.h.

◆ ACK_TIMEOUT_1MBPS_OFFSET

#define ACK_TIMEOUT_1MBPS_OFFSET   300

Definition at line 25 of file nrf_to_nrf.h.

◆ ACK_TIMEOUT_2MBPS_OFFSET

#define ACK_TIMEOUT_2MBPS_OFFSET   135

Definition at line 26 of file nrf_to_nrf.h.

◆ ACK_TIMEOUT_250KBPS_OFFSET

#define ACK_TIMEOUT_250KBPS_OFFSET   300

Definition at line 27 of file nrf_to_nrf.h.

◆ ACK_PAYLOAD_TIMEOUT_OFFSET

#define ACK_PAYLOAD_TIMEOUT_OFFSET   750

Definition at line 28 of file nrf_to_nrf.h.

◆ CCM_ENCRYPTION_ENABLED

#define CCM_ENCRYPTION_ENABLED

Definition at line 37 of file nrf_to_nrf.h.

◆ MAX_PACKET_SIZE

#define MAX_PACKET_SIZE   ACTUAL_MAX_PAYLOAD_SIZE

Definition at line 40 of file nrf_to_nrf.h.

◆ CCM_KEY_SIZE

#define CCM_KEY_SIZE   16

Definition at line 41 of file nrf_to_nrf.h.

◆ CCM_IV_SIZE

#define CCM_IV_SIZE   5

Definition at line 42 of file nrf_to_nrf.h.

◆ CCM_IV_SIZE_ACTUAL

#define CCM_IV_SIZE_ACTUAL   8

Definition at line 43 of file nrf_to_nrf.h.

◆ CCM_COUNTER_SIZE

#define CCM_COUNTER_SIZE   3

Definition at line 44 of file nrf_to_nrf.h.

◆ CCM_MIC_SIZE

#define CCM_MIC_SIZE   4

Definition at line 45 of file nrf_to_nrf.h.

◆ CCM_START_SIZE

#define CCM_START_SIZE   3

Definition at line 46 of file nrf_to_nrf.h.

◆ CCM_MODE_LENGTH_EXTENDED

#define CCM_MODE_LENGTH_EXTENDED   16

Definition at line 47 of file nrf_to_nrf.h.

Enumeration Type Documentation

◆ nrf_pa_dbm_e

Power Amplifier (PA) levels. The output power depends on the chip:

level (enum value) nRF52840, nRF52833, nRF52820, nRF54L15 nRF52832, nRF52811, nRF52810, nRF52805
NRF_PA_MIN (0) -12 dBm -12 dBm
NRF_PA_LOW (1) 2 dBm -4 dBm
NRF_PA_HIGH (2) 6 dBm 0 dBm
NRF_PA_MAX (3) 8 dBm 4 dBm
See also
Enumerator
NRF_PA_MIN 

(0) represents -12dBm

NRF_PA_LOW 

(1) represents 2dBm (-4dBm on nRF52832, nRF52811, nRF52810, nRF52805)

NRF_PA_HIGH 

(2) represents 6dBm (0dBm on nRF52832, nRF52811, nRF52810, nRF52805)

NRF_PA_MAX 

(3) represents 8dBm (4dBm on nRF52832, nRF52811, nRF52810, nRF52805)

NRF_PA_ERROR 

(4) Returned by getPALevel() if the TX power was set to something other than the levels above.

Definition at line 64 of file nrf_to_nrf.h.

◆ nrf_datarate_e

How fast data moves through the air. Units are in bits per second (bps).

See also
Enumerator
NRF_1MBPS 

(0) represents 1 Mbps

NRF_2MBPS 

(1) represents 2 Mbps

NRF_250KBPS 

(2) represents 250 kbps. Nordic has deprecated this mode, and it might not work reliably on all devices.

Definition at line 96 of file nrf_to_nrf.h.

◆ nrf_crclength_e

The length of a CRC checksum that is used (if any). Cyclical Redundancy Checking (CRC) is commonly used to ensure data integrity.

See also
Enumerator
NRF_CRC_DISABLED 

(0) represents no CRC checksum is used

NRF_CRC_8 

(1) represents CRC 8 bit checksum is used

NRF_CRC_16 

(2) represents CRC 16 bit checksum is used

NRF_CRC_24 

(3) represents CRC 24 bit checksum is used

Definition at line 124 of file nrf_to_nrf.h.