Uttam Bhat / SX1280Lib

Fork of SX1280Lib by Semtech

Embed: (wiki syntax)

« Back to documentation index

SX1280 Class Reference

Represents the SX1280 and its features. More...

#include <sx1280.h>

Inherits Radio.

Inherited by SX1280Hal.

Public Member Functions

 SX1280 (RadioCallbacks_t *callbacks)
 Instantiates a SX1280 object and provides API functions to communicates with the radio.
void Init (void)
 Initializes the radio driver.
void SetPollingMode (void)
 Set the driver in polling mode.
void SetInterruptMode (void)
 Set the driver in interrupt mode.
void SetRegistersDefault (void)
 Initializes the radio registers to the recommended default values.
virtual uint16_t GetFirmwareVersion (void)
 Returns the current device firmware version.
virtual void Reset (void)=0
 Resets the radio.
virtual void Wakeup (void)=0
 Wake-ups the radio from Sleep mode.
virtual void WriteCommand (RadioCommands_t opcode, uint8_t *buffer, uint16_t size)=0
 Writes the given command to the radio.
virtual void ReadCommand (RadioCommands_t opcode, uint8_t *buffer, uint16_t size)=0
 Reads the given command from the radio.
virtual void WriteRegister (uint16_t address, uint8_t *buffer, uint16_t size)=0
 Writes multiple radio registers starting at address.
virtual void WriteRegister (uint16_t address, uint8_t value)=0
 Writes the radio register at the specified address.
virtual void ReadRegister (uint16_t address, uint8_t *buffer, uint16_t size)=0
 Reads multiple radio registers starting at address.
virtual uint8_t ReadRegister (uint16_t address)=0
 Reads the radio register at the specified address.
virtual void WriteBuffer (uint8_t offset, uint8_t *buffer, uint8_t size)=0
 Writes Radio Data Buffer with buffer of size starting at offset.
virtual void ReadBuffer (uint8_t offset, uint8_t *buffer, uint8_t size)=0
 Reads Radio Data Buffer at offset to buffer of size.
virtual uint8_t GetDioStatus (void)=0
 Gets the current status of the radio DIOs.
virtual RadioOperatingModes_t GetOpMode (void)
 Gets the current Operation Mode of the Radio.
virtual RadioStatus_t GetStatus (void)
 Gets the current radio status.
void SetSleep (SleepParams_t sleepConfig)
 Sets the radio in sleep mode.
void SetStandby (RadioStandbyModes_t mode)
 Sets the radio in configuration mode.
void SetFs (void)
 Sets the radio in FS mode.
void SetTx (TickTime_t timeout)
 Sets the radio in transmission mode.
void SetRx (TickTime_t timeout)
 Sets the radio in reception mode.
void SetRxDutyCycle (RadioTickSizes_t step, uint16_t nbStepRx, uint16_t nbStepSleep)
 Sets the Rx duty cycle management parameters.
void SetCad (void)
 Sets the radio in CAD mode.
void SetTxContinuousWave (void)
 Sets the radio in continuous wave transmission mode.
void SetTxContinuousPreamble (void)
 Sets the radio in continuous preamble transmission mode.
void SetPacketType (RadioPacketTypes_t packetType)
 Sets the radio for the given protocol.
RadioPacketTypes_t GetPacketType (void)
 Gets the current radio protocol.
void SetRfFrequency (uint32_t frequency)
 Sets the RF frequency.
void SetTxParams (int8_t power, RadioRampTimes_t rampTime)
 Sets the transmission parameters.
void SetCadParams (RadioLoRaCadSymbols_t cadSymbolNum)
 Sets the number of symbols to be used for Channel Activity Detection operation.
void SetBufferBaseAddresses (uint8_t txBaseAddress, uint8_t rxBaseAddress)
 Sets the data buffer base address for transmission and reception.
void SetModulationParams (ModulationParams_t *modParams)
 Set the modulation parameters.
void SetPacketParams (PacketParams_t *packetParams)
 Sets the packet parameters.
void GetRxBufferStatus (uint8_t *payloadLength, uint8_t *rxStartBuffer)
 Gets the last received packet buffer status.
