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.cpp File Reference
#include "nrf_to_nrf.h"

Go to the source code of this file.

Classes

struct  RadioIrqLock

Macros

#define __REV(x)
#define TXPOWER_PA_MIN   0xF4
#define TXPOWER_PA_LOW   0x02
#define TXPOWER_PA_HIGH   0x06
#define TXPOWER_PA_MAX   0x08
#define RADIO_MODE_MODE_Nrf_250Kbit   (2UL)
#define DEFAULT_TIMEOUT   250
#define RX_IRQ_NUMBER   RADIO_IRQn
#define RX_IRQ_MASK   (RADIO_INTENSET_CRCOK_Msk | RADIO_INTENSET_CRCERROR_Msk)
#define RX_IRQ_SET   INTENSET
#define RX_IRQ_CLEAR   INTENCLR
#define RX_IRQ_HANDLER   RADIO_IRQHandler

Functions

static bool waitForEvent (volatile uint32_t *event, uint32_t timeout=DEFAULT_TIMEOUT)
 __attribute__ ((__used__)) void RX_IRQ_HANDLER(void)
static void rxIrqDisable ()
static uint32_t bytewise_bit_swap (uint8_t const *p_inp)
static uint32_t addr_conv (uint8_t const *p_addr)

Variables

static nrf_to_nrf * rxIrqRadio = nullptr

Macro Definition Documentation

◆ __REV

#define __REV ( x)
Value:
__builtin_bswap32(x);

Definition at line 12 of file nrf_to_nrf.cpp.

◆ TXPOWER_PA_MIN

#define TXPOWER_PA_MIN   0xF4

Definition at line 23 of file nrf_to_nrf.cpp.

◆ TXPOWER_PA_LOW

#define TXPOWER_PA_LOW   0x02

Definition at line 24 of file nrf_to_nrf.cpp.

◆ TXPOWER_PA_HIGH

#define TXPOWER_PA_HIGH   0x06

Definition at line 25 of file nrf_to_nrf.cpp.

◆ TXPOWER_PA_MAX

#define TXPOWER_PA_MAX   0x08

Definition at line 26 of file nrf_to_nrf.cpp.

◆ RADIO_MODE_MODE_Nrf_250Kbit

#define RADIO_MODE_MODE_Nrf_250Kbit   (2UL)

Definition at line 36 of file nrf_to_nrf.cpp.

◆ DEFAULT_TIMEOUT

#define DEFAULT_TIMEOUT   250

Definition at line 43 of file nrf_to_nrf.cpp.

◆ RX_IRQ_NUMBER

#define RX_IRQ_NUMBER   RADIO_IRQn

Definition at line 68 of file nrf_to_nrf.cpp.

◆ RX_IRQ_MASK

#define RX_IRQ_MASK   (RADIO_INTENSET_CRCOK_Msk | RADIO_INTENSET_CRCERROR_Msk)

Definition at line 69 of file nrf_to_nrf.cpp.

◆ RX_IRQ_SET

#define RX_IRQ_SET   INTENSET

Definition at line 70 of file nrf_to_nrf.cpp.

◆ RX_IRQ_CLEAR

#define RX_IRQ_CLEAR   INTENCLR

Definition at line 71 of file nrf_to_nrf.cpp.

◆ RX_IRQ_HANDLER

#define RX_IRQ_HANDLER   RADIO_IRQHandler

Definition at line 75 of file nrf_to_nrf.cpp.

Function Documentation

◆ waitForEvent()

bool waitForEvent ( volatile uint32_t * event,
uint32_t timeout = DEFAULT_TIMEOUT )
static

Definition at line 48 of file nrf_to_nrf.cpp.

◆ __attribute__()

__attribute__ ( (__used__) )

Definition at line 82 of file nrf_to_nrf.cpp.

◆ rxIrqDisable()

void rxIrqDisable ( )
static

Definition at line 92 of file nrf_to_nrf.cpp.

◆ bytewise_bit_swap()

uint32_t bytewise_bit_swap ( uint8_t const * p_inp)
static

Definition at line 119 of file nrf_to_nrf.cpp.

◆ addr_conv()

uint32_t addr_conv ( uint8_t const * p_addr)
static

Definition at line 131 of file nrf_to_nrf.cpp.

Variable Documentation

◆ rxIrqRadio

nrf_to_nrf* rxIrqRadio = nullptr
static

Definition at line 80 of file nrf_to_nrf.cpp.