RFM70library
Public Member Functions | List of all members
rfm70 Class Reference

interface to an RFM70 module More...

#include <rfm70.h>

Public Member Functions

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

Detailed Description

interface to an RFM70 module


The documentation for this class was generated from the following files: