interface to an RFM73 module More...
#include <rfm73.h>
Public Member Functions | |
rfm73 (pins::output_pin &sclk, pins::output_pin &mosi, pins::input_pin &miso, pins::output_pin &csn, pins::output_pin &ce) | |
constructor: create and RFM73 object | |
void | init (void) |
initialize the library and the rfm73 module | |
unsigned char | register_read (unsigned char reg) |
read a single-byte command or register | |
void | buffer_read (unsigned char reg, unsigned char buf[], unsigned char length) |
read a multi-byte command or register | |
void | register_write (unsigned char reg, unsigned char val) |
write a single-byte command or register | |
void | buffer_write (char reg, const unsigned char buf[], unsigned char length) |
write a multi-byte command or register | |
bool | is_present (void) |
report whether the rfm73 module is present | |
void | mode_transmit (void) |
switch the rfm73 to transmit mode | |
void | mode_receive (void) |
switch the rfm73 to receive mode | |
void | mode_standby (void) |
switch the rfm73 to standby mode | |
void | mode_powerdown (void) |
switch the rfm73 to power down mode | |
void | lna_low (void) |
set the rfm73 lna gain to low | |
void | lna_high (void) |
set the rfm73 lna gain to high | |
void | channel (unsigned char ch) |
set the rfm73 channel frequency | |
void | air_data_rate (unsigned char rate) |
set the rfm73 air data rate (baudrate) | |
void | crc_length (unsigned char len) |
set the rfm73 CRC length | |
void | address_length (unsigned char len) |
set the rfm73 address length | |
void | power (unsigned char level) |
set the rfm73 transmit power | |
void | retransmit_delay_attempts (unsigned char d, unsigned char n) |
set the retransmission delay and number of attempts | |
unsigned char | retransmit_count (void) |
read rfm73 retransmit count | |
unsigned char | lost_packets_count (void) |
read rfm73 lost packets count | |
void | lost_packets_reset (void) |
reset rfm73 lost packets count | |
void | pipe_autoack (unsigned char pipe, bool enabled) |
enables or disables the autoack on a pipe | |
void | pipe_enable (unsigned char d, bool enabled) |
enables or disables a pipe | |
void | receive_address_p0 (const unsigned char address[5]) |
set the rfm73 pipe 0 address | |
void | receive_address_p1 (const unsigned char address[5]) |
set the rfm73 pipe 1 address | |
void | receive_address_pn (unsigned char channel, unsigned char address) |
set the rfm73 pipe n (2..5) address | |
void | channel_payload_size (unsigned char n, unsigned char size) |
set the payload size for pipe n | |
void | transmit_address (const unsigned char address[]) |
set the rfm73 transmit address | |
bool | transmit_fifo_full (void) |
report whether the transmit fifo is full | |
bool | receive_fifo_empty (void) |
report whether the receive fifo is empty | |
void | transmit_message (const unsigned char buf[], unsigned char length) |
transmit a message | |
void | transmit_message_once (const unsigned char buf[], unsigned char length) |
transmit a message once | |
unsigned char | receive_next_pipe (void) |
get pipe number of the next message in receive FIFO | |
unsigned char | receive_next_length (void) |
get payload length of the next message in receive FIFO | |
bool | receive (unsigned char &pipe, unsigned char buf[], unsigned char &length) |
(try to) receive a message | |
interface to an RFM73 module