RadioLib
Universal wireless communication library for Arduino
CC1101 Class Reference

Control class for CC1101 module. More...

#include <CC1101.h>

Inheritance diagram for CC1101:
PhysicalLayer

Public Member Functions

 CC1101 (Module *module)
 Default constructor. More...
 
ModulegetMod ()
 
int16_t begin (float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=135.0, int8_t power=10, uint8_t preambleLength=16)
 Initialization method. More...
 
int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t receive (uint8_t *data, size_t len) override
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t standby () override
 Sets the module to standby mode. More...
 
int16_t transmitDirect (uint32_t frf=0) override
 Starts direct mode transmission. More...
 
int16_t receiveDirect () override
 Starts direct mode reception. More...
 
int16_t transmitDirectAsync (uint32_t frf=0)
 Starts asynchronous direct mode transmission. More...
 
int16_t receiveDirectAsync ()
 Starts asynchronous direct mode reception. More...
 
int16_t packetMode ()
 Stops direct mode. It is required to call this method to switch from direct transmissions to packet-based transmissions.
 
void setGdo0Action (void(*func)(void), RADIOLIB_INTERRUPT_STATUS dir=RISING)
 Sets interrupt service routine to call when GDO0 activates. More...
 
void clearGdo0Action ()
 Clears interrupt service routine to call when GDO0 activates.
 
void setGdo2Action (void(*func)(void), RADIOLIB_INTERRUPT_STATUS dir=FALLING)
 Sets interrupt service routine to call when GDO2 activates. More...
 
void clearGdo2Action ()
 Clears interrupt service routine to call when GDO0 activates.
 
int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0) override
 Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer. More...
 
int16_t finishTransmit () override
 Clean up after transmission is done. More...
 
int16_t startReceive ()
 Interrupt-driven receive method. GDO0 will be activated when full packet is received. More...
 
int16_t readData (uint8_t *data, size_t len) override
 Reads data received after calling startReceive method. More...
 
int16_t setFrequency (float freq)
 Sets carrier frequency. Allowed values are in bands 300.0 to 348.0 MHz, 387.0 to 464.0 MHz and 779.0 to 928.0 MHz. More...
 
int16_t setBitRate (float br)
 Sets bit rate. Allowed values range from 0.025 to 600.0 kbps. More...
 
int16_t setRxBandwidth (float rxBw)
 Sets receiver bandwidth. Allowed values range from 58.0 to 812.0 kHz. More...
 
int16_t setFrequencyDeviation (float freqDev) override
 Sets frequency deviation. Allowed values range from 1.587 to 380.8 kHz. More...
 
int16_t setOutputPower (int8_t power)
 Sets output power. Allowed values are -30, -20, -15, -10, 0, 5, 7 or 10 dBm. More...
 
int16_t setSyncWord (uint8_t syncH, uint8_t syncL, uint8_t maxErrBits=0, bool requireCarrierSense=false)
 Sets 16-bit sync word as a two byte value. More...
 
int16_t setSyncWord (uint8_t *syncWord, uint8_t len, uint8_t maxErrBits=0, bool requireCarrierSense=false)
 Sets 1 or 2 bytes of sync word. More...
 
int16_t setPreambleLength (uint8_t preambleLength)
 Sets preamble length. More...
 
int16_t setNodeAddress (uint8_t nodeAddr, uint8_t numBroadcastAddrs=0)
 Sets node and broadcast addresses. Calling this method will also enable address filtering. More...
 
int16_t disableAddressFiltering ()
 Disables address filtering. Calling this method will also erase previously set addresses. More...
 
int16_t setOOK (bool enableOOK)
 Enables/disables OOK modulation instead of FSK. More...
 
float getRSSI ()
 Gets RSSI (Recorded Signal Strength Indicator) of the last received packet. More...
 
uint8_t getLQI () const
 Gets LQI (Link Quality Indicator) of the last received packet. More...
 
size_t getPacketLength (bool update=true) override
 Query modem for the packet length of received payload. More...
 
int16_t fixedPacketLengthMode (uint8_t len=RADIOLIB_CC1101_MAX_PACKET_LENGTH)
 Set modem in fixed packet length mode. More...
 
int16_t variablePacketLengthMode (uint8_t maxLen=RADIOLIB_CC1101_MAX_PACKET_LENGTH)
 Set modem in variable packet length mode. More...
 
int16_t enableSyncWordFiltering (uint8_t maxErrBits=0, bool requireCarrierSense=false)
 Enable sync word filtering and generation. More...
 
int16_t disableSyncWordFiltering (bool requireCarrierSense=false)
 Disable preamble and sync word filtering and generation. More...
 
int16_t setCrcFiltering (bool crcOn=true)
 Enable CRC filtering and generation. More...
 
int16_t setPromiscuousMode (bool promiscuous=true)
 Set modem in "sniff" mode: no packet filtering (e.g., no preamble, sync word, address, CRC). More...
 
bool getPromiscuousMode ()
 Get whether the modem is in promiscuous mode: no packet filtering (e.g., no preamble, sync word, address, CRC). More...
 
int16_t setDataShaping (uint8_t sh) override
 Sets Gaussian filter bandwidth-time product that will be used for data shaping. Allowed value is RADIOLIB_SHAPING_0_5. Set to RADIOLIB_SHAPING_NONE to disable data shaping. More...
 
int16_t setEncoding (uint8_t encoding) override
 Sets transmission encoding. Allowed values are RADIOLIB_ENCODING_NRZ, RADIOLIB_ENCODING_MANCHESTER, and RADIOLIB_ENCODING_WHITENING. Note that encoding on CC1101 is applied to the entire stream including preamble, sync word, and CRC. More...
 
void setRfSwitchPins (RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn)
 Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch! More...
 
uint8_t randomByte ()
 Get one truly random byte from RSSI noise. More...
 
int16_t getChipVersion ()
 Read version SPI register. Should return CC1101_VERSION_LEGACY (0x04) or CC1101_VERSION_CURRENT (0x14) if CC1101 is connected and working. More...
 
void setDirectAction (void(*func)(void))
 Set interrupt service routine function to call when data bit is receveid in direct mode. More...
 
void readBit (RADIOLIB_PIN_TYPE pin)
 Function to read and process data bit in direct reception mode. More...
 
int16_t setDIOMapping (RADIOLIB_PIN_TYPE pin, uint8_t value)
 Configure DIO pin mapping to get a given signal on a DIO pin (if available). More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
virtual int16_t transmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Binary transmit method. Must be implemented in module class. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
virtual int16_t receive (uint8_t *data, size_t len)=0
 Binary receive method. Must be implemented in module class. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
virtual int16_t startTransmit (uint8_t *data, size_t len, uint8_t addr=0)=0
 Interrupt-driven binary transmit method. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
virtual int16_t readData (uint8_t *data, size_t len)=0
 Reads data that was received after calling startReceive method. More...
 
- Public Member Functions inherited from PhysicalLayer
 PhysicalLayer (float freqStep, size_t maxPacketLength)
 Default constructor. More...
 
int16_t transmit (__FlashStringHelper *fstr, uint8_t addr=0)
 Arduino Flash String transmit method. More...
 
int16_t transmit (String &str, uint8_t addr=0)
 Arduino String transmit method. More...
 
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method. More...
 
int16_t receive (String &str, size_t len=0)
 Arduino String receive method. More...
 
