lriot 2.1.0.0
lr1110_system_types.h File Reference

System driver types for LR1110. More...

#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  lr1110_system_rfswitch_cfg_s
 RF switch configuration structure definition. More...
 
struct  lr1110_system_stat1_s
 Status register 1 structure definition. More...
 
struct  lr1110_system_stat2_s
 Status register 2 structure definition. More...
 
struct  lr1110_system_version_s
 Version structure definition. More...
 
struct  lr1110_system_sleep_cfg_s
 Sleep configuration structure definition. More...
 

Macros

#define LR1110_SYSTEM_VERSION_LENGTH   ( 4 )
 Length in byte of the LR1110 version blob.
 
#define LR1110_SYSTEM_UID_LENGTH   ( 8 )
 Length of the LR1110 Unique Identifier in bytes.
 
#define LR1110_SYSTEM_JOIN_EUI_LENGTH   ( 8 )
 
#define LR1110_SYSTEM_PIN_LENGTH   ( 4 )
 
#define LR1110_SYSTEM_IRQ_NONE   ( 0 << 0 )
 Interrupt flags.
 
#define LR1110_SYSTEM_IRQ_TX_DONE   ( 1 << 2 )
 
#define LR1110_SYSTEM_IRQ_RX_DONE   ( 1 << 3 )
 
#define LR1110_SYSTEM_IRQ_PREAMBLE_DETECTED   ( 1 << 4 )
 
#define LR1110_SYSTEM_IRQ_SYNC_WORD_HEADER_VALID   ( 1 << 5 )
 
#define LR1110_SYSTEM_IRQ_HEADER_ERROR   ( 1 << 6 )
 
#define LR1110_SYSTEM_IRQ_CRC_ERROR   ( 1 << 7 )
 
#define LR1110_SYSTEM_IRQ_CAD_DONE   ( 1 << 8 )
 
#define LR1110_SYSTEM_IRQ_CAD_DETECTED   ( 1 << 9 )
 
#define LR1110_SYSTEM_IRQ_TIMEOUT   ( 1 << 10 )
 
#define LR1110_SYSTEM_IRQ_LR_FHSS_INTRA_PKT_HOP   ( 1 << 11 )
 
#define LR1110_SYSTEM_IRQ_GNSS_SCAN_DONE   ( 1ul << 19 )
 
#define LR1110_SYSTEM_IRQ_WIFI_SCAN_DONE   ( 1ul << 20 )
 
#define LR1110_SYSTEM_IRQ_EOL   ( 1ul << 21 )
 
#define LR1110_SYSTEM_IRQ_CMD_ERROR   ( 1ul << 22 )
 
#define LR1110_SYSTEM_IRQ_ERROR   ( 1ul << 23 )
 
#define LR1110_SYSTEM_IRQ_FSK_LEN_ERROR   ( 1ul << 24 )
 
#define LR1110_SYSTEM_IRQ_FSK_ADDR_ERROR   ( 1ul << 25 )
 
#define LR1110_SYSTEM_IRQ_ALL_MASK
 

Typedefs

typedef uint8_t lr1110_system_uid_t[LR1110_SYSTEM_UID_LENGTH]
 Fixed-length array to store a UID.
 
typedef uint8_t lr1110_system_join_eui_t[LR1110_SYSTEM_JOIN_EUI_LENGTH]
 Fixed-length array to store a joinEUI.
 
typedef uint8_t lr1110_system_pin_t[LR1110_SYSTEM_PIN_LENGTH]
 Fixed-length array to store a PIN.
 
typedef uint32_t lr1110_system_irq_mask_t
 Type to store system interrupt flags.
 
typedef uint8_t lr1110_system_cal_mask_t
 
typedef uint16_t lr1110_system_errors_t
 
typedef struct lr1110_system_rfswitch_cfg_s lr1110_system_rfswitch_cfg_t
 RF switch configuration structure definition.
 
typedef struct lr1110_system_stat1_s lr1110_system_stat1_t
 Status register 1 structure definition.
 
typedef struct lr1110_system_stat2_s lr1110_system_stat2_t
 Status register 2 structure definition.
 
typedef struct lr1110_system_version_s lr1110_system_version_t
 Version structure definition.
 
typedef struct lr1110_system_sleep_cfg_s lr1110_system_sleep_cfg_t
 Sleep configuration structure definition.
 

Enumerations

enum  lr1110_system_calibration_e {
  LR1110_SYSTEM_CALIB_LF_RC_MASK = ( 1 << 0 ) , LR1110_SYSTEM_CALIB_HF_RC_MASK = ( 1 << 1 ) , LR1110_SYSTEM_CALIB_PLL_MASK = ( 1 << 2 ) , LR1110_SYSTEM_CALIB_ADC_MASK = ( 1 << 3 ) ,
  LR1110_SYSTEM_CALIB_IMG_MASK = ( 1 << 4 ) , LR1110_SYSTEM_CALIB_PLL_TX_MASK = ( 1 << 5 )
}
 Calibration flags. More...
 
enum  lr1110_system_errors_e {
  LR1110_SYSTEM_ERRORS_LF_RC_CALIB_MASK = ( 1 << 0 ) , LR1110_SYSTEM_ERRORS_HF_RC_CALIB_MASK = ( 1 << 1 ) , LR1110_SYSTEM_ERRORS_ADC_CALIB_MASK = ( 1 << 2 ) , LR1110_SYSTEM_ERRORS_PLL_CALIB_MASK = ( 1 << 3 ) ,
  LR1110_SYSTEM_ERRORS_IMG_CALIB_MASK = ( 1 << 4 ) , LR1110_SYSTEM_ERRORS_HF_XOSC_START_MASK = ( 1 << 5 ) , LR1110_SYSTEM_ERRORS_LF_XOSC_START_MASK = ( 1 << 6 ) , LR1110_SYSTEM_ERRORS_PLL_LOCK_MASK = ( 1 << 7 )
}
 Error flags. More...
 
enum  lr1110_system_chip_modes_t {
  LR1110_SYSTEM_CHIP_MODE_SLEEP = 0x00 , LR1110_SYSTEM_CHIP_MODE_STBY_RC = 0x01 , LR1110_SYSTEM_CHIP_MODE_STBY_XOSC = 0x02 , LR1110_SYSTEM_CHIP_MODE_FS = 0x03 ,
  LR1110_SYSTEM_CHIP_MODE_RX = 0x04 , LR1110_SYSTEM_CHIP_MODE_TX = 0x05 , LR1110_SYSTEM_CHIP_MODE_LOC = 0x06
}
 Chip modes. More...
 
enum  lr1110_system_reset_status_t {
  LR1110_SYSTEM_RESET_STATUS_CLEARED = 0x00 , LR1110_SYSTEM_RESET_STATUS_ANALOG = 0x01 , LR1110_SYSTEM_RESET_STATUS_EXTERNAL = 0x02 , LR1110_SYSTEM_RESET_STATUS_SYSTEM = 0x03 ,
  LR1110_SYSTEM_RESET_STATUS_WATCHDOG = 0x04 , LR1110_SYSTEM_RESET_STATUS_IOCD_RESTART = 0x05 , LR1110_SYSTEM_RESET_STATUS_RTC_RESTART = 0x06
}
 Reset status. More...
 
enum  lr1110_system_command_status_t { LR1110_SYSTEM_CMD_STATUS_FAIL = 0x00 , LR1110_SYSTEM_CMD_STATUS_PERR = 0x01 , LR1110_SYSTEM_CMD_STATUS_OK = 0x02 , LR1110_SYSTEM_CMD_STATUS_DATA = 0x03 }
 Command status. More...
 
enum  lr1110_system_lfclk_cfg_t { LR1110_SYSTEM_LFCLK_RC = 0x00 , LR1110_SYSTEM_LFCLK_XTAL = 0x01 , LR1110_SYSTEM_LFCLK_EXT = 0x02 }
 Low-frequency clock modes. More...
 
enum  lr1110_system_reg_mode_t { LR1110_SYSTEM_REG_MODE_LDO = 0x00 , LR1110_SYSTEM_REG_MODE_DCDC = 0x01 }
 Regulator modes. More...
 
enum  lr1110_system_infopage_id_t { LR1110_SYSTEM_INFOPAGE_0 = 0x00 , LR1110_SYSTEM_INFOPAGE_1 = 0x01 }
 Info page ID. More...
 
enum  lr1110_system_rfswitch_cfg_pin_e {
  LR1110_SYSTEM_RFSW0_HIGH = ( 1 << 0 ) , LR1110_SYSTEM_RFSW1_HIGH = ( 1 << 1 ) , LR1110_SYSTEM_RFSW2_HIGH = ( 1 << 2 ) , LR1110_SYSTEM_RFSW3_HIGH = ( 1 << 3 ) ,
  LR1110_SYSTEM_RFSW4_HIGH = ( 1 << 4 )
}
 RF switch configuration pin. More...
 
