MySensors Library & Examples  2.3.2
Classes | Macros | Typedefs | Enumerations | Functions
+ Collaboration diagram for RFM69New:

Detailed Description

API declaration for RFM69.

RFM69 driver-related log messages, format: [!]SYSTEM:[SUB SYSTEM:]MESSAGE

E SYS SUB Message Comment
RFM69 INIT Initialise RFM69 radio
RFM69 INIT PIN,CS=%d,IQP=%d,IQN=%d[,RST=%d] Pin configuration: chip select (CS), IRQ pin (IQP), IRQ number (IQN), Reset (RST)
RFM69 INIT HWV=%d HW version, see datasheet chapter 9
! RFM69 INIT SANCHK FAIL Sanity check failed, check wiring or replace module
RFM69 PTX NO ADJ TX power level, no adjustment
RFM69 PTX LEVEL=%d dbM TX power level, set to (LEVEL) dBm
RFM69 SAC SEND ACK,TO=%d,RSSI=%d ACK sent to (TO), RSSI of incoming message (RSSI)
RFM69 ATC ADJ TXL,cR=%d,tR=%d..%d,TXL=%d Adjust TX level, current RSSI (cR), target RSSI range (tR), TX level (TXL)
RFM69 SWR SEND,TO=%d,SEQ=%d,RETRY=%d Send to (TO), sequence number (SWQ), retry if no ACK received (RETRY)
RFM69 SWR ACK,FROM=%d,SEQ=%d,RSSI=%d ACK received from (FROM), sequence nr (SEQ), ACK RSSI (RSSI)
! RFM69 SWR NACK Message sent, no ACK received
RFM69 SPP PCT=%d,TX LEVEL=%d Set TX level, input TX percent (PCT)
RFM69 RSL Radio in sleep mode
RFM69 RSB Radio in standby mode
RFM69 PWD Power down radio
RFM69 PWU Power up radio

Classes

struct  __attribute__
 FW config structure, stored in eeprom. More...
 
struct  rfm69_internal_t
 RFM69 internal variables. More...
 

Macros

#define RFM69_SPI   hwSPI
 default SPI
 
#define DEFAULT_RFM69_IRQ_PIN   (2)
 DEFAULT_RFM69_IRQ_PIN.
 
#define DEFAULT_RFM69_CS_PIN   (SS)
 DEFAULT_RFM69_CS_PIN.
 
#define RFM69_SPI_DATA_ORDER   MSBFIRST
 SPI data order.
 
#define RFM69_SPI_DATA_MODE   SPI_MODE0
 SPI mode.
 
#define RFM69_SYNCVALUE1   (0x2D)
 Make this compatible with sync1 byte of RFM12B lib.
 
#define RFM69_VERSION_HW
 HW version.
 
#define RFM69_MIN_POWER_LEVEL_DBM   ((rfm69_powerlevel_t)-2)
 min. power level, -2dBm
 
#define RFM69_MAX_POWER_LEVEL_DBM   ((rfm69_powerlevel_t)20)
 max. power level, +20dBm
 
#define RFM69_FIFO_SIZE   (0xFFu)
 Max number of bytes the Rx/Tx FIFO can hold.
 
#define RFM69_MAX_PACKET_LEN   (0x40u)
 This is the maximum number of bytes that can be carried.
 
#define RFM69_ATC_TARGET_RANGE_DBM   (2u)
 ATC target range +/- dBm.
 
#define RFM69_PACKET_HEADER_VERSION   (1u)
 RFM69 packet header version.
 
#define RFM69_MIN_PACKET_HEADER_VERSION   (1u)
 Minimal RFM69 packet header version.
 
#define RFM69_RETRIES   (5u)
 Retries in case of failed transmission.
 
#define RFM69_RETRY_TIMEOUT_MS   (200ul)
 Timeout for ACK, adjustments needed if modem configuration changed (air time different)
 
#define RFM69_MODE_READY_TIMEOUT_MS   (50ul)
 Timeout for mode ready.
 
#define RFM69_ACK_REQUESTED   (7u)
 RFM69 header, controlFlag, bit 7.
 
#define RFM69_ACK_RECEIVED   (6u)
 RFM69 header, controlFlag, bit 6.
 
#define RFM69_ACK_RSSI_REPORT   (5u)
 RFM69 header, controlFlag, bit 5.
 
#define RFM69_BROADCAST_ADDRESS   (255u)
 Broadcasting address.
 
#define RFM69_TARGET_RSSI_DBM   (-75)
 RSSI target.
 
