35#ifndef LR1110_SYSTEM_H
36#define LR1110_SYSTEM_H
66#define LR1110_SYSTEM_IMAGE_CALIBRATION_STEP_IN_MHZ 4
451 uint16_t address, uint32_t* data_buf, uint8_t length );
469 uint16_t address, uint32_t* data_buf, uint8_t length );
Hardware Abstraction Layer (HAL) interface for LR1110.
err_t lr1110_system_get_errors(lriot_t *ctx, uint16_t *errors)
Return the system errors.
err_t lr1110_system_set_standby(lriot_t *ctx, lr1110_system_standby_cfg_t standby_cfg)
Set the device into the requested Standby mode.
err_t lr1110_system_erase_infopage(lriot_t *ctx, lr1110_system_infopage_id_t info_page_id)
Erase an info page.
err_t lr1110_system_get_status(lriot_t *ctx, lr1110_system_stat1_t *stat1, lr1110_system_stat2_t *stat2, lr1110_system_irq_mask_t *irq_status)
Return stat1, stat2, and irq_status.
err_t lr1110_system_calibrate_image_in_mhz(lriot_t *ctx, uint16_t freq1_in_mhz, uint16_t freq2_in_mhz)
Launch an image calibration valid for all frequencies inside an interval, in MHz.
err_t lr1110_system_write_infopage(lriot_t *ctx, lr1110_system_infopage_id_t info_page_id, uint16_t address, uint32_t *data_buf, uint8_t length)
Write data in an info page.
err_t lr1110_system_get_temp(lriot_t *ctx, uint16_t *temp)
Returns the value of Temp.
err_t lr1110_system_cfg_lfclk(lriot_t *ctx, lr1110_system_lfclk_cfg_t lfclock_cfg, bool wait_for_32k_ready)
Defines which clock is used as Low Frequency (LF) clock.
err_t lr1110_system_get_irq_status(lriot_t *ctx, lr1110_system_irq_mask_t *irq_status)
Return irq_status.
err_t lr1110_system_read_pin(lriot_t *ctx, lr1110_system_pin_t pin)
Compute and return the PIN of the LR1110 based on factory default EUIs.
err_t lr1110_system_read_uid(lriot_t *ctx, lr1110_system_uid_t unique_identifier)
Read and return the Unique Identifier of the LR1110.
err_t lr1110_system_drive_dio_in_sleep_mode(lriot_t *ctx, bool enable_drive)
Configure the GPIO drive in sleep mode.
err_t lr1110_system_read_infopage(lriot_t *ctx, lr1110_system_infopage_id_t info_page_id, uint16_t address, uint32_t *data_buf, uint8_t length)
Read data from an info page.
err_t lr1110_system_read_pin_custom_eui(lriot_t *ctx, lr1110_system_uid_t device_eui, lr1110_system_join_eui_t join_eui, uint8_t rfu, lr1110_system_pin_t pin)
Compute and return the PIN of the LR1110 based on EUIs provided as parameters.
err_t lr1110_system_reset(lriot_t *ctx)
Reset the radio.
err_t lr1110_system_get_random_number(lriot_t *ctx, uint32_t *random_number)
Read and return a 32-bit random number.
err_t lr1110_system_get_vbat(lriot_t *ctx, uint8_t *vbat)
Returns the value of Vbat.
err_t lr1110_system_reboot(lriot_t *ctx, bool stay_in_bootloader)
Software reset of the chip.
err_t lr1110_system_set_fs(lriot_t *ctx)
Set the device into Frequency Synthesis (FS) mode.
err_t lr1110_system_set_dio_irq_params(lriot_t *ctx, lr1110_system_irq_mask_t irqs_to_enable_dio1, lr1110_system_irq_mask_t irqs_to_enable_dio2)
Set which interrupt signals are redirected to the dedicated DIO pin.
err_t lr1110_system_clear_errors(lriot_t *ctx)
Clear all error flags pending.
err_t lr1110_system_set_tcxo_mode(lriot_t *ctx, lr1110_system_tcxo_supply_voltage_t tune, uint32_t timeout)
Enable and configure TCXO supply voltage and detection timeout.
err_t lr1110_system_set_reg_mode(lriot_t *ctx, lr1110_system_reg_mode_t reg_mode)
Configure the regulator mode to be used in specific modes.
err_t lr1110_system_enable_spi_crc(lriot_t *ctx, bool enable_crc)
Enable the CRC on SPI transactions.
err_t lr1110_system_get_version(lriot_t *ctx, lr1110_system_version_t *version)
Return the version of the system (hardware and software)
err_t lr1110_system_calibrate(lriot_t *ctx, uint8_t calib_param)
lr1110_system_calibrate the requested blocks
err_t lr1110_system_get_and_clear_irq_status(lriot_t *ctx, lr1110_system_irq_mask_t *irq)
This helper function clears any radio irq status flags that are set and returns the flags that were c...
err_t lr1110_system_set_dio_as_rf_switch(lriot_t *ctx, lr1110_system_rfswitch_cfg_t *rf_switch_cfg)
Set the RF switch configurations for each RF setup.
err_t lr1110_system_clear_reset_status_info(lriot_t *ctx)
Clear the reset status information stored in stat2.
err_t lr1110_system_wakeup(lriot_t *ctx)
Wake the radio up from sleep mode.
err_t lr1110_system_calibrate_image(lriot_t *ctx, uint8_t freq1, uint8_t freq2)
Launch an image calibration valid for all frequencies inside an interval, in steps.
err_t lr1110_system_read_join_eui(lriot_t *ctx, lr1110_system_join_eui_t join_eui)
Read and return the Join EUI of the LR1110.
err_t lr1110_system_set_sleep(lriot_t *ctx, lr1110_system_sleep_cfg_t sleep_cfg, uint32_t sleep_time)
Set the device into Sleep or Deep Sleep Mode.
err_t lr1110_system_clear_irq_status(lriot_t *ctx, lr1110_system_irq_mask_t irqs_to_clear)
Clear requested bits in the internal pending interrupt register.
System driver types for LR1110.
lr1110_system_reg_mode_t
Regulator modes.
Definition lr1110_system_types.h:213
uint8_t lr1110_system_pin_t[LR1110_SYSTEM_PIN_LENGTH]
Fixed-length array to store a PIN.
Definition lr1110_system_types.h:92
lr1110_system_tcxo_supply_voltage_t
TCXO supply voltage values.
Definition lr1110_system_types.h:267
uint8_t lr1110_system_uid_t[LR1110_SYSTEM_UID_LENGTH]
Fixed-length array to store a UID.
Definition lr1110_system_types.h:82
lr1110_system_standby_cfg_t
Stand by configuration values.
Definition lr1110_system_types.h:258
lr1110_system_lfclk_cfg_t
Low-frequency clock modes.
Definition lr1110_system_types.h:203
uint32_t lr1110_system_irq_mask_t
Type to store system interrupt flags.
Definition lr1110_system_types.h:97
lr1110_system_infopage_id_t
Info page ID.
Definition lr1110_system_types.h:222
uint8_t lr1110_system_join_eui_t[LR1110_SYSTEM_JOIN_EUI_LENGTH]
Fixed-length array to store a joinEUI.
Definition lr1110_system_types.h:87
Type definitions for LR1110.
RF switch configuration structure definition.
Definition lr1110_system_types.h:243
Sleep configuration structure definition.
Definition lr1110_system_types.h:311
Status register 1 structure definition.
Definition lr1110_system_types.h:282
Status register 2 structure definition.
Definition lr1110_system_types.h:291
Version structure definition.
Definition lr1110_system_types.h:301
LR IoT Click context object.
Definition lriot.h:273