enum  lr1110_system_standby_cfg_t { LR1110_SYSTEM_STANDBY_CFG_RC = 0x00 , LR1110_SYSTEM_STANDBY_CFG_XOSC = 0x01 }
 Stand by configuration values. More...
 
enum  lr1110_system_tcxo_supply_voltage_t {
  LR1110_SYSTEM_TCXO_CTRL_1_6V = 0x00 , LR1110_SYSTEM_TCXO_CTRL_1_7V = 0x01 , LR1110_SYSTEM_TCXO_CTRL_1_8V = 0x02 , LR1110_SYSTEM_TCXO_CTRL_2_2V = 0x03 ,
  LR1110_SYSTEM_TCXO_CTRL_2_4V = 0x04 , LR1110_SYSTEM_TCXO_CTRL_2_7V = 0x05 , LR1110_SYSTEM_TCXO_CTRL_3_0V = 0x06 , LR1110_SYSTEM_TCXO_CTRL_3_3V = 0x07
}
 TCXO supply voltage values. More...
 

Detailed Description

System driver types for LR1110.

The Clear BSD License Copyright Semtech Corporation 2021. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the Semtech corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ LR1110_SYSTEM_IRQ_ALL_MASK

#define LR1110_SYSTEM_IRQ_ALL_MASK
Value:
#define LR1110_SYSTEM_IRQ_WIFI_SCAN_DONE
Definition lr1110_system_types.h:114
#define LR1110_SYSTEM_IRQ_GNSS_SCAN_DONE
Definition lr1110_system_types.h:113
#define LR1110_SYSTEM_IRQ_RX_DONE
Definition lr1110_system_types.h:104
#define LR1110_SYSTEM_IRQ_HEADER_ERROR
Definition lr1110_system_types.h:107
#define LR1110_SYSTEM_IRQ_CMD_ERROR
Definition lr1110_system_types.h:116
#define LR1110_SYSTEM_IRQ_EOL
Definition lr1110_system_types.h:115
#define LR1110_SYSTEM_IRQ_TX_DONE
Definition lr1110_system_types.h:103
#define LR1110_SYSTEM_IRQ_CAD_DETECTED
Definition lr1110_system_types.h:110
#define LR1110_SYSTEM_IRQ_ERROR
Definition lr1110_system_types.h:117
#define LR1110_SYSTEM_IRQ_FSK_LEN_ERROR
Definition lr1110_system_types.h:118
#define LR1110_SYSTEM_IRQ_FSK_ADDR_ERROR
Definition lr1110_system_types.h:119
#define LR1110_SYSTEM_IRQ_PREAMBLE_DETECTED
Definition lr1110_system_types.h:105
#define LR1110_SYSTEM_IRQ_CAD_DONE
Definition lr1110_system_types.h:109
#define LR1110_SYSTEM_IRQ_TIMEOUT
Definition lr1110_system_types.h:111
#define LR1110_SYSTEM_IRQ_CRC_ERROR
Definition lr1110_system_types.h:108
#define LR1110_SYSTEM_IRQ_SYNC_WORD_HEADER_VALID
Definition lr1110_system_types.h:106

◆ LR1110_SYSTEM_IRQ_CAD_DETECTED

#define LR1110_SYSTEM_IRQ_CAD_DETECTED   ( 1 << 9 )

◆ LR1110_SYSTEM_IRQ_CAD_DONE

#define LR1110_SYSTEM_IRQ_CAD_DONE   ( 1 << 8 )

◆ LR1110_SYSTEM_IRQ_CMD_ERROR

#define LR1110_SYSTEM_IRQ_CMD_ERROR   ( 1ul << 22 )

◆ LR1110_SYSTEM_IRQ_CRC_ERROR

#define LR1110_SYSTEM_IRQ_CRC_ERROR   ( 1 << 7 )

◆ LR1110_SYSTEM_IRQ_EOL

#define LR1110_SYSTEM_IRQ_EOL   ( 1ul << 21 )

◆ LR1110_SYSTEM_IRQ_ERROR

#define LR1110_SYSTEM_IRQ_ERROR   ( 1ul << 23 )

◆ LR1110_SYSTEM_IRQ_FSK_ADDR_ERROR

#define LR1110_SYSTEM_IRQ_FSK_ADDR_ERROR   ( 1ul << 25 )

◆ LR1110_SYSTEM_IRQ_FSK_LEN_ERROR

#define LR1110_SYSTEM_IRQ_FSK_LEN_ERROR   ( 1ul << 24 )

◆ LR1110_SYSTEM_IRQ_GNSS_SCAN_DONE

#define LR1110_SYSTEM_IRQ_GNSS_SCAN_DONE   ( 1ul << 19 )

◆ LR1110_SYSTEM_IRQ_HEADER_ERROR

#define LR1110_SYSTEM_IRQ_HEADER_ERROR   ( 1 << 6 )

◆ LR1110_SYSTEM_IRQ_LR_FHSS_INTRA_PKT_HOP

#define LR1110_SYSTEM_IRQ_LR_FHSS_INTRA_PKT_HOP   ( 1 << 11 )

◆ LR1110_SYSTEM_IRQ_NONE

#define LR1110_SYSTEM_IRQ_NONE   ( 0 << 0 )

Interrupt flags.

◆ LR1110_SYSTEM_IRQ_PREAMBLE_DETECTED

#define LR1110_SYSTEM_IRQ_PREAMBLE_DETECTED   ( 1 << 4 )

◆ LR1110_SYSTEM_IRQ_RX_DONE

#define LR1110_SYSTEM_IRQ_RX_DONE   ( 1 << 3 )

◆ LR1110_SYSTEM_IRQ_SYNC_WORD_HEADER_VALID

#define LR1110_SYSTEM_IRQ_SYNC_WORD_HEADER_VALID   ( 1 << 5 )

◆ LR1110_SYSTEM_IRQ_TIMEOUT

#define LR1110_SYSTEM_IRQ_TIMEOUT   ( 1 << 10 )

◆ LR1110_SYSTEM_IRQ_TX_DONE

#define LR1110_SYSTEM_IRQ_TX_DONE   ( 1 << 2 )

◆ LR1110_SYSTEM_IRQ_WIFI_SCAN_DONE

#define LR1110_SYSTEM_IRQ_WIFI_SCAN_DONE   ( 1ul << 20 )

◆ LR1110_SYSTEM_JOIN_EUI_LENGTH

#define LR1110_SYSTEM_JOIN_EUI_LENGTH   ( 8 )

◆ LR1110_SYSTEM_PIN_LENGTH

#define LR1110_SYSTEM_PIN_LENGTH   ( 4 )

◆ LR1110_SYSTEM_UID_LENGTH

#define LR1110_SYSTEM_UID_LENGTH   ( 8 )

Length of the LR1110 Unique Identifier in bytes.

The LR1110 Unique Identifiers is an 8 byte long buffer

◆ LR1110_SYSTEM_VERSION_LENGTH

#define LR1110_SYSTEM_VERSION_LENGTH   ( 4 )

Length in byte of the LR1110 version blob.

Typedef Documentation

◆ lr1110_system_cal_mask_t

typedef uint8_t lr1110_system_cal_mask_t

◆ lr1110_system_errors_t

typedef uint16_t lr1110_system_errors_t

◆ lr1110_system_irq_mask_t

typedef uint32_t lr1110_system_irq_mask_t

Type to store system interrupt flags.

◆ lr1110_system_join_eui_t

typedef uint8_t lr1110_system_join_eui_t[LR1110_SYSTEM_JOIN_EUI_LENGTH]

Fixed-length array to store a joinEUI.

◆ lr1110_system_pin_t

typedef uint8_t lr1110_system_pin_t[LR1110_SYSTEM_PIN_LENGTH]

Fixed-length array to store a PIN.

◆ lr1110_system_rfswitch_cfg_t

RF switch configuration structure definition.

◆ lr1110_system_sleep_cfg_t

Sleep configuration structure definition.

◆ lr1110_system_stat1_t

Status register 1 structure definition.

◆ lr1110_system_stat2_t

Status register 2 structure definition.

◆ lr1110_system_uid_t

typedef uint8_t lr1110_system_uid_t[LR1110_SYSTEM_UID_LENGTH]

Fixed-length array to store a UID.

◆ lr1110_system_version_t

Version structure definition.

Enumeration Type Documentation

◆ lr1110_system_calibration_e

Calibration flags.

Enumerator
LR1110_SYSTEM_CALIB_LF_RC_MASK 
LR1110_SYSTEM_CALIB_HF_RC_MASK 
LR1110_SYSTEM_CALIB_PLL_MASK 
LR1110_SYSTEM_CALIB_ADC_MASK 
LR1110_SYSTEM_CALIB_IMG_MASK 
LR1110_SYSTEM_CALIB_PLL_TX_MASK 

