61#define SX126X_MAX_TIMEOUT_IN_RTC_STEP 0x00FFFFFE
66#define SX126X_MAX_TIMEOUT_IN_MS (SX126X_MAX_TIMEOUT_IN_RTC_STEP / 64)
72#define SX126X_RX_SINGLE_MODE 0x00000000
77#define SX126X_RX_CONTINUOUS 0x00FFFFFF
79#define SX126X_CHIP_MODES_POS (4U)
80#define SX126X_CHIP_MODES_MASK (0x07UL << SX126X_CHIP_MODES_POS)
82#define SX126X_CMD_STATUS_POS (1U)
83#define SX126X_CMD_STATUS_MASK (0x07UL << SX126X_CMD_STATUS_POS)
85#define SX126X_GFSK_RX_STATUS_PKT_SENT_POS (0U)
86#define SX126X_GFSK_RX_STATUS_PKT_SENT_MASK (0x01UL << SX126X_GFSK_RX_STATUS_PKT_SENT_POS)
88#define SX126X_GFSK_RX_STATUS_PKT_RECEIVED_POS (1U)
89#define SX126X_GFSK_RX_STATUS_PKT_RECEIVED_MASK (0x01UL << SX126X_GFSK_RX_STATUS_PKT_RECEIVED_POS)
91#define SX126X_GFSK_RX_STATUS_ABORT_ERROR_POS (2U)
92#define SX126X_GFSK_RX_STATUS_ABORT_ERROR_MASK (0x01UL << SX126X_GFSK_RX_STATUS_ABORT_ERROR_POS)
94#define SX126X_GFSK_RX_STATUS_LENGTH_ERROR_POS (3U)
95#define SX126X_GFSK_RX_STATUS_LENGTH_ERROR_MASK (0x01UL << SX126X_GFSK_RX_STATUS_LENGTH_ERROR_POS)
97#define SX126X_GFSK_RX_STATUS_CRC_ERROR_POS (4U)
98#define SX126X_GFSK_RX_STATUS_CRC_ERROR_MASK (0x01UL << SX126X_GFSK_RX_STATUS_CRC_ERROR_POS)
100#define SX126X_GFSK_RX_STATUS_ADRS_ERROR_POS (5U)
101#define SX126X_GFSK_RX_STATUS_ADRS_ERROR_MASK (0x01UL << SX126X_GFSK_RX_STATUS_ADRS_ERROR_POS)
112 SX126X_STATUS_OK = 0,
113 SX126X_STATUS_UNSUPPORTED_FEATURE,
114 SX126X_STATUS_UNKNOWN_VALUE,
122 SX126X_SLEEP_CFG_COLD_START = (0 << 2),
123 SX126X_SLEEP_CFG_WARM_START = (1 << 2),
130 SX126X_STANDBY_CFG_RC = 0x00,
131 SX126X_STANDBY_CFG_XOSC = 0x01,
134typedef uint8_t sx126x_standby_cfg_t;
140 SX126X_REG_MODE_LDO = 0x00,
141 SX126X_REG_MODE_DCDC = 0x01,
148 uint8_t pa_duty_cycle;
158 SX126X_FALLBACK_STDBY_RC = 0x20,
159 SX126X_FALLBACK_STDBY_XOSC = 0x30,
160 SX126X_FALLBACK_FS = 0x40,
167 SX126X_IRQ_NONE = (0 << 0),
168 SX126X_IRQ_TX_DONE = (1 << 0),
169 SX126X_IRQ_RX_DONE = (1 << 1),
170 SX126X_IRQ_PREAMBLE_DETECTED = (1 << 2),
171 SX126X_IRQ_SYNC_WORD_VALID = (1 << 3),
172 SX126X_IRQ_HEADER_VALID = (1 << 4),
173 SX126X_IRQ_HEADER_ERROR = (1 << 5),
174 SX126X_IRQ_CRC_ERROR = (1 << 6),
175 SX126X_IRQ_CAD_DONE = (1 << 7),
176 SX126X_IRQ_CAD_DETECTED = (1 << 8),
177 SX126X_IRQ_TIMEOUT = (1 << 9),
178 SX126X_IRQ_ALL = SX126X_IRQ_TX_DONE | SX126X_IRQ_RX_DONE | SX126X_IRQ_PREAMBLE_DETECTED |
179 SX126X_IRQ_SYNC_WORD_VALID | SX126X_IRQ_HEADER_VALID | SX126X_IRQ_HEADER_ERROR |
180 SX126X_IRQ_CRC_ERROR | SX126X_IRQ_CAD_DONE | SX126X_IRQ_CAD_DETECTED | SX126X_IRQ_TIMEOUT,
183typedef uint16_t sx126x_irq_mask_t;
189 SX126X_CAL_RC64K = (1 << 0),
190 SX126X_CAL_RC13M = (1 << 1),
191 SX126X_CAL_PLL = (1 << 2),
192 SX126X_CAL_ADC_PULSE = (1 << 3),
193 SX126X_CAL_ADC_BULK_N = (1 << 4),
194 SX126X_CAL_ADC_BULK_P = (1 << 5),
195 SX126X_CAL_IMAGE = (1 << 6),
196 SX126X_CAL_ALL = SX126X_CAL_RC64K | SX126X_CAL_RC13M | SX126X_CAL_PLL | SX126X_CAL_ADC_PULSE |
197 SX126X_CAL_ADC_BULK_N | SX126X_CAL_ADC_BULK_P | SX126X_CAL_IMAGE,
200typedef uint8_t sx126x_cal_mask_t;
206 SX126X_TCXO_CTRL_1_6V = 0x00,
207 SX126X_TCXO_CTRL_1_7V = 0x01,
208 SX126X_TCXO_CTRL_1_8V = 0x02,
209 SX126X_TCXO_CTRL_2_2V = 0x03,
210 SX126X_TCXO_CTRL_2_4V = 0x04,
211 SX126X_TCXO_CTRL_2_7V = 0x05,
212 SX126X_TCXO_CTRL_3_0V = 0x06,
213 SX126X_TCXO_CTRL_3_3V = 0x07,
220 SX126X_PKT_TYPE_GFSK = 0x00,
221 SX126X_PKT_TYPE_LORA = 0x01,
228 SX126X_RAMP_10_US = 0x00,
229 SX126X_RAMP_20_US = 0x01,
230 SX126X_RAMP_40_US = 0x02,
231 SX126X_RAMP_80_US = 0x03,
232 SX126X_RAMP_200_US = 0x04,
233 SX126X_RAMP_800_US = 0x05,
234 SX126X_RAMP_1700_US = 0x06,
235 SX126X_RAMP_3400_US = 0x07,
242 SX126X_GFSK_PULSE_SHAPE_OFF = 0x00,
243 SX126X_GFSK_PULSE_SHAPE_BT_03 = 0x08,
244 SX126X_GFSK_PULSE_SHAPE_BT_05 = 0x09,
245 SX126X_GFSK_PULSE_SHAPE_BT_07 = 0x0A,
246 SX126X_GFSK_PULSE_SHAPE_BT_1 = 0x0B,
253 SX126X_GFSK_BW_4800 = 0x1F,
254 SX126X_GFSK_BW_5800 = 0x17,
255 SX126X_GFSK_BW_7300 = 0x0F,
256 SX126X_GFSK_BW_9700 = 0x1E,
257 SX126X_GFSK_BW_11700 = 0x16,
258 SX126X_GFSK_BW_14600 = 0x0E,
259 SX126X_GFSK_BW_19500 = 0x1D,
260 SX126X_GFSK_BW_23400 = 0x15,
261 SX126X_GFSK_BW_29300 = 0x0D,
262 SX126X_GFSK_BW_39000 = 0x1C,
263 SX126X_GFSK_BW_46900 = 0x14,
264 SX126X_GFSK_BW_58600 = 0x0C,
265 SX126X_GFSK_BW_78200 = 0x1B,
266 SX126X_GFSK_BW_93800 = 0x13,
267 SX126X_GFSK_BW_117300 = 0x0B,
268 SX126X_GFSK_BW_156200 = 0x1A,
269 SX126X_GFSK_BW_187200 = 0x12,
270 SX126X_GFSK_BW_234300 = 0x0A,
271 SX126X_GFSK_BW_312000 = 0x19,
272 SX126X_GFSK_BW_373600 = 0x11,
273 SX126X_GFSK_BW_467000 = 0x09,
290 SX126X_LORA_SF5 = 0x05,
291 SX126X_LORA_SF6 = 0x06,
292 SX126X_LORA_SF7 = 0x07,
293 SX126X_LORA_SF8 = 0x08,
294 SX126X_LORA_SF9 = 0x09,
295 SX126X_LORA_SF10 = 0x0A,
296 SX126X_LORA_SF11 = 0x0B,
297 SX126X_LORA_SF12 = 0x0C,
304 SX126X_LORA_BW_500 = 6,
305 SX126X_LORA_BW_250 = 5,
306 SX126X_LORA_BW_125 = 4,
307 SX126X_LORA_BW_062 = 3,
308 SX126X_LORA_BW_041 = 10,
309 SX126X_LORA_BW_031 = 2,
310 SX126X_LORA_BW_020 = 9,
311 SX126X_LORA_BW_015 = 1,
312 SX126X_LORA_BW_010 = 8,
313 SX126X_LORA_BW_007 = 0,
320 SX126X_LORA_CR_4_5 = 0x01,
321 SX126X_LORA_CR_4_6 = 0x02,
322 SX126X_LORA_CR_4_7 = 0x03,
323 SX126X_LORA_CR_4_8 = 0x04,
340 SX126X_GFSK_PREAMBLE_DETECTOR_OFF = 0x00,
341 SX126X_GFSK_PREAMBLE_DETECTOR_MIN_8BITS = 0x04,
342 SX126X_GFSK_PREAMBLE_DETECTOR_MIN_16BITS = 0x05,
343 SX126X_GFSK_PREAMBLE_DETECTOR_MIN_24BITS = 0x06,
344 SX126X_GFSK_PREAMBLE_DETECTOR_MIN_32BITS = 0x07,
351 SX126X_GFSK_ADDRESS_FILTERING_DISABLE = 0x00,
352 SX126X_GFSK_ADDRESS_FILTERING_NODE_ADDRESS = 0x01,
353 SX126X_GFSK_ADDRESS_FILTERING_NODE_AND_BROADCAST_ADDRESSES = 0x02,
368 SX126X_GFSK_CRC_OFF = 0x01,
369 SX126X_GFSK_CRC_1_BYTE = 0x00,
370 SX126X_GFSK_CRC_2_BYTES = 0x02,
371 SX126X_GFSK_CRC_1_BYTE_INV = 0x04,
372 SX126X_GFSK_CRC_2_BYTES_INV = 0x06,
379 SX126X_GFSK_DC_FREE_OFF = 0x00,
380 SX126X_GFSK_DC_FREE_WHITENING = 0x01,
422 SX126X_CAD_01_SYMB = 0x00,
423 SX126X_CAD_02_SYMB = 0x01,
424 SX126X_CAD_04_SYMB = 0x02,
425 SX126X_CAD_08_SYMB = 0x03,
426 SX126X_CAD_16_SYMB = 0x04,
435 SX126X_CAD_ONLY = 0x00,
436 SX126X_CAD_RX = 0x01,
437 SX126X_CAD_LBT = 0x10,
455 SX126X_CHIP_MODE_UNUSED = 0,
456 SX126X_CHIP_MODE_RFU = 1,
457 SX126X_CHIP_MODE_STBY_RC = 2,
458 SX126X_CHIP_MODE_STBY_XOSC = 3,
459 SX126X_CHIP_MODE_FS = 4,
460 SX126X_CHIP_MODE_RX = 5,
461 SX126X_CHIP_MODE_TX = 6,
468 SX126X_CMD_STATUS_RESERVED = 0,
469 SX126X_CMD_STATUS_RFU = 1,
470 SX126X_CMD_STATUS_DATA_AVAILABLE = 2,
471 SX126X_CMD_STATUS_CMD_TIMEOUT = 3,
472 SX126X_CMD_STATUS_CMD_PROCESS_ERROR = 4,
473 SX126X_CMD_STATUS_CMD_EXEC_FAILURE = 5,
474 SX126X_CMD_STATUS_CMD_TX_DONE = 6,
524 uint16_t nb_pkt_received;
525 uint16_t nb_pkt_crc_error;
526 uint16_t nb_pkt_len_error;
533 uint16_t nb_pkt_received;
534 uint16_t nb_pkt_crc_error;
535 uint16_t nb_pkt_header_error;
542 SX126X_ERRORS_RC64K_CALIBRATION = (1 << 0),
543 SX126X_ERRORS_RC13M_CALIBRATION = (1 << 1),
544 SX126X_ERRORS_PLL_CALIBRATION = (1 << 2),
545 SX126X_ERRORS_ADC_CALIBRATION = (1 << 3),
546 SX126X_ERRORS_IMG_CALIBRATION = (1 << 4),
547 SX126X_ERRORS_XOSC_START = (1 << 5),
548 SX126X_ERRORS_PLL_LOCK = (1 << 6),
549 SX126X_ERRORS_PA_RAMP = (1 << 8),
552typedef uint16_t sx126x_errors_mask_t;
SX126X CAD parameters structure definition.
sx126x_cad_symbs_t cad_symb_nb
CAD number of symbols.
sx126x_cad_exit_modes_t cad_exit_mode
CAD exit mode.
uint8_t cad_detect_min
CAD minimum detection.
uint8_t cad_detect_peak
CAD peak detection.
uint32_t cad_timeout
CAD timeout value.
SX126X chip status structure definition.
sx126x_chip_modes_t chip_mode
Current chip mode.
sx126x_cmd_status_t cmd_status
Previous command status.
SX126X GFSK modulation parameters structure definition.
SX126X LoRa modulation parameters structure definition.
sx126x_lora_sf_t sf
LoRa Spreading Factor.
sx126x_lora_cr_t cr
LoRa Coding Rate.
uint8_t ldro
Low DataRate Optimization configuration.
sx126x_lora_bw_t bw
LoRa Bandwidth.
SX126X power amplifier configuration parameters structure definition.
SX126X GFSK packet parameters structure definition.
sx126x_gfsk_pkt_len_modes_t header_type
Header type.
sx126x_gfsk_preamble_detector_t preamble_detector
Preamble detection length.
uint8_t pld_len_in_bytes
Payload length in bytes.
uint16_t preamble_len_in_bits
Preamble length in bits.
sx126x_gfsk_dc_free_t dc_free
Whitening configuration.
uint8_t sync_word_len_in_bits
Sync word length in bits.
sx126x_gfsk_crc_types_t crc_type
CRC type configuration.
sx126x_gfsk_address_filtering_t address_filtering
Address filtering configuration.
SX126X LoRa packet parameters structure definition.
uint16_t preamble_len_in_symb
Preamble length in symbols.
bool crc_is_on
CRC activation.
bool invert_iq_is_on
IQ polarity setup.
uint8_t pld_len_in_bytes
Payload length in bytes.
sx126x_lora_pkt_len_modes_t header_type
Header type.
SX126X GFSK packet status structure definition.
int8_t rssi_sync
The RSSI measured on last packet.
int8_t rssi_avg
The averaged RSSI.
SX126X LoRa packet status structure definition.
int8_t signal_rssi_pkt_in_dbm
Estimation of RSSI (after despreading)
int8_t rssi_pkt_in_dbm
RSSI of the last packet.
int8_t snr_pkt_in_db
SNR of the last packet.
SX126X RX buffer status structure definition.
uint8_t buffer_start_pointer
Position of the first byte in the buffer.
uint8_t pld_len_in_bytes
Number of bytes available in the buffer.
SX126X GFSK reception statistics structure definition.
SX126X LoRa reception statistics structure definition.
sx126x_status_t sx126x_set_rf_freq_in_pll_steps(struct network_context *nctx, const uint32_t freq)
Set the RF frequency for future radio operations - parameter in PLL steps.
sx126x_status_t sx126x_set_fs(struct network_context *nctx)
Set the chip in frequency synthesis mode.
sx126x_lora_sf_e
SX126X LoRa spreading factor enumeration definition.
sx126x_status_t sx126x_set_dio3_as_tcxo_ctrl(struct network_context *nctx, const sx126x_tcxo_ctrl_voltages_t tcxo_voltage, const uint32_t timeout)
Configure the embedded TCXO switch control.
enum sx126x_lora_bw_e sx126x_lora_bw_t
SX126X LoRa bandwidth enumeration definition.
sx126x_status_t sx126x_set_rx_with_timeout_in_rtc_step(struct network_context *nctx, const uint32_t timeout_in_rtc_step)
Set the chip in reception mode.
sx126x_status_t sx126x_get_rssi_inst(struct network_context *nctx, int16_t *rssi_in_dbm)
Get the instantaneous RSSI value.
enum sx126x_gfsk_pulse_shape_e sx126x_gfsk_pulse_shape_t
SX126X GFSK modulation shaping enumeration definition.
sx126x_gfsk_pkt_len_modes_e
SX126X GFSK packet length enumeration definition.
@ SX126X_GFSK_PKT_VAR_LEN
The packet length is variable, header included.
@ SX126X_GFSK_PKT_FIX_LEN
The packet length is known on both sides, no header included.
enum sx126x_cmd_status_e sx126x_cmd_status_t
SX126X command status enumeration definition.
sx126x_status_t sx126x_set_gfsk_mod_params(struct network_context *nctx, const sx126x_mod_params_gfsk_t *params)
Set the modulation parameters for GFSK packets.
sx126x_status_t sx126x_set_pkt_type(struct network_context *nctx, const sx126x_pkt_type_t pkt_type)
Set the packet type.
sx126x_status_t sx126x_cfg_rx_boosted(struct network_context *nctx, const bool state)
Configure the boost mode in reception.
sx126x_status_t sx126x_set_rx_tx_fallback_mode(struct network_context *nctx, const sx126x_fallback_modes_t fallback_mode)
Set chip mode to be used after successful transmission or reception.
sx126x_cad_exit_modes_e
SX126X LoRa CAD exit modes enumeration definition.
struct sx126x_mod_params_gfsk_s sx126x_mod_params_gfsk_t
SX126X GFSK modulation parameters structure definition.
sx126x_status_t sx126x_set_pa_cfg(struct network_context *nctx, const sx126x_pa_cfg_params_t *params)
Configure the PA (Power Amplifier)
sx126x_status_t sx126x_set_standby(struct network_context *nctx, const sx126x_standby_cfg_t cfg)
Set the chip in stand-by mode.
enum sx126x_gfsk_dc_free_e sx126x_gfsk_dc_free_t
SX126X GFSK whitening control enumeration definition.
enum sx126x_status_e sx126x_status_t
SX126X APIs return status enumeration definition.
sx126x_status_t sx126x_get_lora_pkt_status(struct network_context *nctx, sx126x_pkt_status_lora_t *pkt_status)
Get the status of the last LoRa packet received.
struct sx126x_pkt_status_gfsk_s sx126x_pkt_status_gfsk_t
SX126X GFSK packet status structure definition.
struct sx126x_chip_status_s sx126x_chip_status_t
SX126X chip status structure definition.
sx126x_status_t sx126x_get_status(struct network_context *nctx, sx126x_chip_status_t *radio_status)
Get the chip status.
sx126x_status_t sx126x_set_lora_mod_params(struct network_context *nctx, const sx126x_mod_params_lora_t *params)
Set the modulation parameters for LoRa packets.
sx126x_status_t sx126x_set_rf_freq(struct network_context *nctx, const uint32_t freq_in_hz)
Set the RF frequency for future radio operations.
sx126x_status_t sx126x_set_tx(struct network_context *nctx, const uint32_t timeout_in_ms)
Set the chip in transmission mode.
sx126x_status_t sx126x_get_gfsk_stats(struct network_context *nctx, sx126x_stats_gfsk_t *stats)
Get the statistics about GFSK communication.
sx126x_cad_symbs_e
SX126X LoRa CAD number of symbols enumeration definition.
sx126x_status_t sx126x_stop_rtc(struct network_context *nctx)
Stop the RTC and clear the related event.
enum sx126x_lora_cr_e sx126x_lora_cr_t
SX126X LoRa coding rate enumeration definition.
sx126x_status_t sx126x_set_rx_duty_cycle(struct network_context *nctx, const uint32_t rx_time_in_ms, const uint32_t sleep_time_in_ms)
Set the chip in reception mode with duty cycling.
sx126x_status_t sx126x_set_gfsk_crc_polynomial(struct network_context *nctx, const uint16_t polynomial)
Configure the polynomial used to compute CRC in GFSK packet.
sx126x_fallback_modes_e
SX126X fallback modes enumeration definition.
struct sx126x_pa_cfg_params_s sx126x_pa_cfg_params_t
SX126X power amplifier configuration parameters structure definition.
uint32_t sx126x_get_lora_bw_in_hz(sx126x_lora_bw_t bw)
Get the actual value in Hertz of a given LoRa bandwidth.
sx16x_gfsk_crc_types_e
SX126X GFSK CRC type enumeration definition.
sx126x_irq_masks_e
SX126X interrupt masks enumeration definition.
sx126x_status_t sx126x_read_register(struct network_context *nctx, const uint16_t address, uint8_t *buffer, const uint8_t size)
Read data from register memory space.
uint32_t sx126x_convert_timeout_in_ms_to_rtc_step(uint32_t timeout_in_ms)
Get the number of RTC steps for a given timeout in millisecond.
sx126x_status_t sx126x_cfg_tx_clamp(struct network_context *nctx)
Configure the Tx PA clamp.
sx126x_status_t sx126x_get_irq_status(struct network_context *nctx, sx126x_irq_mask_t *irq)
Get system interrupt status.
sx126x_status_e
SX126X APIs return status enumeration definition.
uint32_t sx126x_get_gfsk_time_on_air_in_ms(const sx126x_pkt_params_gfsk_t *pkt_p, const sx126x_mod_params_gfsk_t *mod_p)
Get the time on air in ms for GFSK transmission.
sx126x_gfsk_bw_e
SX126X GFSK Rx bandwidth enumeration definition.
sx126x_lora_cr_e
SX126X LoRa coding rate enumeration definition.
struct sx126x_cad_param_s sx126x_cad_params_t
SX126X CAD parameters structure definition.
enum sx126x_lora_pkt_len_modes_e sx126x_lora_pkt_len_modes_t
SX126X LoRa packet length enumeration definition.
struct sx126x_mod_params_lora_s sx126x_mod_params_lora_t
SX126X LoRa modulation parameters structure definition.
sx126x_gfsk_preamble_detector_e
SX126X GFSK preamble length Rx detection size enumeration definition.
sx126x_status_t sx126x_set_tx_infinite_preamble(struct network_context *nctx)
Set the chip in Tx infinite preamble (modulated signal).
struct sx126x_pkt_params_lora_s sx126x_pkt_params_lora_t
SX126X LoRa packet parameters structure definition.
sx126x_status_t sx126x_reset_stats(struct network_context *nctx)
Reset all the statistics for both Lora and GFSK communications.
sx126x_cal_mask_e
Calibration settings.
sx126x_status_t sx126x_set_ocp_value(struct network_context *nctx, const uint8_t ocp_in_step_of_2_5_ma)
Configure the Over Current Protection (OCP) value.
sx126x_status_t sx126x_write_register(struct network_context *nctx, const uint16_t address, const uint8_t *buffer, const uint8_t size)
Write data into register memory space.
struct sx126x_pkt_params_gfsk_s sx126x_pkt_params_gfsk_t
SX126X GFSK packet parameters structure definition.
sx126x_status_t sx126x_set_reg_mode(struct network_context *nctx, const sx126x_reg_mod_t mode)
Configure the regulator mode to be used.
sx126x_status_t sx126x_cal_img(struct network_context *nctx, const uint32_t freq_in_hz)
Perform device operating frequency band image rejection calibration.
sx126x_status_t sx126x_get_device_errors(struct network_context *nctx, sx126x_errors_mask_t *errors)
Get the list of all active errors.
sx126x_status_t sx126x_set_gfsk_sync_word(struct network_context *nctx, const uint8_t *sync_word, const uint8_t sync_word_len)
Configure the sync word used in GFSK packet.
enum sx126x_gfsk_preamble_detector_e sx126x_gfsk_preamble_detector_t
SX126X GFSK preamble length Rx detection size enumeration definition.
uint32_t sx126x_get_lora_time_on_air_in_ms(const sx126x_pkt_params_lora_t *pkt_p, const sx126x_mod_params_lora_t *mod_p)
Get the time on air in ms for LoRa transmission.
enum sx126x_pkt_types_e sx126x_pkt_type_t
SX126X packet types enumeration definition.
sx126x_status_t sx126x_set_trimming_capacitor_values(struct network_context *nctx, const uint8_t trimming_cap_xta, const uint8_t trimming_cap_xtb)
Configure the internal trimming capacitor values.
enum sx126x_gfsk_pkt_len_modes_e sx126x_gfsk_pkt_len_modes_t
SX126X GFSK packet length enumeration definition.
sx126x_errors_e
SX126X errors enumeration definition.
sx126x_status_t sx126x_set_gfsk_whitening_seed(struct network_context *nctx, const uint16_t seed)
Configure the whitening seed used in GFSK packet.
enum sx126x_gfsk_bw_e sx126x_gfsk_bw_t
SX126X GFSK Rx bandwidth enumeration definition.
sx126x_status_t sx126x_wakeup(struct network_context *nctx)
Wake the radio up from sleep mode.
enum sx126x_ramp_time_e sx126x_ramp_time_t
SX126X power amplifier ramp-up timings enumeration definition.
sx126x_status_t sx126x_cal(struct network_context *nctx, const sx126x_cal_mask_t param)
Perform the calibration of the requested blocks.
sx126x_status_t sx126x_set_gfsk_pkt_params(struct network_context *nctx, const sx126x_pkt_params_gfsk_t *params)
Set the packet parameters for GFSK packets.
sx126x_standby_cfgs_e
SX126X standby modes enumeration definition.
sx126x_status_t sx126x_get_pkt_type(struct network_context *nctx, sx126x_pkt_type_t *pkt_type)
Get the current packet type.
sx126x_status_t sx126x_get_and_clear_irq_status(struct network_context *nctx, sx126x_irq_mask_t *irq)
Clears any radio irq status flags that are set and returns the flags that were cleared.
sx126x_status_t sx126x_get_gfsk_pkt_status(struct network_context *nctx, sx126x_pkt_status_gfsk_t *pkt_status)
Get the status of the last GFSK packet received.
enum sx126x_standby_cfgs_e sx126x_standby_cfgs_t
SX126X standby modes enumeration definition.
enum sx126x_chip_modes_e sx126x_chip_modes_t
SX126X chip mode enumeration definition.
sx126x_reg_mods_e
SX126X power regulator modes enumeration definition.
sx126x_status_t sx126x_reset(struct network_context *nctx)
Perform a hard reset of the chip.
enum sx126x_gfsk_address_filtering_e sx126x_gfsk_address_filtering_t
SX126X GFSK address filtering configuration enumeration definition.
sx126x_status_t sx126x_set_rx_duty_cycle_with_timings_in_rtc_step(struct network_context *nctx, const uint32_t rx_time_in_rtc_step, const uint32_t sleep_time_in_rtc_step)
Set the chip in reception mode with duty cycling.
enum sx126x_tcxo_ctrl_voltages_e sx126x_tcxo_ctrl_voltages_t
SX126X TCXO control voltages enumeration definition.
sx126x_gfsk_dc_free_e
SX126X GFSK whitening control enumeration definition.
sx126x_status_t sx126x_write_buffer(struct network_context *nctx, const uint8_t offset, const uint8_t *buffer, const uint8_t size)
Write data into radio Tx buffer memory space.
sx126x_status_t sx126x_read_buffer(struct network_context *nctx, const uint8_t offset, uint8_t *buffer, const uint8_t size)
Read data from radio Rx buffer memory space.
sx126x_sleep_cfgs_e
SX126X sleep mode configurations definition.
enum sx126x_cad_exit_modes_e sx126x_cad_exit_modes_t
SX126X LoRa CAD exit modes enumeration definition.
sx126x_lora_pkt_len_modes_e
SX126X LoRa packet length enumeration definition.
@ SX126X_LORA_PKT_EXPLICIT
Header included in the packet.
@ SX126X_LORA_PKT_IMPLICIT
Header not included in the packet.
sx126x_status_t sx126x_get_rx_buffer_status(struct network_context *nctx, sx126x_rx_buffer_status_t *rx_buffer_status)
Get the current Rx buffer status for both LoRa and GFSK Rx operations.
sx126x_status_t sx126x_set_sleep(struct network_context *nctx, const sx126x_sleep_cfgs_t cfg)
Set the chip in sleep mode.
enum sx126x_fallback_modes_e sx126x_fallback_modes_t
SX126X fallback modes enumeration definition.
sx126x_status_t sx126x_set_dio_irq_params(struct network_context *nctx, const uint16_t irq_mask, const uint16_t dio1_mask, const uint16_t dio2_mask, const uint16_t dio3_mask)
Set which interrupt signals are redirected to the dedicated DIO pin.
uint32_t sx126x_get_gfsk_time_on_air_numerator(const sx126x_pkt_params_gfsk_t *pkt_p)
Compute the numerator for GFSK time-on-air computation.
sx126x_status_t sx126x_clear_device_errors(struct network_context *nctx)
Clear all active errors.
struct sx126x_rx_buffer_status_s sx126x_rx_buffer_status_t
SX126X RX buffer status structure definition.
sx126x_status_t sx126x_set_gfsk_crc_seed(struct network_context *nctx, uint16_t seed)
Configure the seed used to compute CRC in GFSK packet.
sx126x_status_t sx126x_set_dio2_as_rf_sw_ctrl(struct network_context *nctx, const bool enable)
Configure the embedded RF switch control.
enum sx16x_gfsk_crc_types_e sx126x_gfsk_crc_types_t
SX126X GFSK CRC type enumeration definition.
sx126x_status_t sx126x_get_random_numbers(struct network_context *nctx, uint32_t *numbers, unsigned int n)
Generate one or more 32-bit random numbers.
sx126x_status_t sx126x_set_buffer_base_address(struct network_context *nctx, const uint8_t tx_base_address, const uint8_t rx_base_address)
Set buffer start addresses for both Tx and Rx operations.
sx126x_lora_bw_e
SX126X LoRa bandwidth enumeration definition.
sx126x_status_t sx126x_stop_timer_on_preamble(struct network_context *nctx, const bool enable)
Configure the event on which the Rx timeout is stopped.
uint32_t sx126x_convert_freq_in_hz_to_pll_step(uint32_t freq_in_hz)
Get the number of PLL steps for a given frequency in Hertz.
struct sx126x_stats_lora_s sx126x_stats_lora_t
SX126X LoRa reception statistics structure definition.
struct sx126x_stats_gfsk_s sx126x_stats_gfsk_t
SX126X GFSK reception statistics structure definition.
sx126x_status_t sx126x_set_tx_params(struct network_context *nctx, const int8_t pwr_in_dbm, const sx126x_ramp_time_t ramp_time)
Set the parameters for TX power and power amplifier ramp time.
sx126x_status_t sx126x_get_lora_stats(struct network_context *nctx, sx126x_stats_lora_t *stats)
Get the statistics about LoRa communication.
sx126x_gfsk_address_filtering_e
SX126X GFSK address filtering configuration enumeration definition.
enum sx126x_cad_symbs_e sx126x_cad_symbs_t
SX126X LoRa CAD number of symbols enumeration definition.
sx126x_status_t sx126x_set_tx_cw(struct network_context *nctx)
Set the chip in Tx continuous wave (RF tone).
enum sx126x_reg_mods_e sx126x_reg_mod_t
SX126X power regulator modes enumeration definition.
sx126x_ramp_time_e
SX126X power amplifier ramp-up timings enumeration definition.
sx126x_status_t sx126x_get_gfsk_bw_param(const uint32_t bw, uint8_t *param)
Get the parameter corresponding to a GFSK Rx bandwith immediately above the minimum requested one.
uint32_t sx126x_get_lora_time_on_air_numerator(const sx126x_pkt_params_lora_t *pkt_p, const sx126x_mod_params_lora_t *mod_p)
Compute the numerator for LoRa time-on-air computation.
sx126x_status_t sx126x_set_cad(struct network_context *nctx)
Set the chip in CAD (Channel Activity Detection) mode.
sx126x_pkt_types_e
SX126X packet types enumeration definition.
sx126x_status_t sx126x_set_lora_pkt_params(struct network_context *nctx, const sx126x_pkt_params_lora_t *params)
Set the packet parameters for LoRa packets.
sx126x_status_t sx126x_set_rx(struct network_context *nctx, const uint32_t timeout_in_ms)
Set the chip in reception mode.
sx126x_cmd_status_e
SX126X command status enumeration definition.
enum sx126x_lora_sf_e sx126x_lora_sf_t
SX126X LoRa spreading factor enumeration definition.
sx126x_gfsk_pulse_shape_e
SX126X GFSK modulation shaping enumeration definition.
sx126x_status_t sx126x_set_lora_sync_word(struct network_context *nctx, const uint8_t sync_word)
Configure the sync word used in LoRa packet.
sx126x_status_t sx126x_set_cad_params(struct network_context *nctx, const sx126x_cad_params_t *params)
Set the parameters for CAD operation.
sx126x_status_t sx126x_set_tx_with_timeout_in_rtc_step(struct network_context *nctx, const uint32_t timeout_in_rtc_step)
Set the chip in transmission mode.
sx126x_status_t sx126x_clear_irq_status(struct network_context *nctx, const sx126x_irq_mask_t irq_mask)
Clear selected system interrupts.
enum sx126x_sleep_cfgs_e sx126x_sleep_cfgs_t
SX126X sleep mode configurations definition.
struct sx126x_pkt_status_lora_s sx126x_pkt_status_lora_t
SX126X LoRa packet status structure definition.
sx126x_chip_modes_e
SX126X chip mode enumeration definition.
sx126x_tcxo_ctrl_voltages_e
SX126X TCXO control voltages enumeration definition.