From 9bd72ff5425d4d07296b64fc8c99d56b1987b77f Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Fri, 3 Apr 2026 10:48:21 -0600 Subject: [PATCH 1/8] add nRF54l15 support --- RF24Network.cpp | 6 ++++-- RF24Network.h | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/RF24Network.cpp b/RF24Network.cpp index 151b93e2..c8919a66 100644 --- a/RF24Network.cpp +++ b/RF24Network.cpp @@ -24,7 +24,7 @@ #endif #else #include "RF24.h" - #if defined(ARDUINO_ARCH_NRF52) || defined(ARDUINO_ARCH_NRF52840) + #if defined(ARDUINO_ARCH_NRF52) || defined(ARDUINO_ARCH_NRF52840) || defined(ARDUINO_NRF54L15) #include #endif #endif @@ -713,9 +713,11 @@ template<> bool ESBNetwork::write(RF24NetworkHeader& header, const void* message, uint16_t len, uint16_t writeDirect) { max_frame_payload_size = (uint8_t)NRF_RADIO->PCNF1 - sizeof(RF24NetworkHeader); + #if defined(CCM_ENCRYPTION_ENABLED) if (radio.enableEncryption == true) { max_frame_payload_size -= CCM_IV_SIZE + CCM_COUNTER_SIZE + CCM_MIC_SIZE; } + #endif return main_write(header, message, len, writeDirect); } #endif @@ -1340,6 +1342,6 @@ void ESBNetwork::setup_watchdog(uint8_t prescalar) // ensure the compiler is aware of the possible datatype for the template class template class ESBNetwork; -#if defined(ARDUINO_ARCH_NRF52) || defined(ARDUINO_ARCH_NRF52840) || defined(ARDUINO_ARCH_NRF52833) +#if defined(ARDUINO_ARCH_NRF52) || defined(ARDUINO_ARCH_NRF52840) || defined(ARDUINO_ARCH_NRF52833) || defined(ARDUINO_NRF54L15) template class ESBNetwork; #endif diff --git a/RF24Network.h b/RF24Network.h index 9432828f..23b71c0c 100644 --- a/RF24Network.h +++ b/RF24Network.h @@ -229,7 +229,7 @@ #define FLAG_NO_POLL 8 class RF24; -#if defined(ARDUINO_ARCH_NRF52) || defined(ARDUINO_ARCH_NRF52840) || defined(ARDUINO_ARCH_NRF52833) +#if defined(ARDUINO_ARCH_NRF52) || defined(ARDUINO_ARCH_NRF52840) || defined(ARDUINO_ARCH_NRF52833) || defined(ARDUINO_NRF54L15) class nrf_to_nrf; #endif @@ -1011,7 +1011,7 @@ class ESBNetwork * ``` */ typedef ESBNetwork RF24Network; -#if defined(ARDUINO_ARCH_NRF52) || defined(ARDUINO_ARCH_NRF52840) || defined(ARDUINO_ARCH_NRF52833) +#if defined(ARDUINO_ARCH_NRF52) || defined(ARDUINO_ARCH_NRF52840) || defined(ARDUINO_ARCH_NRF52833) || defined(ARDUINO_NRF54L15) typedef ESBNetwork RF52Network; #endif From 8edd837dc618317e7a79643f0fdb374f1fb5e32e Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Fri, 3 Apr 2026 11:02:21 -0600 Subject: [PATCH 2/8] formatting --- RF24Network.cpp | 26 +++++++++++++------------- RF24Network.h | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/RF24Network.cpp b/RF24Network.cpp index c8919a66..c53419b1 100644 --- a/RF24Network.cpp +++ b/RF24Network.cpp @@ -1223,19 +1223,19 @@ template void ESBNetwork::pipe_address(uint16_t node, uint8_t pipe, uint8_t* address) { - static uint8_t address_translation[] = { 0xc3, - 0x3c, - 0x33, - 0xce, - 0x3e, - 0xe3, - 0xec + static uint8_t address_translation[] = {0xc3, + 0x3c, + 0x33, + 0xce, + 0x3e, + 0xe3, + 0xec #if NUM_PIPES > 6 - , - 0xee + , + 0xee #if NUM_PIPES > 7 - , - 0xed + , + 0xed #endif #endif }; @@ -1307,8 +1307,8 @@ bool ESBNetwork::sleepNode(unsigned int cycles, int interruptPin, uint8 while (sleep_cycles_remaining) { sleep_mode(); // System sleeps here - } // The WDT_vect interrupt wakes the MCU from here - sleep_disable(); // System continues execution here when watchdog timed out + } // The WDT_vect interrupt wakes the MCU from here + sleep_disable(); // System continues execution here when watchdog timed out detachInterrupt(interruptPin); #if defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) diff --git a/RF24Network.h b/RF24Network.h index 23b71c0c..b40ba855 100644 --- a/RF24Network.h +++ b/RF24Network.h @@ -965,12 +965,12 @@ class ESBNetwork #else // Not Linux: #if defined(DISABLE_USER_PAYLOADS) - uint8_t frame_queue[1]; /** Space for a small set of frames that need to be delivered to the app layer */ + uint8_t frame_queue[1]; /** Space for a small set of frames that need to be delivered to the app layer */ #else uint8_t frame_queue[MAIN_BUFFER_SIZE]; /** Space for a small set of frames that need to be delivered to the app layer */ #endif - uint8_t* next_frame; /** Pointer into the @p frame_queue where we should place the next received frame */ + uint8_t* next_frame; /** Pointer into the @p frame_queue where we should place the next received frame */ #if !defined(DISABLE_FRAGMENTATION) RF24NetworkFrame frag_queue; /* a cache for re-assembling incoming message fragments */ From d77a0e50a56a40c1657be2c724f475bac3d24757 Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Fri, 3 Apr 2026 11:07:57 -0600 Subject: [PATCH 3/8] Update RF24Network.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- RF24Network.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/RF24Network.cpp b/RF24Network.cpp index c53419b1..bee602b1 100644 --- a/RF24Network.cpp +++ b/RF24Network.cpp @@ -1223,13 +1223,13 @@ template void ESBNetwork::pipe_address(uint16_t node, uint8_t pipe, uint8_t* address) { - static uint8_t address_translation[] = {0xc3, - 0x3c, - 0x33, - 0xce, - 0x3e, - 0xe3, - 0xec + static uint8_t address_translation[] = { 0xc3, + 0x3c, + 0x33, + 0xce, + 0x3e, + 0xe3, + 0xec #if NUM_PIPES > 6 , 0xee From 39bf2fabf32dcf8e994e4ae2bd803513ff9fa1c7 Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Fri, 3 Apr 2026 11:08:05 -0600 Subject: [PATCH 4/8] Update RF24Network.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- RF24Network.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RF24Network.cpp b/RF24Network.cpp index bee602b1..41512a36 100644 --- a/RF24Network.cpp +++ b/RF24Network.cpp @@ -1231,8 +1231,8 @@ void ESBNetwork::pipe_address(uint16_t node, uint8_t pipe, uint8_t* add 0xe3, 0xec #if NUM_PIPES > 6 - , - 0xee + , + 0xee #if NUM_PIPES > 7 , 0xed From e6f5623956e8f0c0d4ce0e04d3dd9b90b0307dee Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Fri, 3 Apr 2026 11:08:10 -0600 Subject: [PATCH 5/8] Update RF24Network.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- RF24Network.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RF24Network.cpp b/RF24Network.cpp index 41512a36..4242439b 100644 --- a/RF24Network.cpp +++ b/RF24Network.cpp @@ -1234,8 +1234,8 @@ void ESBNetwork::pipe_address(uint16_t node, uint8_t pipe, uint8_t* add , 0xee #if NUM_PIPES > 7 - , - 0xed + , + 0xed #endif #endif }; From dad9f19a8829f35eddeceb0dd9ee8565dba08209 Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Fri, 3 Apr 2026 11:08:18 -0600 Subject: [PATCH 6/8] Update RF24Network.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- RF24Network.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RF24Network.cpp b/RF24Network.cpp index 4242439b..c8919a66 100644 --- a/RF24Network.cpp +++ b/RF24Network.cpp @@ -1307,8 +1307,8 @@ bool ESBNetwork::sleepNode(unsigned int cycles, int interruptPin, uint8 while (sleep_cycles_remaining) { sleep_mode(); // System sleeps here - } // The WDT_vect interrupt wakes the MCU from here - sleep_disable(); // System continues execution here when watchdog timed out + } // The WDT_vect interrupt wakes the MCU from here + sleep_disable(); // System continues execution here when watchdog timed out detachInterrupt(interruptPin); #if defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) From f45fa6160fcb28df0460a99e326d37a817c427a1 Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Fri, 3 Apr 2026 11:08:29 -0600 Subject: [PATCH 7/8] Update RF24Network.h Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- RF24Network.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RF24Network.h b/RF24Network.h index b40ba855..734c79ad 100644 --- a/RF24Network.h +++ b/RF24Network.h @@ -965,7 +965,7 @@ class ESBNetwork #else // Not Linux: #if defined(DISABLE_USER_PAYLOADS) - uint8_t frame_queue[1]; /** Space for a small set of frames that need to be delivered to the app layer */ + uint8_t frame_queue[1]; /** Space for a small set of frames that need to be delivered to the app layer */ #else uint8_t frame_queue[MAIN_BUFFER_SIZE]; /** Space for a small set of frames that need to be delivered to the app layer */ #endif From 72b94315f0d10901497b076b45450bc76b851edb Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Fri, 3 Apr 2026 11:08:34 -0600 Subject: [PATCH 8/8] Update RF24Network.h Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- RF24Network.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RF24Network.h b/RF24Network.h index 734c79ad..23b71c0c 100644 --- a/RF24Network.h +++ b/RF24Network.h @@ -970,7 +970,7 @@ class ESBNetwork uint8_t frame_queue[MAIN_BUFFER_SIZE]; /** Space for a small set of frames that need to be delivered to the app layer */ #endif - uint8_t* next_frame; /** Pointer into the @p frame_queue where we should place the next received frame */ + uint8_t* next_frame; /** Pointer into the @p frame_queue where we should place the next received frame */ #if !defined(DISABLE_FRAGMENTATION) RF24NetworkFrame frag_queue; /* a cache for re-assembling incoming message fragments */