#define RFM69_HIGH_POWER_DBM   (18u)
 High power threshold, dBm.
 
#define MY_RFM69_TX_TIMEOUT_MS   (2*1000ul)
 Timeout for packet sent.
 
#define MY_RFM69_CSMA_LIMIT_DBM   (-95)
 upper RX signal sensitivity threshold in dBm for carrier sense access
 
#define MY_RFM69_CSMA_TIMEOUT_MS   (500ul)
 CSMA timeout.
 
#define RFM69_POWERUP_DELAY_MS   (100ul)
 Power up delay, allow VCC to settle, transport to become fully operational.
 
#define RFM69_315MHZ   (315000000ul)
 RFM69_315MHZ.
 
#define RFM69_433MHZ   (433920000ul)
 RFM69_433MHZ, center frequency 433.92 MHz.
 
#define RFM69_865MHZ   (865500000ul)
 RFM69_865MHZ, center frequency 865.5 MHz.
 
#define RFM69_868MHZ   (868000000ul)
 RFM69_868MHZ.
 
#define RFM69_915MHZ   (915000000ul)
 RFM69_915MHZ.
 
#define RFM69_COURSE_TEMP_COEF   (-90)
 puts the temperature reading in the ballpark, user can fine tune the returned value
 
#define RFM69_FXOSC   (32*1000000ul)
 OSC freq, 32MHz.
 
#define RFM69_FSTEP   (RFM69_FXOSC / 524288.0f)
 FXOSC / 2^19 = 32MHz / 2^19 (p13 in datasheet)
 
#define RFM69_getACKRequested(__value)   ((bool)bitRead(__value,RFM69_ACK_REQUESTED))
 getACKRequested
 
#define RFM69_setACKRequested(__value, __flag)   bitWrite(__value,RFM69_ACK_REQUESTED,__flag)
 setACKRequested
 
#define RFM69_getACKReceived(__value)   ((bool)bitRead(__value,RFM69_ACK_RECEIVED))
 getACKReceived
 
#define RFM69_setACKReceived(__value, __flag)   bitWrite(__value,RFM69_ACK_RECEIVED,__flag)
 setACKReceived
 
#define RFM69_setACKRSSIReport(__value, __flag)   bitWrite(__value,RFM69_ACK_RSSI_REPORT,__flag)
 setACKRSSIReport
 
#define RFM69_getACKRSSIReport(__value)   ((bool)bitRead(__value,RFM69_ACK_RSSI_REPORT))
 getACKRSSIReport
 
#define RFM69_READ_REGISTER   (0x7Fu)
 reading register
 
#define RFM69_WRITE_REGISTER   (0x80u)
 writing register
 
#define RFM69_CONFIG_FSK   (RFM69_DATAMODUL_DATAMODE_PACKET | RFM69_DATAMODUL_MODULATIONTYPE_FSK | RFM69_DATAMODUL_MODULATIONSHAPING_00)
 RFM69_CONFIG_FSK.
 
#define RFM69_CONFIG_GFSK   (RFM69_DATAMODUL_DATAMODE_PACKET | RFM69_DATAMODUL_MODULATIONTYPE_FSK | RFM69_DATAMODUL_MODULATIONSHAPING_10)
 RFM69_CONFIG_GFSK.
 
#define RFM69_CONFIG_OOK   (RFM69_DATAMODUL_DATAMODE_PACKET | RFM69_DATAMODUL_MODULATIONTYPE_OOK | RFM69_DATAMODUL_MODULATIONSHAPING_00)
 RFM69_CONFIG_OOK.
 
#define RFM69_CONFIG_NOWHITE   (RFM69_PACKET1_FORMAT_VARIABLE | RFM69_PACKET1_DCFREE_OFF | RFM69_PACKET1_CRC_ON | RFM69_PACKET1_CRCAUTOCLEAR_ON | RFM69_PACKET1_ADRSFILTERING_NODEBROADCAST)
 RFM69_CONFIG_NOWHITE.
 
#define RFM69_CONFIG_WHITE   (RFM69_PACKET1_FORMAT_VARIABLE | RFM69_PACKET1_DCFREE_WHITENING | RFM69_PACKET1_CRC_ON | RFM69_PACKET1_CRCAUTOCLEAR_ON | RFM69_PACKET1_ADRSFILTERING_NODEBROADCAST)
 RFM69_CONFIG_WHITE.
 
