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 class for nRF52840 2.4GHz Wireless Transceiver. More...
 

Macros

#define NRF52_RADIO_LIBRARY
 
#define DEFAULT_MAX_PAYLOAD_SIZE   32
 
#define ACTUAL_MAX_PAYLOAD_SIZE   127
 
#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 }
 

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   127

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 32 of file nrf_to_nrf.h.

◆ MAX_PACKET_SIZE

#define MAX_PACKET_SIZE   ACTUAL_MAX_PAYLOAD_SIZE

Definition at line 35 of file nrf_to_nrf.h.

◆ CCM_KEY_SIZE

#define CCM_KEY_SIZE   16

Definition at line 36 of file nrf_to_nrf.h.

◆ CCM_IV_SIZE

#define CCM_IV_SIZE   5

Definition at line 37 of file nrf_to_nrf.h.

◆ CCM_IV_SIZE_ACTUAL

#define CCM_IV_SIZE_ACTUAL   8

Definition at line 38 of file nrf_to_nrf.h.

◆ CCM_COUNTER_SIZE

#define CCM_COUNTER_SIZE   3

Definition at line 39 of file nrf_to_nrf.h.

◆ CCM_MIC_SIZE

#define CCM_MIC_SIZE   4

Definition at line 40 of file nrf_to_nrf.h.

◆ CCM_START_SIZE

#define CCM_START_SIZE   3

Definition at line 41 of file nrf_to_nrf.h.

◆ CCM_MODE_LENGTH_EXTENDED

#define CCM_MODE_LENGTH_EXTENDED   16

Definition at line 42 of file nrf_to_nrf.h.

Enumeration Type Documentation

◆ nrf_pa_dbm_e

Enumerator
NRF_PA_MIN 

(0) represents -12dBm

NRF_PA_LOW 

(1) represents 2dBm

NRF_PA_HIGH 

(2) represents 6dBm

NRF_PA_MAX 

(3) represents 8dBm

NRF_PA_ERROR 

(4) This should not be used and remains for backward compatibility.

Definition at line 45 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
  • RF24::setDataRate()
  • RF24::getDataRate()
Enumerator
NRF_1MBPS 

(0) represents 1 Mbps

NRF_2MBPS 

(1) represents 2 Mbps

NRF_250KBPS 

(2) represents 250 kbps

Definition at line 78 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
  • RF24::setCRCLength()
  • RF24::getCRCLength()
  • RF24::disableCRC()
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

Definition at line 99 of file nrf_to_nrf.h.