◆ lr1110_system_chip_modes_t

Chip modes.

Enumerator
LR1110_SYSTEM_CHIP_MODE_SLEEP 
LR1110_SYSTEM_CHIP_MODE_STBY_RC 
LR1110_SYSTEM_CHIP_MODE_STBY_XOSC 
LR1110_SYSTEM_CHIP_MODE_FS 
LR1110_SYSTEM_CHIP_MODE_RX 
LR1110_SYSTEM_CHIP_MODE_TX 
LR1110_SYSTEM_CHIP_MODE_LOC 

◆ lr1110_system_command_status_t

Command status.

Enumerator
LR1110_SYSTEM_CMD_STATUS_FAIL 
LR1110_SYSTEM_CMD_STATUS_PERR 
LR1110_SYSTEM_CMD_STATUS_OK 
LR1110_SYSTEM_CMD_STATUS_DATA 

◆ lr1110_system_errors_e

Error flags.

Enumerator
LR1110_SYSTEM_ERRORS_LF_RC_CALIB_MASK 
LR1110_SYSTEM_ERRORS_HF_RC_CALIB_MASK 
LR1110_SYSTEM_ERRORS_ADC_CALIB_MASK 
LR1110_SYSTEM_ERRORS_PLL_CALIB_MASK 
LR1110_SYSTEM_ERRORS_IMG_CALIB_MASK 
LR1110_SYSTEM_ERRORS_HF_XOSC_START_MASK 
LR1110_SYSTEM_ERRORS_LF_XOSC_START_MASK 
LR1110_SYSTEM_ERRORS_PLL_LOCK_MASK 

◆ lr1110_system_infopage_id_t

Info page ID.

Enumerator
LR1110_SYSTEM_INFOPAGE_0 

Info page #0.

LR1110_SYSTEM_INFOPAGE_1 

Info page #1.

◆ lr1110_system_lfclk_cfg_t

Low-frequency clock modes.

Enumerator
LR1110_SYSTEM_LFCLK_RC 

(Default)

LR1110_SYSTEM_LFCLK_XTAL 
LR1110_SYSTEM_LFCLK_EXT 

◆ lr1110_system_reg_mode_t

Regulator modes.

Enumerator
LR1110_SYSTEM_REG_MODE_LDO 

(Default)

LR1110_SYSTEM_REG_MODE_DCDC 

◆ lr1110_system_reset_status_t

Reset status.

Enumerator
LR1110_SYSTEM_RESET_STATUS_CLEARED 
LR1110_SYSTEM_RESET_STATUS_ANALOG 
LR1110_SYSTEM_RESET_STATUS_EXTERNAL 
LR1110_SYSTEM_RESET_STATUS_SYSTEM 
LR1110_SYSTEM_RESET_STATUS_WATCHDOG 
LR1110_SYSTEM_RESET_STATUS_IOCD_RESTART 
LR1110_SYSTEM_RESET_STATUS_RTC_RESTART 

◆ lr1110_system_rfswitch_cfg_pin_e

RF switch configuration pin.

Enumerator
LR1110_SYSTEM_RFSW0_HIGH 
LR1110_SYSTEM_RFSW1_HIGH 
LR1110_SYSTEM_RFSW2_HIGH 
LR1110_SYSTEM_RFSW3_HIGH 
LR1110_SYSTEM_RFSW4_HIGH 

◆ lr1110_system_standby_cfg_t

Stand by configuration values.

Enumerator
LR1110_SYSTEM_STANDBY_CFG_RC 
LR1110_SYSTEM_STANDBY_CFG_XOSC 

◆ lr1110_system_tcxo_supply_voltage_t

TCXO supply voltage values.

Enumerator
LR1110_SYSTEM_TCXO_CTRL_1_6V 

Supply voltage = 1.6v.

LR1110_SYSTEM_TCXO_CTRL_1_7V 

Supply voltage = 1.7v.

LR1110_SYSTEM_TCXO_CTRL_1_8V 

Supply voltage = 1.8v.

LR1110_SYSTEM_TCXO_CTRL_2_2V 

Supply voltage = 2.2v.

LR1110_SYSTEM_TCXO_CTRL_2_4V 

Supply voltage = 2.4v.

LR1110_SYSTEM_TCXO_CTRL_2_7V 

Supply voltage = 2.7v.

LR1110_SYSTEM_TCXO_CTRL_3_0V 

Supply voltage = 3.0v.

LR1110_SYSTEM_TCXO_CTRL_3_3V 

Supply voltage = 3.3v.