#define RFM69_CONFIG_MANCHESTER   (RFM69_PACKET1_FORMAT_VARIABLE | RFM69_PACKET1_DCFREE_MANCHESTER | RFM69_PACKET1_CRC_ON | RFM69_PACKET1_CRCAUTOCLEAR_ON | RFM69_PACKET1_ADRSFILTERING_NODEBROADCAST)
 RFM69_CONFIG_MANCHESTER.
 
#define RFM69_RXBW_111_24_4   (RFM69_RXBW_DCCFREQ_111 | RFM69_RXBW_MANT_24 | RFM69_RXBW_EXP_4)
 RFM69_RXBW_111_24_4.
 
#define RFM69_RXBW_111_24_3   (RFM69_RXBW_DCCFREQ_111 | RFM69_RXBW_MANT_24 | RFM69_RXBW_EXP_3)
 RFM69_RXBW_111_24_3.
 
#define RFM69_RXBW_111_24_2   (RFM69_RXBW_DCCFREQ_111 | RFM69_RXBW_MANT_24 | RFM69_RXBW_EXP_2)
 RFM69_RXBW_111_24_2.
 
#define RFM69_RXBW_111_16_2   (RFM69_RXBW_DCCFREQ_111 | RFM69_RXBW_MANT_16 | RFM69_RXBW_EXP_2)
 RFM69_RXBW_111_16_2.
 
#define RFM69_RXBW_111_16_1   (RFM69_RXBW_DCCFREQ_111 | RFM69_RXBW_MANT_16 | RFM69_RXBW_EXP_1)
 RFM69_RXBW_111_16_1.
 
#define RFM69_RXBW_111_16_0   (RFM69_RXBW_DCCFREQ_111 | RFM69_RXBW_MANT_16 | RFM69_RXBW_EXP_0)
 RFM69_RXBW_111_16_0.
 
#define RFM69_RXBW_010_16_2   (RFM69_RXBW_DCCFREQ_010 | RFM69_RXBW_MANT_16 | RFM69_RXBW_EXP_2)
 RFM69_RXBW_010_16_2.
 
#define RFM69_FSK_BR2_FD5   RFM69_CONFIG_FSK, RFM69_BITRATEMSB_2000, RFM69_BITRATELSB_2000, RFM69_FDEVMSB_5000, RFM69_FDEVLSB_5000, RFM69_RXBW_111_24_4, RFM69_CONFIG_WHITE
 RFM69_FSK_BR2_FD5.
 
#define RFM69_FSK_BR2_4_FD4_8   RFM69_CONFIG_FSK, RFM69_BITRATEMSB_2400, RFM69_BITRATELSB_2400, RFM69_FDEVMSB_4800, RFM69_FDEVLSB_4800, RFM69_RXBW_111_24_4, RFM69_CONFIG_WHITE
 RFM69_FSK_BR2_4_FD4_8.
 
#define RFM69_FSK_BR4_8_FD9_6   RFM69_CONFIG_FSK, RFM69_BITRATEMSB_4800, RFM69_BITRATELSB_4800, RFM69_FDEVMSB_9600, RFM69_FDEVLSB_9600, RFM69_RXBW_111_24_4, RFM69_CONFIG_WHITE
 RFM69_FSK_BR4_8_FD9_6.
 
#define RFM69_FSK_BR9_6_FD19_2   RFM69_CONFIG_FSK, RFM69_BITRATEMSB_9600, RFM69_BITRATELSB_9600, RFM69_FDEVMSB_19200, RFM69_FDEVLSB_19200, RFM69_RXBW_111_24_4, RFM69_CONFIG_WHITE
 RFM69_FSK_BR9_6_FD19_2.
 
#define RFM69_FSK_BR19_2_FD38_4   RFM69_CONFIG_FSK, RFM69_BITRATEMSB_19200, RFM69_BITRATELSB_19200, RFM69_FDEVMSB_38400, RFM69_FDEVLSB_38400, RFM69_RXBW_111_24_3, RFM69_CONFIG_WHITE
 RFM69_FSK_BR19_2_FD38_4.
 
#define RFM69_FSK_BR38_4_FD76_8   RFM69_CONFIG_FSK, RFM69_BITRATEMSB_38400, RFM69_BITRATELSB_38400, RFM69_FDEVMSB_76800, RFM69_FDEVLSB_76800, RFM69_RXBW_111_24_2, RFM69_CONFIG_WHITE
 RFM69_FSK_BR38_4_FD76_8.
 