void GetPacketStatus (PacketStatus_t *pktStatus)
 Gets the last received packet payload length.
int8_t GetRssiInst (void)
 Returns the instantaneous RSSI value for the last packet received.
void SetDioIrqParams (uint16_t irqMask, uint16_t dio1Mask, uint16_t dio2Mask, uint16_t dio3Mask)
 Sets the IRQ mask and DIO masks.
uint16_t GetIrqStatus (void)
 Returns the current IRQ status.
void ClearIrqStatus (uint16_t irq)
 Clears the IRQs.
void Calibrate (CalibrationParams_t calibParam)
 Calibrates the given radio block.
void SetRegulatorMode (RadioRegulatorModes_t mode)
 Sets the power regulators operating mode.
void SetSaveContext (void)
 Saves the current selected modem configuration into data RAM.
void SetAutoTx (uint16_t time)
 Sets the chip to automatically send a packet after the end of a packet reception.
void SetAutoFs (bool enableAutoFs)
 Sets the chip to stay in FS mode after sending a packet.
void SetLongPreamble (bool enable)
 Enables or disables long preamble detection mode.
void SetPayload (uint8_t *payload, uint8_t size, uint8_t offset=0x00)
 Saves the payload to be send in the radio buffer.
uint8_t GetPayload (uint8_t *payload, uint8_t *size, uint8_t maxSize)
 Reads the payload received. If the received payload is longer than maxSize, then the method returns 1 and do not set size and payload.
void SendPayload (uint8_t *payload, uint8_t size, TickTime_t timeout, uint8_t offset=0x00)
 Sends a payload.
uint8_t SetSyncWord (uint8_t syncWordIdx, uint8_t *syncWord)
 Sets the Sync Word given by index used in GFSK, FLRC and BLE protocols.
void SetSyncWordErrorTolerance (uint8_t errorBits)
 Defines how many error bits are tolerated in sync word detection.
void SetCrcSeed (uint16_t seed)
 Sets the Initial value for the LFSR used for the CRC calculation.
void SetCrcPolynomial (uint16_t polynomial)
 Sets the seed used for the CRC calculation.
void SetWhiteningSeed (uint8_t seed)
 Sets the Initial value of the LFSR used for the whitening in GFSK, FLRC and BLE protocols.
void SetRangingIdLength (RadioRangingIdCheckLengths_t length)
 Sets the number of bits used to check that ranging request match ranging ID.
void SetDeviceRangingAddress (uint32_t address)
 Sets ranging device id.
void SetRangingRequestAddress (uint32_t address)
 Sets the device id to ping in a ranging request.
double GetRangingResult (RadioRangingResultTypes_t resultType)
 Return the ranging result value.
void SetRangingCalibration (uint16_t cal)
 Sets the standard processing delay between Master and Slave.
void RangingClearFilterResult (void)
 Clears the ranging filter.
void RangingSetFilterNumSamples (uint8_t numSample)
 Set the number of samples considered in the built-in filter.
double GetFrequencyError ()
 Return the Estimated Frequency Error in LORA and RANGING operations.
void ProcessIrqs (void)
 Process the analysis of radio IRQs and calls callback functions depending on radio state.

Protected Member Functions

virtual void IoIrqInit (DioIrqHandler irqHandler)=0
 Sets a function to be triggered on radio interrupt.
void OnDioIrq (void)
 DIOs interrupt callback.
void SetRangingRole (RadioRangingRoles_t role)
 Set the role of the radio during ranging operations.

Protected Attributes

void(* txDone )(void)
 Callback on Tx done interrupt.
void(* rxDone )(void)
 Callback on Rx done interrupt.
void(* rxSyncWordDone )(void)
 Callback on Rx SyncWord interrupt.
void(* rxHeaderDone )(void)
 Callback on Rx header received interrupt.
void(* txTimeout )(void)
 Callback on Tx timeout interrupt.
void(* rxTimeout )(void)
 Callback on Rx timeout interrupt.
void(* rxError )(IrqErrorCode_t errCode)
 Callback on Rx error interrupt.
void(* rangingDone )(IrqRangingCode_t val)
 Callback on ranging done interrupt.