int16_t startTransmit (String &str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes. More...
 
int16_t readData (String &str, size_t len=0)
 Reads data that was received after calling startReceive method. More...
 
float getFreqStep () const
 Gets the module frequency step size that was set in constructor. More...
 
int32_t random (int32_t max)
 Get truly random number in range 0 - max. More...
 
int32_t random (int32_t min, int32_t max)
 Get truly random number in range min - max. More...
 
int16_t startDirect ()
 Configure module parameters for direct modes. Must be called prior to "ham" modes like RTTY or AX.25. Only available in FSK mode. More...
 
int16_t setDirectSyncWord (uint32_t syncWord, uint8_t len)
 Set sync word to be used to determine start of packet in direct reception mode. More...
 
int16_t available ()
 Get the number of direct mode bytes currently available in buffer. More...
 
uint8_t read ()
 Get data from direct mode buffer. More...
 

Detailed Description

Control class for CC1101 module.

Constructor & Destructor Documentation

◆ CC1101()

CC1101::CC1101 ( Module module)

Default constructor.

Parameters
modInstance of Module that will be used to communicate with the radio.

Member Function Documentation

◆ begin()

int16_t CC1101::begin ( float  freq = 434.0,
float  br = 4.8,
float  freqDev = 5.0,
float  rxBw = 135.0,
int8_t  power = 10,
uint8_t  preambleLength = 16 
)

Initialization method.

Parameters
freqCarrier frequency in MHz. Defaults to 434.0 MHz.
brBit rate to be used in kbps. Defaults to 4.8 kbps.
freqDevFrequency deviation from carrier frequency in kHz Defaults to 5.0 kHz.
rxBwReceiver bandwidth in kHz. Defaults to 135.0 kHz.
powerOutput power in dBm. Defaults to 10 dBm.
preambleLengthPreamble Length in bits. Defaults to 16 bits.
Returns
Status Codes

◆ disableAddressFiltering()

int16_t CC1101::disableAddressFiltering ( )

Disables address filtering. Calling this method will also erase previously set addresses.

Returns
Status Codes

◆ disableSyncWordFiltering()

int16_t CC1101::disableSyncWordFiltering ( bool  requireCarrierSense = false)

Disable preamble and sync word filtering and generation.

Parameters
requireCarrierSenseRequire carrier sense above threshold.
Returns
Status Codes

◆ enableSyncWordFiltering()

int16_t CC1101::enableSyncWordFiltering ( uint8_t  maxErrBits = 0,
bool  requireCarrierSense = false 
)

Enable sync word filtering and generation.

Parameters
numBitsSync word length in bits.
requireCarrierSenseRequire carrier sense above threshold in addition to sync word.
Returns
Status Codes

◆ finishTransmit()

int16_t CC1101::finishTransmit ( )
overridevirtual

Clean up after transmission is done.

Returns
Status Codes

Implements PhysicalLayer.

◆ fixedPacketLengthMode()

int16_t CC1101::fixedPacketLengthMode ( uint8_t  len = RADIOLIB_CC1101_MAX_PACKET_LENGTH)

Set modem in fixed packet length mode.

Parameters
lenPacket length.
Returns
Status Codes

◆ getChipVersion()

int16_t CC1101::getChipVersion ( )

Read version SPI register. Should return CC1101_VERSION_LEGACY (0x04) or CC1101_VERSION_CURRENT (0x14) if CC1101 is connected and working.

Returns
Version register contents or Status Codes

◆ getLQI()

uint8_t CC1101::getLQI ( ) const

Gets LQI (Link Quality Indicator) of the last received packet.

Returns
Last packet LQI (lower is better).

◆ getPacketLength()

size_t CC1101::getPacketLength ( bool  update = true)
overridevirtual

Query modem for the packet length of received payload.

Parameters
updateUpdate received packet length. Will return cached value when set to false.
Returns
Length of last received packet in bytes.

Implements PhysicalLayer.

◆ getPromiscuousMode()

bool CC1101::getPromiscuousMode ( )

Get whether the modem is in promiscuous mode: no packet filtering (e.g., no preamble, sync word, address, CRC).

Returns
Whether the modem is in promiscuous mode

◆ getRSSI()

float CC1101::getRSSI ( )

Gets RSSI (Recorded Signal Strength Indicator) of the last received packet.

or in asynchronous direct mode the current RSSI level

Returns
RSSI in dBm.

◆ randomByte()

uint8_t CC1101::randomByte ( )
virtual

Get one truly random byte from RSSI noise.

Returns
TRNG byte.

Implements PhysicalLayer.

◆ readBit()

void CC1101::readBit ( RADIOLIB_PIN_TYPE  pin)
virtual

Function to read and process data bit in direct reception mode.

Parameters
pinPin on which to read.

Implements PhysicalLayer.

◆ readData() [1/3]

int16_t PhysicalLayer::readData

Reads data that was received after calling startReceive method.

Parameters
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message. When set to 0, the packet length will be retreived automatically. When more bytes than received are requested, only the number of bytes requested will be returned.
Returns
Status Codes

◆ readData() [2/3]

int16_t CC1101::readData ( uint8_t *  data,
size_t  len 
)
overridevirtual

Reads data received after calling startReceive method.

Parameters
dataPointer to array to save the received binary data.
lenNumber of bytes that will be read. When set to 0, the packet length will be retreived automatically. When more bytes than received are requested, only the number of bytes requested will be returned.
Returns
Status Codes

Implements PhysicalLayer.

◆ readData() [3/3]

virtual int16_t PhysicalLayer::readData

Reads data that was received after calling startReceive method.

Parameters
dataPointer to array to save the received binary data.
lenNumber of bytes that will be read. When set to 0, the packet length will be retreived automatically. When more bytes than received are requested, only the number of bytes requested will be returned.
Returns
Status Codes

◆ receive() [1/3]

int16_t PhysicalLayer::receive

Arduino String receive method.

Parameters
strAddress of Arduino String to save the received data.
lenExpected number of characters in the message. Leave as 0 if expecting a unknown size packet
Returns
Status Codes

◆ receive() [2/3]

int16_t CC1101::receive ( uint8_t *  data,
size_t  len 
)
overridevirtual

Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
dataBinary data to be sent.
lenNumber of bytes to send.
Returns
Status Codes

Implements PhysicalLayer.

◆ receive() [3/3]

virtual int16_t PhysicalLayer::receive

Binary receive method. Must be implemented in module class.

Parameters
dataPointer to array to save the received binary data.
lenNumber of bytes that will be received. Must be known in advance for binary transmissions.
Returns
Status Codes

◆ receiveDirect()

int16_t CC1101::receiveDirect ( )
overridevirtual

Starts direct mode reception.

Returns
Status Codes

Implements PhysicalLayer.

◆ receiveDirectAsync()

int16_t CC1101::receiveDirectAsync ( )

Starts asynchronous direct mode reception.

Returns
Status Codes

◆ setBitRate()

int16_t CC1101::setBitRate ( float  br)
virtual

Sets bit rate. Allowed values range from 0.025 to 600.0 kbps.

Parameters
brBit rate to be set in kbps.
Returns
Status Codes

Implements PhysicalLayer.

◆ setCrcFiltering()

int16_t CC1101::setCrcFiltering ( bool  crcOn = true)

Enable CRC filtering and generation.

Parameters
crcOnSet or unset CRC generation and filtering.
Returns
Status Codes

◆ setDataShaping()

int16_t CC1101::setDataShaping ( uint8_t  sh)
overridevirtual

Sets Gaussian filter bandwidth-time product that will be used for data shaping. Allowed value is RADIOLIB_SHAPING_0_5. Set to RADIOLIB_SHAPING_NONE to disable data shaping.

Parameters
shGaussian shaping bandwidth-time product that will be used for data shaping.
Returns
Status Codes

Implements PhysicalLayer.

◆ setDIOMapping()

int16_t CC1101::setDIOMapping ( RADIOLIB_PIN_TYPE  pin,
uint8_t  value 
)
virtual

Configure DIO pin mapping to get a given signal on a DIO pin (if available).

Parameters
pinPin number onto which a signal is to be placed.
valueThe value that indicates which function to place on that pin. See chip datasheet for details.
Returns
Status Codes

Reimplemented from PhysicalLayer.

◆ setDirectAction()

void CC1101::setDirectAction ( void(*)(void)  func)
virtual

Set interrupt service routine function to call when data bit is receveid in direct mode.

Parameters
funcPointer to interrupt service routine.

Implements PhysicalLayer.

◆ setEncoding()

int16_t CC1101::setEncoding ( uint8_t  encoding)
overridevirtual

Sets transmission encoding. Allowed values are RADIOLIB_ENCODING_NRZ, RADIOLIB_ENCODING_MANCHESTER, and RADIOLIB_ENCODING_WHITENING. Note that encoding on CC1101 is applied to the entire stream including preamble, sync word, and CRC.

Parameters
encodingEncoding to be used.
Returns
Status Codes

Implements PhysicalLayer.

◆ setFrequency()

int16_t CC1101::setFrequency ( float  freq)
virtual

Sets carrier frequency. Allowed values are in bands 300.0 to 348.0 MHz, 387.0 to 464.0 MHz and 779.0 to 928.0 MHz.

Parameters
freqCarrier frequency to be set in MHz.
Returns
Status Codes

Implements PhysicalLayer.

◆ setFrequencyDeviation()

int16_t CC1101::setFrequencyDeviation ( float  freqDev)
overridevirtual

Sets frequency deviation. Allowed values range from 1.587 to 380.8 kHz.

Parameters
freqDevFrequency deviation to be set in kHz.
Returns
Status Codes

Implements PhysicalLayer.

◆ setGdo0Action()

void CC1101::setGdo0Action ( void(*)(void)  func,
RADIOLIB_INTERRUPT_STATUS  dir = RISING 
)

Sets interrupt service routine to call when GDO0 activates.

Parameters
funcISR to call.
dirSignal change direction. Defaults to RISING.

◆ setGdo2Action()

void CC1101::setGdo2Action ( void(*)(void)  func,
RADIOLIB_INTERRUPT_STATUS  dir = FALLING 
)

Sets interrupt service routine to call when GDO2 activates.

Parameters
funcISR to call.
dirSignal change direction. Defaults to FALLING.

◆ setNodeAddress()

int16_t CC1101::setNodeAddress ( uint8_t  nodeAddr,
uint8_t  numBroadcastAddrs = 0 
)

Sets node and broadcast addresses. Calling this method will also enable address filtering.

Parameters
nodeAddrNode address to be set.
numBroadcastAddrsNumber of broadcast addresses to be used. Can be set to 0 (no broadcast), 1 (broadcast at 0x00) or 2 (broadcast at 0x00 and 0xFF).
Returns
Status Codes

◆ setOOK()

int16_t CC1101::setOOK ( bool  enableOOK)

Enables/disables OOK modulation instead of FSK.

Parameters
enableOOKEnable (true) or disable (false) OOK.
Returns
Status Codes

◆ setOutputPower()

int16_t CC1101::setOutputPower ( int8_t  power)

Sets output power. Allowed values are -30, -20, -15, -10, 0, 5, 7 or 10 dBm.

Parameters
powerOutput power to be set in dBm.
Returns
Status Codes

◆ setPreambleLength()

int16_t CC1101::setPreambleLength ( uint8_t  preambleLength)

Sets preamble length.

Parameters
preambleLengthPreamble length to be set (in bits), allowed values: 16, 24, 32, 48, 64, 96, 128 and 192.
Returns
Status Codes

◆ setPromiscuousMode()

int16_t CC1101::setPromiscuousMode ( bool  promiscuous = true)

Set modem in "sniff" mode: no packet filtering (e.g., no preamble, sync word, address, CRC).

Parameters
promiscuousSet or unset promiscuous mode.
Returns
Status Codes

◆ setRfSwitchPins()

void CC1101::setRfSwitchPins ( RADIOLIB_PIN_TYPE  rxEn,
RADIOLIB_PIN_TYPE  txEn 
)

Some modules contain external RF switch controlled by two pins. This function gives RadioLib control over those two pins to automatically switch Rx and Tx state. When using automatic RF switch control, DO NOT change the pin mode of rxEn or txEn from Arduino sketch!

Parameters
rxEnRX enable pin.
txEnTX enable pin.

◆ setRxBandwidth()

int16_t CC1101::setRxBandwidth ( float  rxBw)

Sets receiver bandwidth. Allowed values range from 58.0 to 812.0 kHz.

Parameters
rxBwReceiver bandwidth to be set in kHz.
Returns
Status Codes

◆ setSyncWord() [1/2]

int16_t CC1101::setSyncWord ( uint8_t *  syncWord,
uint8_t  len,
uint8_t  maxErrBits = 0,
bool  requireCarrierSense = false 
)

Sets 1 or 2 bytes of sync word.

Parameters
syncWordPointer to the array of sync word bytes.
lenSync word length in bytes.
maxErrBitsMaximum allowed number of bit errors in received sync word. Defaults to 0.
requireCarrierSenseRequire carrier sense above threshold in addition to sync word.
Returns
Status Codes

◆ setSyncWord() [2/2]

int16_t CC1101::setSyncWord ( uint8_t  syncH,
uint8_t  syncL,
uint8_t  maxErrBits = 0,
bool  requireCarrierSense = false 
)

Sets 16-bit sync word as a two byte value.

Parameters
syncHMSB of the sync word.
syncLLSB of the sync word.
maxErrBitsMaximum allowed number of bit errors in received sync word. Defaults to 0.
requireCarrierSenseRequire carrier sense above threshold in addition to sync word.
Returns
Status Codes

◆ standby()

int16_t CC1101::standby ( )
overridevirtual

Sets the module to standby mode.

Returns
Status Codes

Implements PhysicalLayer.

◆ startReceive()

int16_t CC1101::startReceive ( )

Interrupt-driven receive method. GDO0 will be activated when full packet is received.

Returns
Status Codes

◆ startTransmit() [1/4]

int16_t PhysicalLayer::startTransmit

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

Parameters
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
Returns
Status Codes

◆ startTransmit() [2/4]

int16_t PhysicalLayer::startTransmit

Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.

Parameters
strAddress of Arduino String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
Returns
Status Codes

◆ startTransmit() [3/4]

int16_t CC1101::startTransmit ( uint8_t *  data,
size_t  len,
uint8_t  addr = 0 
)
overridevirtual

Interrupt-driven binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
dataBinary data to be sent.
lenNumber of bytes to send.
addrAddress to send the data to. Will only be added if address filtering was enabled.
Returns
Status Codes

Implements PhysicalLayer.

◆ startTransmit() [4/4]

virtual int16_t PhysicalLayer::startTransmit

Interrupt-driven binary transmit method.

Parameters
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
Returns
Status Codes

◆ transmit() [1/5]

int16_t PhysicalLayer::transmit

Arduino Flash String transmit method.

Parameters
strPointer to Arduino Flash String that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
Returns
Status Codes

◆ transmit() [2/5]

int16_t PhysicalLayer::transmit

C-string transmit method.

Parameters
strC-string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
Returns
Status Codes

◆ transmit() [3/5]

int16_t PhysicalLayer::transmit

Arduino String transmit method.

Parameters
strAddress of Arduino string that will be transmitted.
addrNode address to transmit the packet to. Only used in FSK mode.
Returns
Status Codes

◆ transmit() [4/5]

int16_t CC1101::transmit ( uint8_t *  data,
size_t  len,
uint8_t  addr = 0 
)
overridevirtual

Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.

Parameters
dataBinary data to be sent.
lenNumber of bytes to send.
addrAddress to send the data to. Will only be added if address filtering was enabled.
Returns
Status Codes

Implements PhysicalLayer.

◆ transmit() [5/5]

virtual int16_t PhysicalLayer::transmit

Binary transmit method. Must be implemented in module class.

Parameters
dataBinary data that will be transmitted.
lenLength of binary data to transmit (in bytes).
addrNode address to transmit the packet to. Only used in FSK mode.
Returns
Status Codes

◆ transmitDirect()

int16_t CC1101::transmitDirect ( uint32_t  frf = 0)
overridevirtual

Starts direct mode transmission.

Parameters
frfRaw RF frequency value. Defaults to 0, required for quick frequency shifts in RTTY.
Returns
Status Codes

Implements PhysicalLayer.

◆ transmitDirectAsync()

int16_t CC1101::transmitDirectAsync ( uint32_t  frf = 0)

Starts asynchronous direct mode transmission.

Parameters
frfRaw RF frequency value. Defaults to 0, required for quick frequency shifts in RTTY.
Returns
Status Codes

◆ variablePacketLengthMode()

int16_t CC1101::variablePacketLengthMode ( uint8_t  maxLen = RADIOLIB_CC1101_MAX_PACKET_LENGTH)

Set modem in variable packet length mode.

Parameters
lenMaximum packet length.
Returns
Status Codes

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