upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions

API for the RF22 Transceiver Module. More...

Detailed Description

This base class provides basic functions for sending and receiving unaddressable, unreliable datagrams of arbitrary length to 255 octets per packet.

Subclasses may use this class to implement reliable, addressed datagrams and streams, mesh routers, repeaters, translators etc.

On transmission, the TO and FROM addresses default to 0x00, unless changed by a subclass. On reception the TO addressed is checked against the node address (defaults to 0x00) or the broadcast address (which is 0xff). The ID and FLAGS are set to 0, and not checked by this class. This permits use of the this base RF22 class as an unaddressable, unreliable datagram service. Subclasses are expected to change this behavior to add node address, ids, retransmission etc.

Naturally, for any 2 radios to communicate that must be configured to use the same frequency and modulation scheme.

rf22.jpg


RF22 Sensor image provided by SparkFun* under CC BY 2.0.

int
main(int argc, char** argv)
{
// SPI bus 0, CS pin 10, INTR pin 2
upm::RF22 rf22(0, 10, 2);
if (!rf22.init()) {
std::cout << "RF22 init failed" << std::endl;
return 0x1;
}
uint8_t buf[RF22_MAX_MESSAGE_LEN];
uint8_t len = sizeof(buf);
signal(SIGINT, sig_handler);
while (amWorking) {
// rf22.waitAvailable();
rf22.waitAvailableTimeout(500);
// Should be a message for us now
if (rf22.recv(buf, &len)) {
std::cout << "got request: " << (char*) buf << std::endl;
// Send a reply
uint8_t data[] = "And hello back to you";
rf22.send(data, sizeof(data));
rf22.waitPacketSent();
} else {
// Do whatever you need.
}
}
std::cout << "Exit 'rfm22-server'" << std::endl;
return 0;
}
int
main(int argc, char** argv)
{
// SPI bus 0, CS pin 10, INTR pin 2
upm::RF22 rf22(0, 10, 2);
if (!rf22.init()) {
std::cout << "RF22 init failed" << std::endl;
return 0x1;
}
uint8_t data[] = "Hello World!";
uint8_t buf[RF22_MAX_MESSAGE_LEN];
uint8_t len = sizeof(buf);
signal(SIGINT, sig_handler);
while (amWorking) {
std::cout << "Sending to rf22_server" << std::endl;
// Send a message to rf22_server
rf22.send(data, sizeof(data));
rf22.waitPacketSent();
// Now wait for a reply
rf22.waitAvailableTimeout(1000000);
if (rf22.recv(buf, &len)) {
std::cout << "got response: " << (char*) buf << std::endl;
} else {
std::cout << "!!! NO RESPONSE !!!" << std::endl;
}
}
std::cout << "Exit 'rfm22-client'" << std::endl;
return 0;
}

Data Structures

struct  ModemConfig
 Defines register values for a set of modem configuration registers. More...
 

Public Types

enum  ModemConfigChoice {
  UnmodulatedCarrier = 0, FSK_PN9_Rb2Fd5, FSK_Rb2Fd5, FSK_Rb2_4Fd36,
  FSK_Rb4_8Fd45, FSK_Rb9_6Fd45, FSK_Rb19_2Fd9_6, FSK_Rb38_4Fd19_6,
  FSK_Rb57_6Fd28_8, FSK_Rb125Fd125, GFSK_Rb2Fd5, GFSK_Rb2_4Fd36,
  GFSK_Rb4_8Fd45, GFSK_Rb9_6Fd45, GFSK_Rb19_2Fd9_6, GFSK_Rb38_4Fd19_6,
  GFSK_Rb57_6Fd28_8, GFSK_Rb125Fd125, OOK_Rb1_2Bw75, OOK_Rb2_4Bw335,
  OOK_Rb4_8Bw335, OOK_Rb9_6Bw335, OOK_Rb19_2Bw335, OOK_Rb38_4Bw335,
  OOK_Rb40Bw335
}
 

Public Member Functions

 RF22 (int spiBus=0, int slaveSelectPin=10, int interruptPin=2)
 
virtual ~RF22 ()
 
uint8_t init ()
 
void reset ()
 
uint8_t spiRead (uint8_t reg)
 
void spiWrite (uint8_t reg, uint8_t val)
 
void spiBurstRead (uint8_t reg, uint8_t *dest, uint8_t len)
 
void spiBurstWrite (uint8_t reg, const uint8_t *src, uint8_t len)
 
uint8_t statusRead ()
 
uint8_t adcRead (uint8_t adcsel=RF22_ADCSEL_INTERNAL_TEMPERATURE_SENSOR, uint8_t adcref=RF22_ADCREF_BANDGAP_VOLTAGE, uint8_t adcgain=0, uint8_t adcoffs=0)
 
uint8_t temperatureRead (uint8_t tsrange=RF22_TSRANGE_M64_64C, uint8_t tvoffs=0)
 
uint16_t wutRead ()
 
void setWutPeriod (uint16_t wtm, uint8_t wtr=0, uint8_t wtd=0)
 
uint8_t setFrequency (float center, float afcPullInRange=0.05)
 
uint8_t setFHStepSize (uint8_t fhs)
 
uint8_t setFHChannel (uint8_t fhch)
 
uint8_t rssiRead ()
 
uint8_t ezmacStatusRead ()
 
void setMode (uint8_t mode)
 
void setModeIdle ()
 
void setModeRx ()
 
void setModeTx ()
 
uint8_t mode ()
 
void setTxPower (uint8_t power)
 
void setModemRegisters (const ModemConfig *config)
 
uint8_t setModemConfig (ModemConfigChoice index)
 
uint8_t available ()
 
void waitAvailable ()
 
bool waitAvailableTimeout (unsigned long timeout)
 
uint8_t recv (uint8_t *buf, uint8_t *len)
 
uint8_t send (const uint8_t *data, uint8_t len)
 
void waitPacketSent ()
 
void setPromiscuous (uint8_t promiscuous)
 
uint8_t headerTo ()
 
uint8_t headerFrom ()
 
uint8_t headerId ()
 
uint8_t headerFlags ()
 
uint8_t lastRssi ()
 
void setPreambleLength (uint8_t nibbles)
 
void setSyncWords (const uint8_t *syncWords, uint8_t len)
 

Static Public Member Functions

static void printBuffer (const char *prompt, const uint8_t *buf, uint8_t len)
 

Protected Member Functions

void handleInterrupt ()
 
void clearRxBuf ()
 
void clearTxBuf ()
 
uint8_t fillTxBuf (const uint8_t *data, uint8_t len)
 
uint8_t appendTxBuf (const uint8_t *data, uint8_t len)
 
void sendNextFragment ()
 
void readNextFragment ()
 
void resetFifos ()
 
void resetRxFifo ()
 
void resetTxFifo ()
 
virtual void handleExternalInterrupt ()
 
virtual void handleWakeupTimerInterrupt ()
 
void setHeaderTo (uint8_t to)
 
void setHeaderFrom (uint8_t from)
 
void setHeaderId (uint8_t id)
 
void setHeaderFlags (uint8_t flags)
 
void startTransmit ()
 
void restartTransmit ()
 
uint64_t getTimestamp ()
 

Member Enumeration Documentation

Choices for setModemConfig() for a selected subset of common modulation types, and data rates. If you need another configuration, use the register calculator. and call setModemRegisters() with your desired settings These are indexes into _modemConfig

Enumerator
UnmodulatedCarrier 

Unmodulated carrier for testing.

FSK_PN9_Rb2Fd5 

FSK, No Manchester, Rb = 2kbs, Fd = 5kHz, PN9 random modulation for testing.

FSK_Rb2Fd5 

FSK, No Manchester, Rb = 2kbs, Fd = 5kHz.

FSK_Rb2_4Fd36 

FSK, No Manchester, Rb = 2.4kbs, Fd = 36kHz.

FSK_Rb4_8Fd45 

FSK, No Manchester, Rb = 4.8kbs, Fd = 45kHz.

FSK_Rb9_6Fd45 

FSK, No Manchester, Rb = 9.6kbs, Fd = 45kHz.

FSK_Rb19_2Fd9_6 

FSK, No Manchester, Rb = 19.2kbs, Fd = 9.6kHz.

FSK_Rb38_4Fd19_6 

FSK, No Manchester, Rb = 38.4kbs, Fd = 19.6kHz.

FSK_Rb57_6Fd28_8 

FSK, No Manchester, Rb = 57.6kbs, Fd = 28.8kHz.

FSK_Rb125Fd125 

FSK, No Manchester, Rb = 125kbs, Fd = 125kHz.

GFSK_Rb2Fd5 

GFSK, No Manchester, Rb = 2kbs, Fd = 5kHz.

GFSK_Rb2_4Fd36 

GFSK, No Manchester, Rb = 2.4kbs, Fd = 36kHz.

GFSK_Rb4_8Fd45 

GFSK, No Manchester, Rb = 4.8kbs, Fd = 45kHz.

GFSK_Rb9_6Fd45 

GFSK, No Manchester, Rb = 9.6kbs, Fd = 45kHz.

GFSK_Rb19_2Fd9_6 

GFSK, No Manchester, Rb = 19.2kbs, Fd = 9.6kHz.

GFSK_Rb38_4Fd19_6 

GFSK, No Manchester, Rb = 38.4kbs, Fd = 19.6kHz.

GFSK_Rb57_6Fd28_8 

GFSK, No Manchester, Rb = 57.6kbs, Fd = 28.8kHz.

GFSK_Rb125Fd125 

GFSK, No Manchester, Rb = 125kbs, Fd = 125kHz.

OOK_Rb1_2Bw75 

OOK, No Manchester, Rb = 1.2kbs, Rx Bandwidth = 75kHz.

OOK_Rb2_4Bw335 

OOK, No Manchester, Rb = 2.4kbs, Rx Bandwidth = 335kHz.

OOK_Rb4_8Bw335 

OOK, No Manchester, Rb = 4.8kbs, Rx Bandwidth = 335kHz.

OOK_Rb9_6Bw335 

OOK, No Manchester, Rb = 9.6kbs, Rx Bandwidth = 335kHz.

OOK_Rb19_2Bw335 

OOK, No Manchester, Rb = 19.2kbs, Rx Bandwidth = 335kHz.

OOK_Rb38_4Bw335 

OOK, No Manchester, Rb = 38.4kbs, Rx Bandwidth = 335kHz.

OOK_Rb40Bw335 

OOK, No Manchester, Rb = 40kbs, Rx Bandwidth = 335kHz.

Constructor & Destructor Documentation

RF22 ( int  spiBus = 0,
int  slaveSelectPin = 10,
int  interruptPin = 2 
)

Constructor. You can have multiple instances, but each instance must have its own interrupt and slave select pin. After constructing, you must call init() to initialize the interface and the radio module

Parameters
[in]spiBusPointer to the SPI interface object to use. Default 0 or the standard Arduino hardware SPI interface
[in]slaveSelectPinthe Arduino pin number of the output to use to select the RF22 before accessing it. Default is 10 or the normal SS pin for Arduino
[in]interruptPinThe interrupt pin number to use. Default is 2
~RF22 ( )
virtual

Destructor.

Member Function Documentation

uint8_t init ( )

Initializes this instance and the radio module connected to it. The following steps are taken:

  • Software reset the RF22 module
  • Checks the connected RF22 module is either a RF22_DEVICE_TYPE_RX_TRX or a RF22_DEVICE_TYPE_TX
  • Configures the RF22 module
  • Sets the frequency to 434.0 MHz
  • Sets the modem data rate to FSK_Rb2_4Fd36
    Returns
    true if everything was successful

Here is the call graph for this function:

void reset ( )

Issues a software reset to the RF22 module. Blocks for 1ms to ensure the reset is complete.

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t spiRead ( uint8_t  reg)

Reads a single register from the RF22

Parameters
[in]regRegister number, one of RF22_REG_*
Returns
The value of the register

Here is the call graph for this function:

Here is the caller graph for this function:

void spiWrite ( uint8_t  reg,
uint8_t  val 
)

Writes a single byte to the RF22

Parameters
[in]regRegister number, one of RF22_REG_*
[in]valThe value to write

Here is the call graph for this function:

Here is the caller graph for this function:

void spiBurstRead ( uint8_t  reg,
uint8_t *  dest,
uint8_t  len 
)

Reads a number of consecutive registers from the RF22 using burst read mode

Parameters
[in]regRegister number of the first register, one of RF22_REG_*
[in]destArray to write the register values to. Must be at least len bytes
[in]lenNumber of bytes to read

Here is the caller graph for this function:

void spiBurstWrite ( uint8_t  reg,
const uint8_t *  src,
uint8_t  len 
)

Write a number of consecutive registers using burst write mode

Parameters
[in]regRegister number of the first register, one of RF22_REG_*
[in]srcArray of new register values to write. Must be at least len bytes
[in]lenNumber of bytes to write

Here is the caller graph for this function:

uint8_t statusRead ( )

Reads and returns the device status register RF22_REG_02_DEVICE_STATUS

