RF24G 0.9
Simple Abstraction Layer for the nRF24L01
|
Primary public interface | |
These are the main methods you need to send and receive data. | |
RF24_G () | |
RF24_G (uint8_t address) | |
RF24_G (uint8_t address, uint8_t _cepin, uint8_t _cspin) | |
bool | available () |
bool | write (packet *_packet) |
bool | read (packet *_packet) |
bool | setChannel (uint8_t channel) |
RF24_G::RF24_G | ( | ) |
Default Constructor
Creates a new instance of the radio object. This configures tmrh20's driver to default settings.
Use this if you want to instantiate the radio class, but initialize it later.
RF24_G::RF24_G | ( | uint8_t | address | ) |
Constructor
Creates a new instance of the radio object for NRF52x devices. This configures tmrh20's driver. Before using, you create an instance
address | The address of tis radio instance |
RF24_G::RF24_G | ( | uint8_t | address, |
uint8_t | _cepin, | ||
uint8_t | _cspin ) |
Constructor
Creates a new instance of the radio object for RF24 devices. This configures tmrh20's driver. Before using, you create an instance and send in the unique pins that this chip is connected to. If you have followed the wiring diagram on the first page, the CE pin should be 7 and the CS pin should be 8.
address | The address of tis radio instance |
_cepin | The pin attached to Chip Enable (CE) pin on the RF module |
_cspin | The pin attached to Chip Select (CS) pin |
bool RF24_G::available | ( | ) |
Checks if there is a packet received packet to be read
bool RF24_G::write | ( | packet * | _packet | ) |
Writes data to a packet. The packet is passed by reference, this means we need to use the & operator.
bool RF24_G::read | ( | packet * | _packet | ) |
Reads a packet. The packet is passed by reference, this means we need to use the & operator.
bool RF24_G::setChannel | ( | uint8_t | channel | ) |
Sets the channel to use