# nrf24/rf24 architecture

> Architecture diagram of the GitHub repository nrf24/rf24, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nrf24/rf24
- Repository: https://github.com/nrf24/rf24

## Overview

RF24 is a C++ library for controlling nRF24L01+ wireless transceivers across embedded and Linux platforms. A typical application initializes a radio, configures it for transmit or receive, and exchanges payloads; the library implements the radio behavior while platform-specific utilities supply hardware access. The sampled Pico example demonstrates manual acknowledgements. The README provides little capability detail, so additional example branches reflect the repository tree; unsampled platform wiring is not asserted.

Main entry points: [`RF24.cpp`](https://github.com/nrf24/rf24/blob/master/RF24.cpp) (RF24 radio API), [`RF24_config.h`](https://github.com/nrf24/rf24/blob/master/RF24_config.h) (Platform configuration), [`examples_pico/manualAcknowledgements.cpp`](https://github.com/nrf24/rf24/blob/master/examples_pico/manualAcknowledgements.cpp) (Manual acknowledgements), [`nRF24L01.h`](https://github.com/nrf24/rf24/blob/master/nRF24L01.h) (Radio definitions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Radio library"]
  node_radio["RF24 radio API<br/>[RF24.cpp]"]
  node_config["Platform configuration<br/>[RF24_config.h]"]
  node_protocol["Radio definitions<br/>[nRF24L01.h]"]
end

subgraph group_platforms["Platform support"]
  node_avr["AVR support<br/>[RF24_arch_config.h]"]
  node_atxmega["ATXMega support"]
  node_mraa["MRAA support"]
  node_rpi["Raspberry Pi support"]
  node_spidev["Linux GPIO SPI"]
  node_rp2["Pico support"]
  node_wiringpi["WiringPi support"]
end

subgraph group_interfaces["Bindings and examples"]
  node_python["Python binding<br/>[pyRF24.cpp]"]
  node_manual["Manual acknowledgements"]
  node_scanner["Radio scanner examples<br/>[scanner.cpp]"]
  node_streaming["Streaming examples<br/>[streamingData.cpp]"]
  node_interrupts["Interrupt examples"]
  node_multiceiver["Multiceiver examples"]
  node_ackpayload["Ack payload examples"]
end

node_user(("Application developer"))
node_transceiver{{"nRF24L01 transceiver"}}

node_user -->|"runs example"| node_manual
node_manual -->|"configures and exchanges"| node_radio
node_radio -.->|"controls radio"| node_transceiver
node_radio -->|"uses configuration"| node_config
node_radio -->|"uses definitions"| node_protocol
node_config -->|"selects architecture"| node_avr
node_config -->|"selects architecture"| node_atxmega
node_config -->|"selects architecture"| node_rp2

click node_radio "https://github.com/nrf24/rf24/blob/master/RF24.cpp"
click node_config "https://github.com/nrf24/rf24/blob/master/RF24_config.h"
click node_protocol "https://github.com/nrf24/rf24/blob/master/nRF24L01.h"
click node_avr "https://github.com/nrf24/rf24/blob/master/utility/ATTiny/RF24_arch_config.h"
click node_atxmega "https://github.com/nrf24/rf24/tree/master/utility/ATXMegaD3"
click node_mraa "https://github.com/nrf24/rf24/tree/master/utility/MRAA"
click node_rpi "https://github.com/nrf24/rf24/tree/master/utility/RPi"
click node_spidev "https://github.com/nrf24/rf24/tree/master/utility/SPIDEV"
click node_rp2 "https://github.com/nrf24/rf24/tree/master/utility/rp2"
click node_wiringpi "https://github.com/nrf24/rf24/tree/master/utility/wiringPi"
click node_python "https://github.com/nrf24/rf24/blob/master/pyRF24/pyRF24.cpp"
click node_manual "https://github.com/nrf24/rf24/blob/master/examples_pico/manualAcknowledgements.cpp"
click node_scanner "https://github.com/nrf24/rf24/blob/master/examples_linux/scanner.cpp"
click node_streaming "https://github.com/nrf24/rf24/blob/master/examples_linux/streamingData.cpp"
click node_interrupts "https://github.com/nrf24/rf24/tree/master/examples_linux/interrupts"
click node_multiceiver "https://github.com/nrf24/rf24/blob/master/examples_linux/multiceiverDemo.cpp"
click node_ackpayload "https://github.com/nrf24/rf24/blob/master/examples_linux/acknowledgementPayloads.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_radio,node_config,node_protocol toneBlue
class node_avr,node_atxmega,node_mraa,node_rpi,node_spidev,node_rp2,node_wiringpi toneAmber
class node_python,node_manual,node_scanner,node_streaming,node_interrupts,node_multiceiver,node_ackpayload toneMint
class node_user,node_transceiver toneIndigo
```

## Components

### Radio library

- [RF24 radio API](https://github.com/nrf24/rf24/blob/master/RF24.cpp): `RF24.cpp`
- [Platform configuration](https://github.com/nrf24/rf24/blob/master/RF24_config.h): `RF24_config.h`
- [Radio definitions](https://github.com/nrf24/rf24/blob/master/nRF24L01.h): `nRF24L01.h`

### Platform support

- [AVR support](https://github.com/nrf24/rf24/blob/master/utility/ATTiny/RF24_arch_config.h): `utility/ATTiny/RF24_arch_config.h`
- [ATXMega support](https://github.com/nrf24/rf24/tree/master/utility/ATXMegaD3): `utility/ATXMegaD3`
- [MRAA support](https://github.com/nrf24/rf24/tree/master/utility/MRAA): `utility/MRAA`
- [Raspberry Pi support](https://github.com/nrf24/rf24/tree/master/utility/RPi): `utility/RPi`
- [Linux GPIO SPI](https://github.com/nrf24/rf24/tree/master/utility/SPIDEV): `utility/SPIDEV`
- [Pico support](https://github.com/nrf24/rf24/tree/master/utility/rp2): `utility/rp2`
- [WiringPi support](https://github.com/nrf24/rf24/tree/master/utility/wiringPi): `utility/wiringPi`

### Bindings and examples

- [Python binding](https://github.com/nrf24/rf24/blob/master/pyRF24/pyRF24.cpp): `pyRF24/pyRF24.cpp`
- [Manual acknowledgements](https://github.com/nrf24/rf24/blob/master/examples_pico/manualAcknowledgements.cpp): `examples_pico/manualAcknowledgements.cpp`
- [Radio scanner examples](https://github.com/nrf24/rf24/blob/master/examples_linux/scanner.cpp): `examples_linux/scanner.cpp`
- [Streaming examples](https://github.com/nrf24/rf24/blob/master/examples_linux/streamingData.cpp): `examples_linux/streamingData.cpp`
- [Interrupt examples](https://github.com/nrf24/rf24/tree/master/examples_linux/interrupts): `examples_linux/interrupts`
- [Multiceiver examples](https://github.com/nrf24/rf24/blob/master/examples_linux/multiceiverDemo.cpp): `examples_linux/multiceiverDemo.cpp`
- [Ack payload examples](https://github.com/nrf24/rf24/blob/master/examples_linux/acknowledgementPayloads.cpp): `examples_linux/acknowledgementPayloads.cpp`

### Other components

- **Application developer**
- **nRF24L01 transceiver**

## Connections

- Application developer → Manual acknowledgements: runs example (evidence: `examples_pico/manualAcknowledgements.cpp`)
- Manual acknowledgements → RF24 radio API: configures and exchanges (evidence: `examples_pico/manualAcknowledgements.cpp`)
- RF24 radio API → nRF24L01 transceiver: controls radio
- RF24 radio API → Platform configuration: uses configuration (evidence: `RF24.cpp`)
- RF24 radio API → Radio definitions: uses definitions (evidence: `RF24.cpp`)
- Platform configuration → AVR support: selects architecture (evidence: `RF24_config.h`)
- Platform configuration → ATXMega support: selects architecture (evidence: `RF24_config.h`)
- Platform configuration → Pico support: selects architecture (evidence: `RF24_config.h`)
