Expand description
The SX126x command set: opcodes and the bytes each command sends.
A command is an opcode followed by its parameters, multi-byte values most significant
byte first, framed by NSS in a single SPI transaction, as chapter 10 of the SX1261/2
datasheet describes. Command holds the bytes of one command without allocating,
and the builders here fill it from typed parameters. A command that answers comes as
a Query: the bytes to send, then how many bytes to read back while NSS stays low.
WriteRegister and WriteBuffer send a header built here, then their data, in the same
transaction.
Modules§
- opcode
- The opcodes of Tables 11-1 to 11-5.
Structs§
Constants§
- CALIBRATE_
ALL - The calibration parameter that recalibrates every block, from Table 13-18.
- MAX_LEN
- The longest command the builders produce, in bytes.
- NOP
- The byte a host sends while it clocks an answer back.
Functions§
- calibrate
- Calibrate: recalibrates blocks of the chip, from Table 13-18.
- calibrate_
image - CalibrateImage: calibrates image rejection over a band.
- clear_
device_ errors - ClearDeviceErrors: clears every recorded error.
- clear_
irq_ status - ClearIrqStatus: clears interrupts.
- get_
device_ errors - GetDeviceErrors: reads the recorded errors.
- get_
irq_ status - GetIrqStatus: reads the pending interrupts.
- get_
packet_ status - GetPacketStatus: reads the signal levels of the last packet.
- get_
packet_ type - GetPacketType: reads the selected modem.
- get_
rssi_ inst - GetRssiInst: reads the instantaneous RSSI while receiving.
- get_
rx_ buffer_ status - GetRxBufferStatus: reads where the last payload sits.
- get_
stats - GetStats: reads the packet counters.
- get_
status - GetStatus: reads the status byte.
- read_
buffer - ReadBuffer: reads the data buffer.
- read_
register - ReadRegister: reads consecutive registers.
- reset_
stats - ResetStats: zeroes the packet counters, an opcode and six zero bytes.
- set_
buffer_ base_ address - SetBufferBaseAddress: sets where transmit and receive data start in the buffer.
- set_cad
- SetCad: starts channel activity detection.
- set_
cad_ params - SetCadParams: configures channel activity detection, from Table 13-71.
- set_
dio2_ as_ rf_ switch - SetDIO2AsRfSwitchCtrl: lets DIO2 drive an RF switch, high in TX.
- set_
dio3_ as_ tcxo - SetDIO3AsTcxoCtrl: powers a TCXO from DIO3.
- set_
dio_ irq_ params - SetDioIrqParams: enables interrupts and routes them to the DIO lines.
- set_fs
- SetFs: puts the chip in frequency synthesis mode.
- set_
lora_ modulation_ params - SetModulationParams, for LoRa.
- set_
lora_ packet_ params - SetPacketParams, for LoRa.
- set_
lora_ symbol_ timeout - SetLoRaSymbNumTimeout: sets how many symbols confirm a detected packet.
- set_
pa_ config - SetPaConfig: configures the power amplifier.
- set_
packet_ type - SetPacketType: selects the modem, the first command of any configuration.
- set_
regulator_ mode - SetRegulatorMode: selects the LDO or the DC-DC converter.
- set_
rf_ frequency - SetRfFrequency: tunes the synthesizer.
- set_rx
- SetRx: starts receiving.
- set_
rx_ duty_ cycle - SetRxDutyCycle: alternates the chip between listening and sleeping.
- set_
rx_ tx_ fallback_ mode - SetRxTxFallbackMode: chooses the mode the chip returns to after a packet.
- set_
sleep - SetSleep: puts the chip to sleep, from Table 13-2.
- set_
standby - SetStandby: puts the chip in a standby mode.
- set_tx
- SetTx: starts a transmission.
- set_
tx_ continuous_ wave - SetTxContinuousWave: transmits an unmodulated carrier, a test command.
- set_
tx_ infinite_ preamble - SetTxInfinitePreamble: transmits preamble symbols without end, a test command.
- set_
tx_ params - SetTxParams: sets the output power and the ramp time.
- stop_
timer_ on_ preamble - StopTimerOnPreamble: chooses what stops the receive timeout.
- write_
buffer - The header of WriteBuffer; the payload follows in the same transaction.
- write_
register - The header of WriteRegister; the register bytes follow in the same transaction.