Returns
The value of the device status register

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t adcRead ( uint8_t  adcsel = RF22_ADCSEL_INTERNAL_TEMPERATURE_SENSOR,
uint8_t  adcref = RF22_ADCREF_BANDGAP_VOLTAGE,
uint8_t  adcgain = 0,
uint8_t  adcoffs = 0 
)

Reads a value from the on-chip analog-digital converter

Parameters
[in]adcselSelects the ADC input to measure. One of RF22_ADCSEL_*. Defaults to the internal temperature sensor
[in]adcrefSpecifies the reference voltage to use. One of RF22_ADCREF_*. Defaults to the internal bandgap voltage.
[in]adcgainAmplifier gain selection.
[in]adcoffsAmplifier offset (0 to 15).
Returns
The analog value. 0 to 255.

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t temperatureRead ( uint8_t  tsrange = RF22_TSRANGE_M64_64C,
uint8_t  tvoffs = 0 
)

Reads the on-chip temperature sensor

Parameters
[in]tsrangeSpecifies the temperature range to use. One of RF22_TSRANGE_*
[in]tvoffsSpecifies the temperature value offset. This is actually signed value added to the measured temperature value
Returns
The measured temperature.

Here is the call graph for this function:

uint16_t wutRead ( )

Reads the wakeup timer value in registers RF22_REG_17_WAKEUP_TIMER_VALUE1 and RF22_REG_18_WAKEUP_TIMER_VALUE2

Returns
The wakeup timer value

Here is the call graph for this function:

void setWutPeriod ( uint16_t  wtm,
uint8_t  wtr = 0,
uint8_t  wtd = 0 
)

Sets the wakeup timer period registers RF22_REG_14_WAKEUP_TIMER_PERIOD1, RF22_REG_15_WAKEUP_TIMER_PERIOD2 and RF22_R<EG_16_WAKEUP_TIMER_PERIOD3

Parameters
[in]wtmWakeup timer mantissa value
[in]wtrWakeup timer exponent R value
[in]wtdWakeup timer exponent D value

Here is the call graph for this function:

uint8_t setFrequency ( float  center,
float  afcPullInRange = 0.05 
)

Sets the transmitter and receiver center frequency

Parameters
[in]centerFrequency in MHz. 240.0 to 960.0. Caution, some versions of RF22 and derivatives implemented more restricted frequency ranges.
[in]afcPullInRangeSets the AF Pull In Range in MHz. Defaults to 0.05MHz (50kHz). Range is 0.0 to 0.159375 for frequencies 240.0 to 480MHz, and 0.0 to 0.318750MHz for frequencies 480.0 to 960MHz,
Returns
true if the selected frequency center + (fhch * fhs) is within range and the afcPullInRange is within range

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t setFHStepSize ( uint8_t  fhs)

Sets the frequency hopping step size.

Parameters
[in]fhsFrequency Hopping step size in 10kHz increments
Returns
true if center + (fhch * fhs) is within limits

Here is the call graph for this function:

uint8_t setFHChannel ( uint8_t  fhch)

Sets the frequency hopping channel. Adds fhch * fhs to center frequency

Parameters
[in]fhchThe channel number
Returns
true if the selected frequency center + (fhch * fhs) is within range

Here is the call graph for this function:

uint8_t rssiRead ( )

Reads and returns the current RSSI value from register RF22_REG_26_RSSI. If you want to find the RSSI of the last received message, use lastRssi() instead.

Returns
The current RSSI value

Here is the call graph for this function:

uint8_t ezmacStatusRead ( )

Reads and returns the current EZMAC value from register RF22_REG_31_EZMAC_STATUS

Returns
The current EZMAC value

Here is the call graph for this function:

void setMode ( uint8_t  mode)

Sets the parameters for the RF22 Idle mode in register RF22_REG_07_OPERATING_MODE. Idle mode is the mode the RF22 will be in when not transmitting or receiving. The default idle mode is RF22_XTON i.e. READY mode.

Parameters
[in]modeMask of mode bits, using RF22_SWRES, RF22_ENLBD, RF22_ENWT, RF22_X32KSEL, RF22_PLLON, RF22_XTON.

Here is the call graph for this function:

Here is the caller graph for this function:

void setModeIdle ( )

If current mode is Rx or Tx changes it to Idle. If the transmitter or receiver is running, disables them.

Here is the call graph for this function:

void setModeRx ( )

If current mode is Tx or Idle, changes it to Rx. Starts the receiver in the RF22.

Here is the call graph for this function:

Here is the caller graph for this function:

void setModeTx ( )