#define RFM69_FSK_BR55_5_FD50   RFM69_CONFIG_FSK, RFM69_BITRATEMSB_55555, RFM69_BITRATELSB_55555, RFM69_FDEVMSB_50000, RFM69_FDEVLSB_50000, RFM69_RXBW_111_16_2, RFM69_CONFIG_WHITE
 RFM69_FSK_BR55_5_FD50.
 
#define RFM69_FSK_BR57_6_FD120   RFM69_CONFIG_FSK, RFM69_BITRATEMSB_57600, RFM69_BITRATELSB_57600, RFM69_FDEVMSB_120000, RFM69_FDEVLSB_120000, RFM69_RXBW_111_16_1, RFM69_CONFIG_WHITE
 RFM69_FSK_BR57_6_FD120.
 
#define RFM69_FSK_BR125_FD125   RFM69_CONFIG_FSK, RFM69_BITRATEMSB_125000, RFM69_BITRATELSB_125000, RFM69_FDEVMSB_125000, RFM69_FDEVLSB_125000, RFM69_RXBW_010_16_2, RFM69_CONFIG_WHITE
 RFM69_FSK_BR125_FD125.
 
#define RFM69_FSK_BR250_FD250   RFM69_CONFIG_FSK, RFM69_BITRATEMSB_250000, RFM69_BITRATELSB_250000, RFM69_FDEVMSB_250000, RFM69_FDEVLSB_250000, RFM69_RXBW_111_16_0, RFM69_CONFIG_WHITE
 RFM69_FSK_BR250_FD250.
 
#define RFM69_GFSK_BR2_FD5   RFM69_CONFIG_GFSK, RFM69_BITRATEMSB_2000, RFM69_BITRATELSB_2000, RFM69_FDEVMSB_5000, RFM69_FDEVLSB_5000, RFM69_RXBW_111_24_4, RFM69_CONFIG_WHITE
 RFM69_GFSK_BR2_FD5.
 
#define RFM69_GFSK_BR2_4_FD4_8   RFM69_CONFIG_GFSK, RFM69_BITRATEMSB_2400, RFM69_BITRATELSB_2400, RFM69_FDEVMSB_4800, RFM69_FDEVLSB_4800, RFM69_RXBW_111_24_4, RFM69_CONFIG_WHITE
 RFM69_GFSK_BR2_4_FD4_8.
 
#define RFM69_GFSK_BR4_8_FD9_6   RFM69_CONFIG_GFSK, RFM69_BITRATEMSB_4800, RFM69_BITRATELSB_4800, RFM69_FDEVMSB_9600, RFM69_FDEVLSB_9600, RFM69_RXBW_111_24_4, RFM69_CONFIG_WHITE
 RFM69_GFSK_BR4_8_FD9_6.
 
#define RFM69_GFSK_BR9_6_FD19_2   RFM69_CONFIG_GFSK, RFM69_BITRATEMSB_9600, RFM69_BITRATELSB_9600, RFM69_FDEVMSB_19200, RFM69_FDEVLSB_19200, RFM69_RXBW_111_24_4, RFM69_CONFIG_WHITE
 RFM69_GFSK_BR9_6_FD19_2.
 
#define RFM69_GFSK_BR19_2_FD38_4   RFM69_CONFIG_GFSK, RFM69_BITRATEMSB_19200, RFM69_BITRATELSB_19200, RFM69_FDEVMSB_38400, RFM69_FDEVLSB_38400, RFM69_RXBW_111_24_3, RFM69_CONFIG_WHITE
 RFM69_GFSK_BR19_2_FD38_4.
 
#define RFM69_GFSK_BR38_4_FD76_8   RFM69_CONFIG_GFSK, RFM69_BITRATEMSB_38400, RFM69_BITRATELSB_38400, RFM69_FDEVMSB_76800, RFM69_FDEVLSB_76800, RFM69_RXBW_111_24_2, RFM69_CONFIG_WHITE
 RFM69_GFSK_BR38_4_FD76_8.
 
#define RFM69_GFSK_BR55_5_FD50   RFM69_CONFIG_GFSK, RFM69_BITRATEMSB_55555, RFM69_BITRATELSB_55555, RFM69_FDEVMSB_50000, RFM69_FDEVLSB_50000, RFM69_RXBW_111_16_2, RFM69_CONFIG_WHITE
 RFM69_GFSK_BR55_5_FD50.
 
