20#if defined(RF24_LINUX) || defined(LITTLEWIRE)
21 #include "utility/includes.h"
23 #include <DigitalIO.h>
139 SoftSPI<SOFT_SPI_MISO_PIN, SOFT_SPI_MOSI_PIN, SOFT_SPI_SCK_PIN, SPI_MODE> spi;
140#elif defined(SPI_UART)
144#if defined(RF24_LINUX) || defined(XMEGA_D3)
147#if defined(RF24_SPI_PTR)
154#if defined(RF24_LINUX) || defined(XMEGA_D3) || defined(RF24_RP2)
155 uint8_t spi_rxbuff[32 + 1];
156 uint8_t spi_txbuff[32 + 1];
159 uint8_t payload_size;
160 uint8_t pipe0_reading_address[5];
243#if defined(RF24_LINUX)
263#if defined(RF24_SPI_PTR) || defined(DOXYGEN_FORCED)
447 void read(
void* buf, uint8_t len);
489 bool write(
const void* buf, uint8_t len);
823 bool isFifo(
bool about_tx,
bool check_empty);
885 bool write(
const void* buf, uint8_t len,
const bool multicast);
935 bool writeFast(
const void* buf, uint8_t len);
972 bool writeFast(
const void* buf, uint8_t len,
const bool multicast);
1015 bool writeBlocking(
const void* buf, uint8_t len, uint32_t timeout);
1075 bool txStandBy(uint32_t timeout,
bool startTx = 0);
1153 void whatHappened(
bool& tx_ok,
bool& tx_fail,
bool& rx_ready);
1193 void startFastWrite(
const void* buf, uint8_t len,
const bool multicast,
bool startTx = 1);
1228 bool startWrite(
const void* buf, uint8_t len,
const bool multicast);
1325#if defined(FAILURE_HANDLING)
1648 void setPALevel(uint8_t level,
bool lnaEnable = 1);
1752 void maskIRQ(
bool tx_ok,
bool tx_fail,
bool rx_ready);
1928 void csn(
bool mode);
1936 void ce(
bool level);
1947 void write_register(uint8_t reg,
const uint8_t* buf, uint8_t len);
1957 void write_register(uint8_t reg, uint8_t value);
1970 void write_payload(
const void* buf, uint8_t len,
const uint8_t writeType);
1982 void read_payload(
void* buf, uint8_t len);
1989 uint8_t get_status(
void);
1991#if !defined(MINIMAL)
2000 void print_status(uint8_t status);
2009 void print_observe_tx(uint8_t value);
2022 void print_byte_register(
const char* name, uint8_t reg, uint8_t qty = 1);
2035 void print_address_register(
const char* name, uint8_t reg, uint8_t qty = 1);
2049 uint8_t sprintf_address_register(
char* out_buffer, uint8_t reg, uint8_t qty = 1);
2058 void toggle_features(
void);
2060#if defined(FAILURE_HANDLING) || defined(RF24_LINUX)
2062 void errNotify(
void);
2081 inline uint8_t _pa_level_reg_value(uint8_t level,
bool lnaEnable);
#define RF24_SPI_SPEED
The default SPI speed (in Hz)
Driver class for nRF24L01(+) 2.4GHz Wireless Transceiver.
void disableAckPayload(void)
RF24(rf24_gpio_pin_t _cepin, rf24_gpio_pin_t _cspin, uint32_t _spi_speed=RF24_SPI_SPEED)
uint16_t sprintfPrettyDetails(char *debugging_information)
uint8_t getPayloadSize(void)
void startListening(void)
bool isAckPayloadAvailable(void)
void printPrettyDetails(void)
void setPayloadSize(uint8_t size)
bool writeAckPayload(uint8_t pipe, const void *buf, uint8_t len)
void stopConstCarrier(void)
rf24_fifo_state_e isFifo(bool about_tx)
bool dynamic_payloads_enabled
void enableDynamicPayloads(void)
bool writeFast(const void *buf, uint8_t len)
void disableDynamicPayloads(void)
void setRetries(uint8_t delay, uint8_t count)
bool write(const void *buf, uint8_t len)
void setChannel(uint8_t channel)
uint8_t getDynamicPayloadSize(void)
bool ack_payloads_enabled
rf24_datarate_e getDataRate(void)
void setCRCLength(rf24_crclength_e length)
void read(void *buf, uint8_t len)
void closeReadingPipe(uint8_t pipe)
void read_register(uint8_t reg, uint8_t *buf, uint8_t len)
void openReadingPipe(uint8_t number, const uint8_t *address)
void toggleAllPipes(bool isEnabled)
Open or close all data pipes.
void setPALevel(uint8_t level, bool lnaEnable=1)
rf24_crclength_e getCRCLength(void)
void encodeRadioDetails(uint8_t *encoded_status)
void maskIRQ(bool tx_ok, bool tx_fail, bool rx_ready)
void enableAckPayload(void)
void startConstCarrier(rf24_pa_dbm_e level, uint8_t channel)
void startFastWrite(const void *buf, uint8_t len, const bool multicast, bool startTx=1)
void setAddressWidth(uint8_t a_width)
void setRadiation(uint8_t level, rf24_datarate_e speed, bool lnaEnable=true)
configure the RF_SETUP register in 1 transaction
bool startWrite(const void *buf, uint8_t len, const bool multicast)
bool writeBlocking(const void *buf, uint8_t len, uint32_t timeout)
bool setDataRate(rf24_datarate_e speed)
void setAutoAck(bool enable)
void openWritingPipe(const uint8_t *address)
void whatHappened(bool &tx_ok, bool &tx_fail, bool &rx_ready)
@ RF24_FIFO_INVALID
Represents corruption of data over SPI (when observed).
@ RF24_FIFO_FULL
The FIFO is full.
@ RF24_FIFO_OCCUPIED
The FIFO is not full nor empty, but it is occupied with 1 or 2 payloads.
@ RF24_FIFO_EMPTY
The FIFO is empty.