![]() |
RF24G
0.9
Simple Abstraction Layer for the nRF24L01
|
Public Member Functions | |
Primary public interface | |
These are the main methods you need to send and receive data. | |
RF24_G () | |
RF24_G (uint8_t address, uint8_t _cepin, uint8_t _cspin) | |
bool | available () |
bool | write (const 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, |
uint8_t | _cepin, | ||
uint8_t | _cspin | ||
) |
Constructor
Creates a new instance of the radio object. This configures tmrh20's driver. Before using, you create an instance and send in the unique pins that this chip is connected to.
address | The address of tis radio instance |
_cepin | The pin attached to Chip Enable on the RF module |
_cspin | The pin attached to Chip Select |
bool RF24_G::available | ( | ) |
Checks if there is a packet received packet to be read
bool RF24_G::write | ( | const packet * | _packet | ) |
Writes a packet. This needs the address of an object and it's size to work correctly.
bool RF24_G::read | ( | packet * | _packet | ) |
Reads a packet. This needs the address of an object to work correctly.
bool RF24_G::setChannel | ( | uint8_t | channel | ) |
Sets the channel to use