#define RFM69_GFSK_BR57_6_FD120   RFM69_CONFIG_GFSK, RFM69_BITRATEMSB_57600, RFM69_BITRATELSB_57600, RFM69_FDEVMSB_120000, RFM69_FDEVLSB_120000, RFM69_RXBW_111_16_1, RFM69_CONFIG_WHITE
 RFM69_GFSK_BR57_6_FD120.
 
#define RFM69_GFSK_BR125_FD125   RFM69_CONFIG_GFSK, RFM69_BITRATEMSB_125000, RFM69_BITRATELSB_125000, RFM69_FDEVMSB_125000, RFM69_FDEVLSB_125000, RFM69_RXBW_010_16_2, RFM69_CONFIG_WHITE
 RFM69_GFSK_BR125_FD125.
 
#define RFM69_GFSK_BR250_FD250   RFM69_CONFIG_GFSK, RFM69_BITRATEMSB_250000, RFM69_BITRATELSB_250000, RFM69_FDEVMSB_250000, RFM69_FDEVLSB_250000, RFM69_RXBW_111_16_0, RFM69_CONFIG_WHITE
 RFM69_GFSK_BR250_FD250.
 
#define RFM69_OOK_BR2_FD5   RFM69_CONFIG_OOK, RFM69_BITRATEMSB_2000, RFM69_BITRATELSB_2000, RFM69_FDEVMSB_5000, RFM69_FDEVLSB_5000, RFM69_RXBW_111_24_4, RFM69_CONFIG_WHITE
 RFM69_OOK_BR2_FD5.
 
#define RFM69_OOK_BR2_4_FD4_8   RFM69_CONFIG_OOK, RFM69_BITRATEMSB_2400, RFM69_BITRATELSB_2400, RFM69_FDEVMSB_4800, RFM69_FDEVLSB_4800, RFM69_RXBW_111_24_4, RFM69_CONFIG_WHITE
 RFM69_OOK_BR2_4_FD4_8.
 
#define RFM69_OOK_BR4_8_FD9_6   RFM69_CONFIG_OOK, RFM69_BITRATEMSB_4800, RFM69_BITRATELSB_4800, RFM69_FDEVMSB_9600, RFM69_FDEVLSB_9600, RFM69_RXBW_111_24_4, RFM69_CONFIG_WHITE
 RFM69_OOK_BR4_8_FD9_6.
 
#define RFM69_OOK_BR9_6_FD19_2   RFM69_CONFIG_OOK, RFM69_BITRATEMSB_9600, RFM69_BITRATELSB_9600, RFM69_FDEVMSB_19200, RFM69_FDEVLSB_19200, RFM69_RXBW_111_24_4, RFM69_CONFIG_WHITE
 RFM69_OOK_BR9_6_FD19_2.
 
#define RFM69_OOK_BR19_2_FD38_4   RFM69_CONFIG_OOK, RFM69_BITRATEMSB_19200, RFM69_BITRATELSB_19200, RFM69_FDEVMSB_38400, RFM69_FDEVLSB_38400, RFM69_RXBW_111_24_3, RFM69_CONFIG_WHITE
 RFM69_OOK_BR19_2_FD38_4.
 
#define RFM69_OOK_BR38_4_FD76_8   RFM69_CONFIG_OOK, RFM69_BITRATEMSB_38400, RFM69_BITRATELSB_38400, RFM69_FDEVMSB_76800, RFM69_FDEVLSB_76800, RFM69_RXBW_111_24_2, RFM69_CONFIG_WHITE
 RFM69_OOK_BR38_4_FD76_8.
 
#define RFM69_OOK_BR55_5_FD50   RFM69_CONFIG_OOK, RFM69_BITRATEMSB_55555, RFM69_BITRATELSB_55555, RFM69_FDEVMSB_50000, RFM69_FDEVLSB_50000, RFM69_RXBW_111_16_2, RFM69_CONFIG_WHITE
 RFM69_OOK_BR55_5_FD50.
 
#define RFM69_OOK_BR57_6_FD120   RFM69_CONFIG_OOK, RFM69_BITRATEMSB_57600, RFM69_BITRATELSB_57600, RFM69_FDEVMSB_120000, RFM69_FDEVLSB_120000, RFM69_RXBW_111_16_1, RFM69_CONFIG_WHITE
 RFM69_OOK_BR57_6_FD120.
 
#define RFM69_OOK_BR125_FD125   RFM69_CONFIG_OOK, RFM69_BITRATEMSB_125000, RFM69_BITRATELSB_125000, RFM69_FDEVMSB_125000, RFM69_FDEVLSB_125000, RFM69_RXBW_010_16_2, RFM69_CONFIG_WHITE
 RFM69_OOK_BR125_FD125.
 