void(* cadDone )(bool cadFlag)
 Callback on Channel Activity Detection done interrupt.

Detailed Description

Represents the SX1280 and its features.

It implements the commands the SX1280 can understands

Definition at line 956 of file sx1280.h.


Constructor & Destructor Documentation

SX1280 ( RadioCallbacks_t callbacks )

Instantiates a SX1280 object and provides API functions to communicates with the radio.

Parameters:
[in]callbacksPointer to the callbacks structure defining all callbacks function pointers

Definition at line 965 of file sx1280.h.


Member Function Documentation

void Calibrate ( CalibrationParams_t  calibParam )

Calibrates the given radio block.

Parameters:
[in]calibParamThe description of blocks to be calibrated

Definition at line 490 of file sx1280.cpp.

void ClearIrqStatus ( uint16_t  irq )

Clears the IRQs.

Parameters:
[in]irqIRQ(s) to be cleared

Definition at line 481 of file sx1280.cpp.

virtual uint8_t GetDioStatus ( void   ) [pure virtual]

Gets the current status of the radio DIOs.

Return values:
status[Bit #3: DIO3, Bit #2: DIO2, Bit #1: DIO1, Bit #0: BUSY]

Implemented in SX1280Hal.

uint16_t GetFirmwareVersion ( void   ) [virtual]

Returns the current device firmware version.

Return values:
versionFirmware version

Implements Radio.

Definition at line 67 of file sx1280.cpp.

double GetFrequencyError (  )

Return the Estimated Frequency Error in LORA and RANGING operations.

Return values:
efeThe estimated frequency error [Hz]

Definition at line 791 of file sx1280.cpp.

uint16_t GetIrqStatus ( void   )

Returns the current IRQ status.

Return values:
irqStatusIRQ status

Definition at line 474 of file sx1280.cpp.

RadioOperatingModes_t GetOpMode ( void   ) [virtual]

Gets the current Operation Mode of the Radio.

Return values:
opModeLast operating mode

Definition at line 82 of file sx1280.cpp.

void GetPacketStatus ( PacketStatus_t pktStatus )

Gets the last received packet payload length.

Parameters:
[out]pktStatusA structure of packet status

Definition at line 361 of file sx1280.cpp.

RadioPacketTypes_t GetPacketType ( void   )

Gets the current radio protocol.

Return values:
packetType[PACKET_TYPE_GFSK, PACKET_TYPE_LORA, PACKET_TYPE_RANGING, PACKET_TYPE_FLRC, PACKET_TYPE_BLE, PACKET_TYPE_NONE]

Definition at line 192 of file sx1280.cpp.

uint8_t GetPayload ( uint8_t *  payload,
uint8_t *  size,
uint8_t  maxSize 
)

Reads the payload received. If the received payload is longer than maxSize, then the method returns 1 and do not set size and payload.

Parameters:
[out]payloadA pointer to a buffer into which the payload will be copied
[out]sizeA pointer to the size of the payload received
[in]maxSizeThe maximal size allowed to copy into the buffer

Definition at line 536 of file sx1280.cpp.

double GetRangingResult ( RadioRangingResultTypes_t  resultType )

Return the ranging result value.

Parameters:
[in]resultTypeSpecifies the type of result. [0: RAW, 1: Averaged, 2: De-biased, 3:Filtered]
Return values:
rangingThe ranging measure filtered according to resultType [m]

Definition at line 714 of file sx1280.cpp.

int8_t GetRssiInst ( void   )

Returns the instantaneous RSSI value for the last packet received.

Return values:
rssiInstInstantaneous RSSI

Definition at line 450 of file sx1280.cpp.

void GetRxBufferStatus ( uint8_t *  payloadLength,
uint8_t *  rxStartBuffer 
)

Gets the last received packet buffer status.

Parameters:
[out]payloadLengthLast received packet payload length
[out]rxStartBufferLast received packet buffer address pointer

Definition at line 341 of file sx1280.cpp.

RadioStatus_t GetStatus ( void   ) [virtual]

Gets the current radio status.

Return values:
statusRadio status

Implements Radio.

Definition at line 72 of file sx1280.cpp.

void Init ( void   )

Initializes the radio driver.

Definition at line 51 of file sx1280.cpp.

virtual void IoIrqInit ( DioIrqHandler  irqHandler ) [protected, pure virtual]

Sets a function to be triggered on radio interrupt.

Parameters:
[in]irqHandlerA pointer to a function to be run on interrupt from the radio

Implemented in SX1280Hal.

void OnDioIrq ( void   ) [protected]

DIOs interrupt callback.

Remarks:
Called to handle all 3 DIOs pins

Definition at line 864 of file sx1280.cpp.

void ProcessIrqs ( void   )

Process the analysis of radio IRQs and calls callback functions depending on radio state.

Definition at line 881 of file sx1280.cpp.

void RangingClearFilterResult ( void   )

Clears the ranging filter.

Definition at line 768 of file sx1280.cpp.

void RangingSetFilterNumSamples ( uint8_t  numSample )

Set the number of samples considered in the built-in filter.

Parameters:
[in]numSampleThe number of samples to use built-in filter [8..255]
Remarks:
Value inferior to 8 will be silently set to 8

Definition at line 777 of file sx1280.cpp.

virtual void ReadBuffer ( uint8_t  offset,
uint8_t *  buffer,
uint8_t  size 
) [pure virtual]

Reads Radio Data Buffer at offset to buffer of size.

Parameters:
[in]offsetOffset where to start reading
[out]bufferBuffer pointer
[in]sizeBuffer size

Implements Radio.

Implemented in SX1280Hal.

virtual void ReadCommand ( RadioCommands_t  opcode,
uint8_t *  buffer,
uint16_t  size 
) [pure virtual]

Reads the given command from the radio.

Parameters:
[in]opcodeCommand opcode
[in]bufferCommand parameters byte array
[in]sizeCommand parameters byte array size

Implements Radio.

Implemented in SX1280Hal.

virtual uint8_t ReadRegister ( uint16_t  address ) [pure virtual]

Reads the radio register at the specified address.

Parameters:
[in]addressRegister address
Return values:
dataRegister value

Implements Radio.

Implemented in SX1280Hal.

virtual void ReadRegister ( uint16_t  address,
uint8_t *  buffer,
uint16_t  size 
) [pure virtual]

Reads multiple radio registers starting at address.

Parameters:
[in]addressFirst Radio register address
[out]bufferBuffer where to copy the registers data
[in]sizeNumber of registers to be read

Implements Radio.

Implemented in SX1280Hal.

virtual void Reset ( void   ) [pure virtual]

Resets the radio.

Implements Radio.

Implemented in SX1280Hal.

void SendPayload ( uint8_t *  payload,
uint8_t  size,
TickTime_t  timeout,
uint8_t  offset = 0x00 
)

Sends a payload.

Parameters:
[in]payloadA pointer to the payload to send
[in]sizeThe size of the payload to send
[in]timeoutThe timeout for Tx operation
[in]offsetThe address in FIFO where writting first byte (default = 0x00)

Definition at line 549 of file sx1280.cpp.

void SetAutoFs ( bool  enableAutoFs )

Sets the chip to stay in FS mode after sending a packet.

Parameters:
[in]enableAutoFsTurn on auto FS

Definition at line 521 of file sx1280.cpp.

void SetAutoTx ( uint16_t  time )

Sets the chip to automatically send a packet after the end of a packet reception.

Remarks:
The offset is automatically compensated inside the function
Parameters:
[in]timeThe delay in us after which a Tx is done

Definition at line 511 of file sx1280.cpp.

void SetBufferBaseAddresses ( uint8_t  txBaseAddress,
uint8_t  rxBaseAddress 
)

Sets the data buffer base address for transmission and reception.

Parameters:
[in]txBaseAddressTransmission base address
[in]rxBaseAddressReception base address

Definition at line 226 of file sx1280.cpp.

void SetCad ( void   )

Sets the radio in CAD mode.

See also:
SX1280::SetCadParams

Definition at line 168 of file sx1280.cpp.

void SetCadParams ( RadioLoRaCadSymbols_t  cadSymbolNum )

Sets the number of symbols to be used for Channel Activity Detection operation.

Parameters:
[in]cadSymbolNumThe number of symbol to use for Channel Activity Detection operations [LORA_CAD_01_SYMBOL, LORA_CAD_02_SYMBOL, LORA_CAD_04_SYMBOL, LORA_CAD_08_SYMBOL, LORA_CAD_16_SYMBOL]

Definition at line 220 of file sx1280.cpp.

void SetCrcPolynomial ( uint16_t  polynomial )

Sets the seed used for the CRC calculation.

Parameters:
[in]polynomialThe seed value

Definition at line 642 of file sx1280.cpp.

void SetCrcSeed ( uint16_t  seed )

Sets the Initial value for the LFSR used for the CRC calculation.

Parameters:
[in]seedInitial LFSR value ( 4 bytes )

Definition at line 624 of file sx1280.cpp.

void SetDeviceRangingAddress ( uint32_t  address )

Sets ranging device id.

Parameters:
[in]addressDevice address

Definition at line 686 of file sx1280.cpp.

void SetDioIrqParams ( uint16_t  irqMask,
uint16_t  dio1Mask,
uint16_t  dio2Mask,
uint16_t  dio3Mask 
)

Sets the IRQ mask and DIO masks.

Parameters:
[in]irqMaskGeneral IRQ mask
[in]dio1MaskDIO1 mask
[in]dio2MaskDIO2 mask
[in]dio3MaskDIO3 mask

Definition at line 459 of file sx1280.cpp.

void SetFs ( void   )

Sets the radio in FS mode.

Definition at line 111 of file sx1280.cpp.

void SetInterruptMode ( void   )

Set the driver in interrupt mode.

In interrupt mode, the driver communicate with the radio during the interruption by direct calls to ProcessIrqs( ). The main advantage is the possibility to have low power application architecture. This is the default mode.

 // Initializations and callbacks declaration/definition
 radio = SX1280( mosi, miso, sclk, nss, busy, int1, int2, int3, rst, &callbacks );
 radio.Init( );
 radio.SetInterruptMode( );   // Optionnal. Driver default behavior

 while( true )
 {
     // Do some applicative work
 }
See also:
SX1280::SetPollingMode

Definition at line 859 of file sx1280.cpp.

void SetLongPreamble ( bool  enable )

Enables or disables long preamble detection mode.

Parameters:
[in]enableTurn on long preamble mode

Definition at line 526 of file sx1280.cpp.

void SetModulationParams ( ModulationParams_t modParams )

Set the modulation parameters.

Parameters:
[in]modParamsA structure describing the modulation parameters

Definition at line 235 of file sx1280.cpp.

void SetPacketParams ( PacketParams_t packetParams )

Sets the packet parameters.

Parameters:
[in]packetParamsA structure describing the packet parameters

Definition at line 279 of file sx1280.cpp.

void SetPacketType ( RadioPacketTypes_t  packetType )

Sets the radio for the given protocol.

Parameters:
[in]packetType[PACKET_TYPE_GFSK, PACKET_TYPE_LORA, PACKET_TYPE_RANGING, PACKET_TYPE_FLRC, PACKET_TYPE_BLE]
Remarks:
This method has to be called before SetRfFrequency, SetModulationParams and SetPacketParams

Definition at line 184 of file sx1280.cpp.

void SetPayload ( uint8_t *  payload,
uint8_t  size,
uint8_t  offset = 0x00 
)

Saves the payload to be send in the radio buffer.

Parameters:
[in]payloadA pointer to the payload
[in]sizeThe size of the payload
[in]offsetThe address in FIFO where writting first byte (default = 0x00)

Definition at line 531 of file sx1280.cpp.

void SetPollingMode ( void   )

Set the driver in polling mode.

In polling mode the application is responsible to call ProcessIrqs( ) to execute callbacks functions. The default mode is Interrupt Mode.

 // Initializations and callbacks declaration/definition
 radio = SX1280( mosi, miso, sclk, nss, busy, int1, int2, int3, rst, &callbacks );
 radio.Init( );
 radio.SetPollingMode( );

 while( true )
 {
                            //     IRQ processing is automatically done
     radio.ProcessIrqs( );  // <-- here, as well as callback functions
                            //     calls
     // Do some applicative work
 }
See also:
SX1280::SetInterruptMode

Definition at line 820 of file sx1280.cpp.

void SetRangingCalibration ( uint16_t  cal )

Sets the standard processing delay between Master and Slave.

Parameters:
[in]calRxTx delay offset for correcting ranging bias.

The calibration value reflects the group delay of the radio front end and must be re-performed for each new SX1280 PCB design. The value is obtained empirically by either conducted measurement in a known electrical length coaxial RF cable (where the design is connectorised) or by radiated measurement, at a known distance, where an antenna is present. The result of the calibration process is that the SX1280 ranging result accurately reflects the physical range, the calibration procedure therefore removes the average timing error from the time-of-flight measurement for a given design.

The values are Spreading Factor dependents, and depend also of the board design.

Definition at line 755 of file sx1280.cpp.

void SetRangingIdLength ( RadioRangingIdCheckLengths_t  length )

Sets the number of bits used to check that ranging request match ranging ID.

Parameters:
[in]length[0: 8 bits, 1: 16 bits, 2: 24 bits, 3: 32 bits]

Definition at line 674 of file sx1280.cpp.

void SetRangingRequestAddress ( uint32_t  address )

Sets the device id to ping in a ranging request.

Parameters:
[in]addressAddress of the device to ping

Definition at line 700 of file sx1280.cpp.

void SetRangingRole ( RadioRangingRoles_t  role ) [protected]

Set the role of the radio during ranging operations.

Parameters:
[in]roleRole of the radio

Definition at line 783 of file sx1280.cpp.

void SetRegistersDefault ( void   )

Initializes the radio registers to the recommended default values.

Definition at line 59 of file sx1280.cpp.

void SetRegulatorMode ( RadioRegulatorModes_t  mode )

Sets the power regulators operating mode.

Parameters:
[in]mode[0: LDO, 1:DC_DC]

Definition at line 501 of file sx1280.cpp.

void SetRfFrequency ( uint32_t  frequency )

Sets the RF frequency.

Parameters:
[in]frequencyRF frequency [Hz]

Definition at line 197 of file sx1280.cpp.

void SetRx ( TickTime_t  timeout )

Sets the radio in reception mode.

Parameters:
[in]timeoutStructure describing the reception timeout value

Definition at line 136 of file sx1280.cpp.

void SetRxDutyCycle ( RadioTickSizes_t  step,
uint16_t  nbStepRx,
uint16_t  nbStepSleep 
)

Sets the Rx duty cycle management parameters.

Parameters:
[in]stepStep time size for Rx and Sleep TickTime sequences
[in]nbStepRxNumber of step time size for Rx TickTime sequence
[in]nbStepSleepNumber of step time size for Sleep TickTime sequence

Definition at line 155 of file sx1280.cpp.

void SetSaveContext ( void   )

Saves the current selected modem configuration into data RAM.

Definition at line 506 of file sx1280.cpp.

void SetSleep ( SleepParams_t  sleepConfig )

Sets the radio in sleep mode.

Parameters:
[in]sleepConfigThe sleep configuration describing data retention and RTC wake-up

Definition at line 87 of file sx1280.cpp.

void SetStandby ( RadioStandbyModes_t  mode )

Sets the radio in configuration mode.

Parameters:
[in]modeThe standby mode to put the radio into

Definition at line 98 of file sx1280.cpp.

uint8_t SetSyncWord ( uint8_t  syncWordIdx,
uint8_t *  syncWord 
)

Sets the Sync Word given by index used in GFSK, FLRC and BLE protocols.

Remarks:
5th byte isn't used in FLRC and BLE protocols
Parameters:
[in]syncWordIdxIndex of SyncWord to be set [1..3]
[in]syncWordSyncWord bytes ( 5 bytes )
Return values:
status[0: OK, 1: NOK]

Definition at line 555 of file sx1280.cpp.

void SetSyncWordErrorTolerance ( uint8_t  errorBits )

Defines how many error bits are tolerated in sync word detection.

Parameters:
[in]errorBitsNumber of error bits supported to validate the Sync word detection ( default is 4 bit, minimum is 1 bit )

Definition at line 618 of file sx1280.cpp.

void SetTx ( TickTime_t  timeout )

Sets the radio in transmission mode.

Parameters:
[in]timeoutStructure describing the transmission timeout value

Definition at line 117 of file sx1280.cpp.

void SetTxContinuousPreamble ( void   )

Sets the radio in continuous preamble transmission mode.

Definition at line 179 of file sx1280.cpp.

void SetTxContinuousWave ( void   )

Sets the radio in continuous wave transmission mode.

Definition at line 174 of file sx1280.cpp.

void SetTxParams ( int8_t  power,
RadioRampTimes_t  rampTime 
)

Sets the transmission parameters.

Parameters:
[in]powerRF output power [-18..13] dBm
[in]rampTimeTransmission ramp up time

Definition at line 209 of file sx1280.cpp.

void SetWhiteningSeed ( uint8_t  seed )

Sets the Initial value of the LFSR used for the whitening in GFSK, FLRC and BLE protocols.

Parameters:
[in]seedInitial LFSR value

Definition at line 660 of file sx1280.cpp.

virtual void Wakeup ( void   ) [pure virtual]

Wake-ups the radio from Sleep mode.

Implemented in SX1280Hal.

virtual void WriteBuffer ( uint8_t  offset,
uint8_t *  buffer,
uint8_t  size 
) [pure virtual]

Writes Radio Data Buffer with buffer of size starting at offset.

Parameters:
[in]offsetOffset where to start writing
[in]bufferBuffer pointer
[in]sizeBuffer size

Implements Radio.

Implemented in SX1280Hal.

virtual void WriteCommand ( RadioCommands_t  opcode,
uint8_t *  buffer,
uint16_t  size 
) [pure virtual]

Writes the given command to the radio.

Parameters:
[in]opcodeCommand opcode
[in]bufferCommand parameters byte array
[in]sizeCommand parameters byte array size

Implements Radio.

Implemented in SX1280Hal.

virtual void WriteRegister ( uint16_t  address,
uint8_t *  buffer,
uint16_t  size 
) [pure virtual]

Writes multiple radio registers starting at address.

Parameters:
[in]addressFirst Radio register address
[in]bufferBuffer containing the new register's values
[in]sizeNumber of registers to be written

Implements Radio.

Implemented in SX1280Hal.

virtual void WriteRegister ( uint16_t  address,
uint8_t  value 
) [pure virtual]

Writes the radio register at the specified address.

Parameters:
[in]addressRegister address
[in]valueNew register value

Implements Radio.

Implemented in SX1280Hal.


Field Documentation

void( * cadDone)(bool cadFlag) [protected, inherited]

Callback on Channel Activity Detection done interrupt.

Parameters:
[out]cadFlagFlag for channel activity detected or not

Definition at line 156 of file radio.h.

void( * rangingDone)(IrqRangingCode_t val) [protected, inherited]

Callback on ranging done interrupt.

Parameters:
[out]valA flag indicating the type of interrupt (Master/Slave and Valid/Error)

Definition at line 149 of file radio.h.

void( * rxDone)(void) [protected, inherited]

Callback on Rx done interrupt.

Definition at line 115 of file radio.h.

void( * rxError)(IrqErrorCode_t errCode) [protected, inherited]

Callback on Rx error interrupt.

Parameters:
[out]errCodeA code indicating the type of interrupt (SyncWord error or CRC error)

Definition at line 142 of file radio.h.

void( * rxHeaderDone)(void) [protected, inherited]

Callback on Rx header received interrupt.

Definition at line 125 of file radio.h.

void( * rxSyncWordDone)(void) [protected, inherited]

Callback on Rx SyncWord interrupt.

Definition at line 120 of file radio.h.

void( * rxTimeout)(void) [protected, inherited]

Callback on Rx timeout interrupt.

Definition at line 135 of file radio.h.

void( * txDone)(void) [protected, inherited]

Callback on Tx done interrupt.

Definition at line 110 of file radio.h.

void( * txTimeout)(void) [protected, inherited]

Callback on Tx timeout interrupt.

Definition at line 130 of file radio.h.