Driver for the SX1280 RF Transceiver
Dependents: SX1280PingPong RangignMaster RangingSlave MSNV2-Terminal_V1-6 ... more
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 periodBase, uint16_t periodBaseCountRx, uint16_t periodBaseCountSleep) |
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 (bool returnLocalCopy=false) |
Gets the current radio protocol. | |
void | SetRfFrequency (uint32_t rfFrequency) |
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 *rxPayloadLength, uint8_t *rxStartBufferPointer) |
Gets the last received packet buffer status. | |
void | GetPacketStatus (PacketStatus_t *packetStatus) |
Gets the last received packet status. | |
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 irqMask) |
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 | StopAutoTx (void) |
Stop the chip to automatically send a packet after the end of a packet reception if previously activated with SX1280::SetAutoTx command. | |
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. | |
uint8_t | SetCrcSeed (uint8_t *seed) |
Sets the Initial value for the LFSR used for the CRC calculation. | |
void | SetBleAccessAddress (uint32_t accessAddress) |
Set the Access Address field of BLE packet. | |
void | SetBleAdvertizerAccessAddress (void) |
Set the Access Address for Advertizer BLE packets. | |
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 | EnableManualGain (void) |
Enable manual gain control and disable AGC. | |
void | DisableManualGain (void) |
Disable the manual gain control and enable AGC. | |
void | SetManualGainValue (uint8_t gain) |
Set the gain for the AGC. | |
void | SetLNAGainSetting (const RadioLnaSettings_t lnaSetting) |
Configure the LNA regime of operation. | |
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. | |
uint8_t | GetRangingPowerDeltaThresholdIndicator (void) |
Return the last ranging result power indicator. | |
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. | |
void | ForcePreambleLength (RadioPreambleLengths_t preambleLength) |
Force the preamble length in GFSK and BLE mode. | |
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 949 of file sx1280.h.
Constructor & Destructor Documentation
SX1280 | ( | RadioCallbacks_t * | callbacks ) |
Member Function Documentation
void Calibrate | ( | CalibrationParams_t | calibParam ) |
Calibrates the given radio block.
- Parameters:
-
[in] calibParam The description of blocks to be calibrated
Definition at line 490 of file sx1280.cpp.
void ClearIrqStatus | ( | uint16_t | irqMask ) |
Clears the IRQs.
- Parameters:
-
[in] irqMask IRQ(s) to be cleared
Definition at line 481 of file sx1280.cpp.
void DisableManualGain | ( | void | ) |
Disable the manual gain control and enable AGC.
- See also:
- SX1280::EnableManualGain
Definition at line 703 of file sx1280.cpp.
void EnableManualGain | ( | void | ) |
Enable manual gain control and disable AGC.
Definition at line 697 of file sx1280.cpp.
void ForcePreambleLength | ( | RadioPreambleLengths_t | preambleLength ) |
Force the preamble length in GFSK and BLE mode.
- Parameters:
-
[in] preambleLength The desired preamble length
Definition at line 343 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:
-
version Firmware version
Implements Radio.
Definition at line 56 of file sx1280.cpp.
double GetFrequencyError | ( | ) |
Return the Estimated Frequency Error in LORA and RANGING operations.
- Return values:
-
efe The estimated frequency error [Hz]
Definition at line 856 of file sx1280.cpp.
uint16_t GetIrqStatus | ( | void | ) |
Returns the current IRQ status.
- Return values:
-
irqStatus IRQ status
Definition at line 474 of file sx1280.cpp.
RadioOperatingModes_t GetOpMode | ( | void | ) | [virtual] |
Gets the current Operation Mode of the Radio.
- Return values:
-
opMode Last operating mode
Definition at line 71 of file sx1280.cpp.
void GetPacketStatus | ( | PacketStatus_t * | packetStatus ) |
Gets the last received packet status.
The packet status structure returned depends on the modem type selected
- See also:
- PacketStatus_t for the description of availabled informations
- Parameters:
-
[out] packetStatus A structure of packet status
Definition at line 374 of file sx1280.cpp.
RadioPacketTypes_t GetPacketType | ( | bool | returnLocalCopy = false ) |
Gets the current radio protocol.
Default behavior return the packet type returned by the radio. To reduce the SPI activity and return the packet type stored by the driver, a second optional argument must be provided evaluating as true boolean
- Parameters:
-
[in] returnLocalCopy If true, the packet type returned is the last saved in the driver If false, the packet type is obtained from the chip Default: false
- Return values:
-
packetType [PACKET_TYPE_GENERIC, PACKET_TYPE_LORA, PACKET_TYPE_RANGING, PACKET_TYPE_FLRC, PACKET_TYPE_BLE, PACKET_TYPE_NONE]
Definition at line 181 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] payload A pointer to a buffer into which the payload will be copied [out] size A pointer to the size of the payload received [in] maxSize The maximal size allowed to copy into the buffer
Definition at line 542 of file sx1280.cpp.
uint8_t GetRangingPowerDeltaThresholdIndicator | ( | void | ) |
Return the last ranging result power indicator.
The value returned is not an absolute power measurement. It is a relative power measurement.
- Return values:
-
deltaThreshold A relative power indicator
Definition at line 812 of file sx1280.cpp.
double GetRangingResult | ( | RadioRangingResultTypes_t | resultType ) |
Return the ranging result value.
- Parameters:
-
[in] resultType Specifies the type of result. [0: RAW, 1: Averaged, 2: De-biased, 3:Filtered]
- Return values:
-
ranging The ranging measure filtered according to resultType [m]
Definition at line 771 of file sx1280.cpp.
int8_t GetRssiInst | ( | void | ) |
Returns the instantaneous RSSI value for the last packet received.
- Return values:
-
rssiInst Instantaneous RSSI
Definition at line 450 of file sx1280.cpp.
void GetRxBufferStatus | ( | uint8_t * | rxPayloadLength, |
uint8_t * | rxStartBufferPointer | ||
) |
Gets the last received packet buffer status.
- Parameters:
-
[out] rxPayloadLength Last received packet payload length [out] rxStartBufferPointer Last received packet buffer address pointer
Definition at line 348 of file sx1280.cpp.
RadioStatus_t GetStatus | ( | void | ) | [virtual] |
Gets the current radio status.
- Return values:
-
status Radio status
Implements Radio.
Definition at line 61 of file sx1280.cpp.
void Init | ( | void | ) |
Initializes the radio driver.
Definition at line 40 of file sx1280.cpp.
virtual void IoIrqInit | ( | DioIrqHandler | irqHandler ) | [protected, pure virtual] |
Sets a function to be triggered on radio interrupt.
- Parameters:
-
[in] irqHandler A 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 929 of file sx1280.cpp.
void ProcessIrqs | ( | void | ) |
Process the analysis of radio IRQs and calls callback functions depending on radio state.
Definition at line 946 of file sx1280.cpp.
void RangingClearFilterResult | ( | void | ) |
Clears the ranging filter.
Definition at line 833 of file sx1280.cpp.
void RangingSetFilterNumSamples | ( | uint8_t | numSample ) |
Set the number of samples considered in the built-in filter.
- Parameters:
-
[in] numSample The number of samples to use built-in filter [8..255]
- Remarks:
- Value inferior to 8 will be silently set to 8
Definition at line 842 of file sx1280.cpp.
virtual void ReadBuffer | ( | uint8_t | offset, |
uint8_t * | buffer, | ||
uint8_t | size | ||
) | [pure virtual] |
virtual void ReadCommand | ( | RadioCommands_t | opcode, |
uint8_t * | buffer, | ||
uint16_t | size | ||
) | [pure virtual] |
virtual uint8_t ReadRegister | ( | uint16_t | address ) | [pure virtual] |
virtual void ReadRegister | ( | uint16_t | address, |
uint8_t * | buffer, | ||
uint16_t | size | ||
) | [pure virtual] |
virtual void Reset | ( | void | ) | [pure virtual] |
void SendPayload | ( | uint8_t * | payload, |
uint8_t | size, | ||
TickTime_t | timeout, | ||
uint8_t | offset = 0x00 |
||
) |
Sends a payload.
- Parameters:
-
[in] payload A pointer to the payload to send [in] size The size of the payload to send [in] timeout The timeout for Tx operation [in] offset The address in FIFO where writting first byte (default = 0x00)
Definition at line 555 of file sx1280.cpp.
void SetAutoFs | ( | bool | enableAutoFs ) |
Sets the chip to stay in FS mode after sending a packet.
- Parameters:
-
[in] enableAutoFs Turn on auto FS
Definition at line 527 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] time The delay in us after which a Tx is done
Definition at line 511 of file sx1280.cpp.
void SetBleAccessAddress | ( | uint32_t | accessAddress ) |
Set the Access Address field of BLE packet.
- Parameters:
-
[in] accessAddress The access address to be used for next BLE packet sent
Definition at line 652 of file sx1280.cpp.
void SetBleAdvertizerAccessAddress | ( | void | ) |
Set the Access Address for Advertizer BLE packets.
All advertizer BLE packets must use a particular value for Access Address field. This method sets it.
- See also:
- SX1280::SetBleAccessAddress
Definition at line 660 of file sx1280.cpp.
void SetBufferBaseAddresses | ( | uint8_t | txBaseAddress, |
uint8_t | rxBaseAddress | ||
) |
Sets the data buffer base address for transmission and reception.
- Parameters:
-
[in] txBaseAddress Transmission base address [in] rxBaseAddress Reception base address
Definition at line 228 of file sx1280.cpp.
void SetCad | ( | void | ) |
Sets the radio in CAD mode.
- See also:
- SX1280::SetCadParams
Definition at line 157 of file sx1280.cpp.
void SetCadParams | ( | RadioLoRaCadSymbols_t | cadSymbolNum ) |
Sets the number of symbols to be used for Channel Activity Detection operation.
- Parameters:
-
[in] cadSymbolNum The number of symbol to use for Channel Activity Detection operations [LORA_CAD_01_SYMBOL, LORA_CAD_02_SYMBOLS, LORA_CAD_04_SYMBOLS, LORA_CAD_08_SYMBOLS, LORA_CAD_16_SYMBOLS]
Definition at line 222 of file sx1280.cpp.
void SetCrcPolynomial | ( | uint16_t | polynomial ) |
Sets the seed used for the CRC calculation.
- Parameters:
-
[in] polynomial The seed value
Definition at line 665 of file sx1280.cpp.
uint8_t SetCrcSeed | ( | uint8_t * | seed ) |
Sets the Initial value for the LFSR used for the CRC calculation.
- Parameters:
-
[in] seed Initial LFSR value ( 4 bytes )
- Return values:
-
updated [0: failure, 1: success]
Definition at line 630 of file sx1280.cpp.
void SetDeviceRangingAddress | ( | uint32_t | address ) |
Sets ranging device id.
- Parameters:
-
[in] address Device address
Definition at line 743 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] irqMask General IRQ mask [in] dio1Mask DIO1 mask [in] dio2Mask DIO2 mask [in] dio3Mask DIO3 mask
Definition at line 459 of file sx1280.cpp.
void SetFs | ( | void | ) |
Sets the radio in FS mode.
Definition at line 100 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 924 of file sx1280.cpp.
void SetLNAGainSetting | ( | const RadioLnaSettings_t | lnaSetting ) |
Configure the LNA regime of operation.
- Parameters:
-
[in] lnaSetting The LNA setting. Possible values are LNA_LOW_POWER_MODE and LNA_HIGH_SENSITIVITY_MODE
Definition at line 714 of file sx1280.cpp.
void SetLongPreamble | ( | bool | enable ) |
Enables or disables long preamble detection mode.
- Parameters:
-
[in] enable Turn on long preamble mode
Definition at line 532 of file sx1280.cpp.
void SetManualGainValue | ( | uint8_t | gain ) |
Set the gain for the AGC.
SX1280::EnableManualGain must be called before using this method
- Parameters:
-
[in] gain The value of gain to set, refer to datasheet for value meaning
Definition at line 709 of file sx1280.cpp.
void SetModulationParams | ( | ModulationParams_t * | modParams ) |
Set the modulation parameters.
- Parameters:
-
[in] modParams A structure describing the modulation parameters
Definition at line 237 of file sx1280.cpp.
void SetPacketParams | ( | PacketParams_t * | packetParams ) |
Sets the packet parameters.
- Parameters:
-
[in] packetParams A structure describing the packet parameters
Definition at line 281 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 173 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] payload A pointer to the payload [in] size The size of the payload [in] offset The address in FIFO where writting first byte (default = 0x00)
Definition at line 537 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 885 of file sx1280.cpp.
void SetRangingCalibration | ( | uint16_t | cal ) |
Sets the standard processing delay between Master and Slave.
- Parameters:
-
[in] cal RxTx 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 820 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 731 of file sx1280.cpp.
void SetRangingRequestAddress | ( | uint32_t | address ) |
Sets the device id to ping in a ranging request.
- Parameters:
-
[in] address Address of the device to ping
Definition at line 757 of file sx1280.cpp.
void SetRangingRole | ( | RadioRangingRoles_t | role ) | [protected] |
Set the role of the radio during ranging operations.
- Parameters:
-
[in] role Role of the radio
Definition at line 848 of file sx1280.cpp.
void SetRegistersDefault | ( | void | ) |
Initializes the radio registers to the recommended default values.
Definition at line 48 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 | rfFrequency ) |
Sets the RF frequency.
- Parameters:
-
[in] rfFrequency RF frequency [Hz]
Definition at line 199 of file sx1280.cpp.
void SetRx | ( | TickTime_t | timeout ) |
Sets the radio in reception mode.
- Parameters:
-
[in] timeout Structure describing the reception timeout value
Definition at line 125 of file sx1280.cpp.
void SetRxDutyCycle | ( | RadioTickSizes_t | periodBase, |
uint16_t | periodBaseCountRx, | ||
uint16_t | periodBaseCountSleep | ||
) |
Sets the Rx duty cycle management parameters.
- Parameters:
-
[in] periodBase Base time for Rx and Sleep TickTime sequences [in] periodBaseCountRx Number of base time for Rx TickTime sequence [in] periodBaseCountSleep Number of base time for Sleep TickTime sequence
Definition at line 144 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] sleepConfig The sleep configuration describing data retention and RTC wake-up
Definition at line 76 of file sx1280.cpp.
void SetStandby | ( | RadioStandbyModes_t | mode ) |
Sets the radio in configuration mode.
- Parameters:
-
[in] mode The standby mode to put the radio into
Definition at line 87 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] syncWordIdx Index of SyncWord to be set [1..3] [in] syncWord SyncWord bytes ( 5 bytes )
- Return values:
-
status [0: OK, 1: NOK]
Definition at line 561 of file sx1280.cpp.
void SetSyncWordErrorTolerance | ( | uint8_t | errorBits ) |
Defines how many error bits are tolerated in sync word detection.
- Parameters:
-
[in] errorBits Number of error bits supported to validate the Sync word detection ( default is 4 bit, minimum is 1 bit )
Definition at line 624 of file sx1280.cpp.
void SetTx | ( | TickTime_t | timeout ) |
Sets the radio in transmission mode.
- Parameters:
-
[in] timeout Structure describing the transmission timeout value
Definition at line 106 of file sx1280.cpp.
void SetTxContinuousPreamble | ( | void | ) |
Sets the radio in continuous preamble transmission mode.
Definition at line 168 of file sx1280.cpp.
void SetTxContinuousWave | ( | void | ) |
Sets the radio in continuous wave transmission mode.
Definition at line 163 of file sx1280.cpp.
void SetTxParams | ( | int8_t | power, |
RadioRampTimes_t | rampTime | ||
) |
Sets the transmission parameters.
- Parameters:
-
[in] power RF output power [-18..13] dBm [in] rampTime Transmission ramp up time
Definition at line 211 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] seed Initial LFSR value
Definition at line 683 of file sx1280.cpp.
void StopAutoTx | ( | void | ) |
Stop the chip to automatically send a packet after the end of a packet reception if previously activated with SX1280::SetAutoTx command.
Definition at line 521 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] |
virtual void WriteCommand | ( | RadioCommands_t | opcode, |
uint8_t * | buffer, | ||
uint16_t | size | ||
) | [pure virtual] |
virtual void WriteRegister | ( | uint16_t | address, |
uint8_t | value | ||
) | [pure virtual] |
virtual void WriteRegister | ( | uint16_t | address, |
uint8_t * | buffer, | ||
uint16_t | size | ||
) | [pure virtual] |
Field Documentation
void( * cadDone)(bool cadFlag) [protected, inherited] |
void( * rangingDone)(IrqRangingCode_t val) [protected, inherited] |
void( * rxDone)(void) [protected, inherited] |
void( * rxError)(IrqErrorCode_t errCode) [protected, inherited] |
void( * rxHeaderDone)(void) [protected, inherited] |
void( * rxSyncWordDone)(void) [protected, inherited] |
void( * rxTimeout)(void) [protected, inherited] |
void( * txDone)(void) [protected, inherited] |
Generated on Tue Jul 12 2022 19:08:29 by 1.7.2