#define RFM69_OOK_BR250_FD250   RFM69_CONFIG_OOK, RFM69_BITRATEMSB_250000, RFM69_BITRATELSB_250000, RFM69_FDEVMSB_250000, RFM69_FDEVLSB_250000, RFM69_RXBW_111_16_0, RFM69_CONFIG_WHITE
 RFM69_OOK_BR250_FD250.
 
#define MY_RFM69_MODEM_CONFIGURATION   RFM69_FSK_BR55_5_FD50
 default setting, RFM69_FSK_BR55_5_FD50
 
#define RFM69_HEADER_LEN   sizeof(rfm69_header_t)
 Size header inside payload.
 
#define RFM69_MAX_PAYLOAD_LEN   (RFM69_MAX_PACKET_LEN - RFM69_HEADER_LEN)
 Max payload length.
 
#define LOCAL   static
 static
 

Typedefs

typedef uint8_t rfm69_sequenceNumber_t
 Sequence number data type.
 
typedef uint8_t rfm69_RSSI_t
 RSSI data type.
 
typedef int8_t rfm69_SNR_t
 SNR data type.
 
typedef uint8_t rfm69_controlFlags_t
 Control flag data type.
 
typedef int8_t rfm69_powerlevel_t
 Power level in dBm.
 

Enumerations

enum  rfm69_radio_mode_t {
  RFM69_RADIO_MODE_RX = 0, RFM69_RADIO_MODE_TX = 1, RFM69_RADIO_MODE_CAD = 2, RFM69_RADIO_MODE_SLEEP = 3,
  RFM69_RADIO_MODE_STDBY = 4, RFM69_RADIO_MODE_SYNTH = 5, RFM69_RADIO_MODE_LISTEN = 6
}
 Radio modes. More...
 

Functions

LOCAL void RFM69_handler (void)
 RFM69_handler.
 
LOCAL void RFM69_clearFIFO (void)
 Clear flags and FIFO.
 
LOCAL bool RFM69_channelFree (void)
 Check for channel activity. More...
 
LOCAL void RFM69_interruptHandling (void)
 RFM69_interruptHandling.
 
LOCAL bool RFM69_initialise (const uint32_t frequencyHz)
 Initialise the driver transport hardware and software. More...
 
LOCAL void RFM69_setAddress (const uint8_t addr)
 Set the driver/node address. More...
 
LOCAL uint8_t RFM69_getAddress (void)
 Get driver/node address. More...
 
LOCAL bool RFM69_available (void)
 Tests whether a new message is available. More...
 
LOCAL uint8_t RFM69_receive (uint8_t *buf, const uint8_t maxBufSize)
 If a valid message is received, copy it to buf and return length. 0 byte messages are permitted. More...
 
LOCAL bool RFM69_sendFrame (rfm69_packet_t *packet, const bool increaseSequenceCounter=true)
 RFM69_sendFrame. More...
 
LOCAL bool RFM69_send (const uint8_t recipient, uint8_t *data, const uint8_t len, const rfm69_controlFlags_t flags, const bool increaseSequenceCounter=true)
 RFM69_send. More...
 
LOCAL void RFM69_setFrequency (const uint32_t frequencyHz)
 Sets the transmitter and receiver center frequency. More...
 
LOCAL bool RFM69_setTxPowerLevel (rfm69_powerlevel_t newPowerLevel)
 Sets the transmitter power output level, and configures the transmitter pin. More...
 
LOCAL rfm69_powerlevel_t RFM69_getTxPowerLevel (void)
 Reports the transmitter power output level in dBm. More...
 
LOCAL uint8_t RFM69_getTxPowerPercent (void)
 Reports the transmitter power output level in percents. More...
 
LOCAL bool RFM69_sleep (void)
 Sets the radio into low-power sleep mode. More...
 
LOCAL bool RFM69_standBy (void)
 Sets the radio to standby mode. More...
 
LOCAL void RFM69_powerDown (void)
 Power down radio (HW)
 
LOCAL void RFM69_powerUp (void)
 Power up radio (HW)
 
LOCAL void RFM69_sendACK (const uint8_t recipient, const rfm69_sequenceNumber_t sequenceNumber, const rfm69_RSSI_t RSSI)
 RFM69_sendACK. More...
 
LOCAL bool RFM69_sendWithRetry (const uint8_t recipient, const void *buffer, const uint8_t bufferSize, const bool noACK)
 RFM69_sendWithRetry. More...
 