If current mode is Rx or Idle, changes it to Rx. Starts the transmitter in the RF22.

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t mode ( )

Returns the operating mode of the library.

Returns
the current mode, one of RF22_MODE_*
void setTxPower ( uint8_t  power)

Sets the transmitter power output level in register RF22_REG_6D_TX_POWER. Be a good neighbor and set the lowest power level you need. After init(), the power will be set to RF22_TXPOW_8DBM. Caution: In some countries you may only select RF22_TXPOW_17DBM if you are also using frequency hopping.

Parameters
[in]powerTransmitter power level, one of RF22_TXPOW_*

Here is the call graph for this function:

Here is the caller graph for this function:

void setModemRegisters ( const ModemConfig config)

Sets all the registered required to configure the data modem in the RF22, including the data rate, bandwidths etc. You can use this to configure the modem with custom configurations if none of the canned configurations in ModemConfigChoice suit you.

Parameters
[in]configA ModemConfig structure containing values for the modem configuration registers.

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t setModemConfig ( ModemConfigChoice  index)

Select one of the predefined modem configurations. If you need a modem configuration not provided here, use setModemRegisters() with your own ModemConfig.

Parameters
[in]indexThe configuration choice.
Returns
true if index is a valid choice.

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t available ( )

Starts the receiver and checks whether a received message is available. This can be called multiple times in a timeout loop

Returns
true if a complete, valid message has been received and is able to be retrieved by recv()

Here is the call graph for this function:

Here is the caller graph for this function:

void waitAvailable ( )

Starts the receiver and blocks until a valid received message is available.

Here is the call graph for this function:

bool waitAvailableTimeout ( unsigned long  timeout)

Starts the receiver and blocks until a received message is available or a timeout

Parameters
[in]timeoutMaximum time to wait in milliseconds.
Returns
true if a message is available

Here is the call graph for this function:

uint8_t recv ( uint8_t *  buf,
uint8_t *  len 
)

Turns the receiver on if it not already on. If there is a valid message available, copy it to buf and return true else return false. If a message is copied, *len is set to the length (Caution, 0 length messages are permitted). You should be sure to call this function frequently enough to not miss any messages It is recommended that you call it in your main loop.

Parameters
[in]bufLocation to copy the received message
[in,out]lenPointer to available space in buf. Set to the actual number of octets copied.
Returns
true if a valid message was copied to buf

Here is the call graph for this function:

uint8_t send ( const uint8_t *  data,
uint8_t  len 
)

Waits until any previous transmit packet is finished being transmitted with waitPacketSent(). Then loads a message into the transmitter and starts the transmitter. Note that a message length of 0 is NOT permitted.

Parameters
[in]dataArray of data to be sent
[in]lenNumber of bytes of data to send (> 0)
Returns
true if the message length was valid and it was correctly queued for transmit

Here is the call graph for this function:

void waitPacketSent ( )

Blocks until the RF22 is not in mode RF22_MODE_TX (i.e. until the RF22 is not transmitting). This effectively waits until any previous transmit packet is finished being transmitted.

Here is the caller graph for this function:

void setPromiscuous ( uint8_t  promiscuous)

Tells the receiver to accept messages with any TO address, not just messages addressed to this node or the broadcast address

Parameters
[in]promiscuoustrue if you wish to receive messages with any TO address

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t headerTo ( )

Returns the TO header of the last received message

Returns
The TO header

Here is the call graph for this function:

uint8_t headerFrom ( )

Returns the FROM header of the last received message

Returns
The FROM header

Here is the call graph for this function:

uint8_t headerId ( )

Returns the ID header of the last received message

Returns
The ID header

Here is the call graph for this function:

uint8_t headerFlags ( )

Returns the FLAGS header of the last received message

Returns
The FLAGS header

Here is the call graph for this function:

uint8_t lastRssi ( )

Returns the RSSI (Receiver Signal Strength Indicator) of the last received message. This measurement is taken when the preamble has been received. It is a (non-linear) measure of the received signal strength.

Returns
The RSSI
void printBuffer ( const char *  prompt,
const uint8_t *  buf,
uint8_t  len 
)
static

Prints a data buffer in HEX. For diagnostic use

Parameters
[in]promptstring to preface the print
[in]bufLocation of the buffer to print
[in]lenLength of the buffer in octets.
void setPreambleLength ( uint8_t  nibbles)

Sets the length of the preamble in 4-bit nibbles. Caution: this should be set to the same value on all nodes in your network. Default is 8. Sets the message preamble length in RF22_REG_34_PREAMBLE_LENGTH

Parameters
[in]nibblesPreamble length in nibbles of 4 bits each.

Here is the call graph for this function:

Here is the caller graph for this function:

void setSyncWords ( const uint8_t *  syncWords,
uint8_t  len 
)

Sets the sync words for transmit and receive in registers RF22_REG_36_SYNC_WORD3 to RF22_REG_39_SYNC_WORD0 Caution: this should be set to the same value on all nodes in your network. Default is { 0x2d, 0xd4 }

Parameters
[in]syncWordsArray of sync words
[in]lenNumber of sync words to set

Here is the call graph for this function:

Here is the caller graph for this function:

void handleInterrupt ( )
protected

This is a low level function to handle the interrupts for one instance of RF22. Called automatically when interrupt pin goes low, should not need to be called by user.

Here is the call graph for this function:

Here is the caller graph for this function:

void clearRxBuf ( )
protected

Clears the receiver buffer. Internal use only

Here is the caller graph for this function:

void clearTxBuf ( )
protected

Clears the transmitter buffer Internal use only

Here is the caller graph for this function:

uint8_t fillTxBuf ( const uint8_t *  data,
uint8_t  len 
)
protected

Fills the transmitter buffer with the data of a message to be sent

Parameters
[in]dataArray of data bytes to be sent (1 to 255)
[in]lenNumber of data bytes in data (> 0)
Returns
true if the message length is valid

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t appendTxBuf ( const uint8_t *  data,
uint8_t  len 
)
protected

Appends the transmitter buffer with the data of a message to be sent

Parameters
[in]dataArray of data bytes to be sent (0 to 255)
[in]lenNumber of data bytes in data
Returns
false if the resulting message would exceed RF22_MAX_MESSAGE_LEN, else true

Here is the caller graph for this function:

void sendNextFragment ( )
protected

Internal function to load the next fragment of the current message into the transmitter FIFO Internal use only

Here is the call graph for this function:

Here is the caller graph for this function:

void readNextFragment ( )
protected

Function to copy the next fragment from the receiver FIFO into the receiver buffer

Here is the call graph for this function:

Here is the caller graph for this function:

void resetFifos ( )
protected

Clears the RF22 Rx and Tx FIFOs Internal use only

Here is the call graph for this function:

Here is the caller graph for this function:

void resetRxFifo ( )
protected

Clears the RF22 Rx FIFO Internal use only

Here is the call graph for this function:

Here is the caller graph for this function:

void resetTxFifo ( )
protected

Clears the RF22 Tx FIFO Internal use only

Here is the call graph for this function:

void handleExternalInterrupt ( )
protectedvirtual

This function will be called by handleInterrupt() if an RF22 external interrupt occurs. This can only happen if external interrupts are enabled in the RF22 (which they are not by default). Subclasses may override this function to get control when an RF22 external interrupt occurs.

Here is the caller graph for this function:

void handleWakeupTimerInterrupt ( )
protectedvirtual

This function will be called by handleInterrupt() if an RF22 wakeup timer interrupt occurs. This can only happen if wakeup timer interrupts are enabled in the RF22 (which they are not by default). Subclasses may override this function to get control when an RF22 wakeup timer interrupt occurs.

Here is the caller graph for this function:

void setHeaderTo ( uint8_t  to)
protected

Sets the TO header to be sent in all subsequent messages

Parameters
[in]toThe new TO header value

Here is the call graph for this function:

Here is the caller graph for this function:

void setHeaderFrom ( uint8_t  from)
protected

Sets the FROM header to be sent in all subsequent messages

Parameters
[in]fromThe new FROM header value

Here is the call graph for this function:

Here is the caller graph for this function:

void setHeaderId ( uint8_t  id)
protected

Sets the ID header to be sent in all subsequent messages

Parameters
[in]idThe new ID header value

Here is the call graph for this function:

Here is the caller graph for this function:

void setHeaderFlags ( uint8_t  flags)
protected

Sets the FLAGS header to be sent in all subsequent messages

Parameters
[in]flagsThe new FLAGS header value

Here is the call graph for this function:

Here is the caller graph for this function:

void startTransmit ( )
protected

Start the transmission of the contents of the Tx buffer

Here is the call graph for this function:

Here is the caller graph for this function:

void restartTransmit ( )
protected

ReStart the transmission of the contents of the Tx buffer after a transmission failure

Here is the call graph for this function:

Here is the caller graph for this function:


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