LOCAL bool RFM69_setRadioMode (const rfm69_radio_mode_t newRadioMode)
 RFM69_setRadioMode. More...
 
LOCAL void RFM69_interruptHandler (void)
 Low level interrupt handler.
 
LOCAL int16_t RFM69_getSendingRSSI (void)
 RFM69_getSendingRSSI. More...
 
LOCAL int16_t RFM69_getReceivingRSSI (void)
 RFM69_getReceivingRSSI. More...
 
LOCAL bool RFM69_executeATC (const rfm69_RSSI_t currentRSSI, const rfm69_RSSI_t targetRSSI)
 RFM69_executeATC. More...
 
LOCAL void RFM69_setConfiguration (void)
 RFM69_setConfiguration Set general radio register configuration TODO temp use setmodemregisters.
 
LOCAL bool RFM69_isModeReady (void)
 RFM69_isModeReady. More...
 
LOCAL bool RFM69_sanityCheck (void)
 RFM69_sanityCheck detect HW defect, configuration errors or interrupted SPI line. More...
 
LOCAL void RFM69_encrypt (const char *key)
 RFM69_encrypt Set encryption mode. More...
 
LOCAL void RFM69_setHighPowerRegs (const bool onOff)
 RFM69_setHighPowerRegs. More...
 
LOCAL rfm69_RSSI_t RFM69_readRSSI (const bool forceTrigger=false)
 RFM69_readRSSI. More...
 
LOCAL void RFM69_ATCmode (const bool onOff, const int16_t targetRSSI=RFM69_TARGET_RSSI_DBM)
 RFM69_ATCmode. More...
 
LOCAL void RFM69_readAllRegs (void)
 RFM69_readAllRegs Read and display all RFM69 register contents. More...
 

Enumeration Type Documentation

◆ rfm69_radio_mode_t

Radio modes.

Enumerator
RFM69_RADIO_MODE_RX 

RX mode.

RFM69_RADIO_MODE_TX 

TX mode.

RFM69_RADIO_MODE_CAD 

CAD mode.

RFM69_RADIO_MODE_SLEEP 

SLEEP mode.

RFM69_RADIO_MODE_STDBY 

STDBY mode.

RFM69_RADIO_MODE_SYNTH 

SYNTH mode.

RFM69_RADIO_MODE_LISTEN 

LISTEN mode.

Definition at line 241 of file RFM69_new.h.

Function Documentation

◆ RFM69_ATCmode()

LOCAL void RFM69_ATCmode ( const bool  onOff,
const int16_t  targetRSSI = RFM69_TARGET_RSSI_DBM 
)

RFM69_ATCmode.

Parameters
targetRSSITarget RSSI for transmitter (default -60)
onOffTrue to enable ATC

◆ RFM69_available()

LOCAL bool RFM69_available ( void  )

Tests whether a new message is available.

Returns
True if a new, complete, error-free uncollected message is available to be retreived by RFM69_receive()

◆ RFM69_channelFree()

LOCAL bool RFM69_channelFree ( void  )

Check for channel activity.

Returns
True if channel activity under RFM69_CSMA_LIMIT_DBM

◆ RFM69_encrypt()

LOCAL void RFM69_encrypt ( const char *  key)

RFM69_encrypt Set encryption mode.

Parameters
keyif key is null, encryption is disabled. Key has to be 16 bytes!

◆ RFM69_executeATC()

LOCAL bool RFM69_executeATC ( const rfm69_RSSI_t  currentRSSI,
const rfm69_RSSI_t  targetRSSI 
)

RFM69_executeATC.

Parameters
currentRSSI
targetRSSI
Returns
True if power level adjusted

◆ RFM69_getAddress()

LOCAL uint8_t RFM69_getAddress ( void  )

Get driver/node address.

Returns
Node address

◆ RFM69_getReceivingRSSI()

LOCAL int16_t RFM69_getReceivingRSSI ( void  )

RFM69_getReceivingRSSI.

Returns
RSSI Signal strength of last received packet

◆ RFM69_getSendingRSSI()

LOCAL int16_t RFM69_getSendingRSSI ( void  )

RFM69_getSendingRSSI.

Returns
RSSI Own RSSI as measured at the receiving node of last sent packet (if ACK & ATC enabled)

◆ RFM69_getTxPowerLevel()

LOCAL rfm69_powerlevel_t RFM69_getTxPowerLevel ( void  )

Reports the transmitter power output level in dBm.

Returns
power level

◆ RFM69_getTxPowerPercent()

LOCAL uint8_t RFM69_getTxPowerPercent ( void  )

Reports the transmitter power output level in percents.

Returns
power level

◆ RFM69_initialise()

LOCAL bool RFM69_initialise ( const uint32_t  frequencyHz)

Initialise the driver transport hardware and software.

Parameters
frequencyHzFrequency in Hz
Returns
True if initialisation succeeded

◆ RFM69_isModeReady()

LOCAL bool RFM69_isModeReady ( void  )

RFM69_isModeReady.

Returns
True if Mode Ready is ok, false is timeout

◆ RFM69_readAllRegs()

LOCAL void RFM69_readAllRegs ( void  )

RFM69_readAllRegs Read and display all RFM69 register contents.

Note
define RFM69_REGISTER_DETAIL for register content decoding.

◆ RFM69_readRSSI()

LOCAL rfm69_RSSI_t RFM69_readRSSI ( const bool  forceTrigger = false)

RFM69_readRSSI.

Parameters
forceTrigger
Returns
RSSI (internal format)

◆ RFM69_receive()

LOCAL uint8_t RFM69_receive ( uint8_t *  buf,
const uint8_t  maxBufSize 
)

If a valid message is received, copy it to buf and return length. 0 byte messages are permitted.

Parameters
bufLocation to copy the received message
maxBufSizeMax buffer size
Returns
Number of bytes

◆ RFM69_sanityCheck()

LOCAL bool RFM69_sanityCheck ( void  )

RFM69_sanityCheck detect HW defect, configuration errors or interrupted SPI line.

Returns
True if radio sanity check passed

◆ RFM69_send()

LOCAL bool RFM69_send ( const uint8_t  recipient,
uint8_t *  data,
const uint8_t  len,
const rfm69_controlFlags_t  flags,
const bool  increaseSequenceCounter = true 
)

RFM69_send.

Parameters
recipient
data
len
flags
increaseSequenceCounter
Returns
True if frame sent

◆ RFM69_sendACK()

LOCAL void RFM69_sendACK ( const uint8_t  recipient,
const rfm69_sequenceNumber_t  sequenceNumber,
const rfm69_RSSI_t  RSSI 
)

RFM69_sendACK.

Parameters
recipient
sequenceNumber
RSSI(rfm95_RSSI_t)

◆ RFM69_sendFrame()

LOCAL bool RFM69_sendFrame ( rfm69_packet_t *  packet,
const bool  increaseSequenceCounter = true 
)

RFM69_sendFrame.

Parameters
packet
increaseSequenceCounter
Returns
True if packet sent

◆ RFM69_sendWithRetry()

LOCAL bool RFM69_sendWithRetry ( const uint8_t  recipient,
const void *  buffer,
const uint8_t  bufferSize,
const bool  noACK 
)

RFM69_sendWithRetry.

Parameters
recipient
buffer
bufferSize
noACK
Returns
True if packet successfully sent

◆ RFM69_setAddress()

LOCAL void RFM69_setAddress ( const uint8_t  addr)

Set the driver/node address.

Parameters
addr

◆ RFM69_setFrequency()

LOCAL void RFM69_setFrequency ( const uint32_t  frequencyHz)

Sets the transmitter and receiver center frequency.

Parameters
frequencyHzFrequency in Hz

◆ RFM69_setHighPowerRegs()

LOCAL void RFM69_setHighPowerRegs ( const bool  onOff)

RFM69_setHighPowerRegs.

Parameters
onOff

◆ RFM69_setRadioMode()

LOCAL bool RFM69_setRadioMode ( const rfm69_radio_mode_t  newRadioMode)

RFM69_setRadioMode.

Parameters
newRadioMode
Returns
True if mode changed

◆ RFM69_setTxPowerLevel()

LOCAL bool RFM69_setTxPowerLevel ( rfm69_powerlevel_t  newPowerLevel)

Sets the transmitter power output level, and configures the transmitter pin.

Parameters
newPowerLevelTransmitter power level in dBm (-18 to +20dBm)
Returns
True power level adjusted

◆ RFM69_sleep()

LOCAL bool RFM69_sleep ( void  )

Sets the radio into low-power sleep mode.

Returns
true if sleep mode was successfully entered

◆ RFM69_standBy()

LOCAL bool RFM69_standBy ( void  )

Sets the radio to standby mode.

Returns
true if standby mode was successfully entered