lriot 2.1.0.0
lriot.h File Reference

This file contains API for LR IoT Click Driver. More...

Go to the source code of this file.

Data Structures

struct  lriot_wifi_settings_t
 LR IoT WiFi settings object. More...
 
struct  lriot_wifi_scan_results_t
 LR IoT WiFi Scan results object. More...
 
struct  lriot_gnss_scan_results_t
 LR IoT GNSS Scan results object. More...
 
struct  lriot_chip_info_t
 LR IoT chip info object. More...
 
struct  lriot_lora_packet_status_t
 LR IoT LoRa packet status object. More...
 
struct  lriot_t
 LR IoT Click context object. More...
 
struct  lriot_cfg_t
 LR IoT Click configuration object. More...
 

Macros

#define LRIOT_TEMP_INT_VREF   1.35
 LR IoT Temperature in Celsius calculation constants.
 
#define LRIOT_TEMP_VOLTAGE_AT_25C   0.7295
 
#define LRIOT_TEMP_RESOLUTION   2047.0
 
#define LRIOT_TEMP_NOMINAL   25
 
#define LRIOT_TEMP_SLOPE   -1.7
 
#define LRIOT_TEMP_SLOPE_DIVIDEND   1000.0
 
#define LRIOT_TCXO_DELAY_2SEC   0xFFFA
 LR IoT default duration for the 32 MHz oscillator to start and stabilize.
 
#define LRIOT_GNSS_SCAN_MAX_SATELLITES   16
 LR IoT GNSS scan macros.
 
#define LRIOT_GNSS_SCAN_RESULTS_BUF_LEN   256
 
#define LRIOT_GNSS_SCAN_DISPLAY_ALL   0
 
#define LRIOT_WIFI_SCAN_MAX_RESULTS   12
 LR IoT WiFi scan macros.
 
#define LRIOT_WIFI_SCAN_DISPLAY_ALL   0
 
#define LRIOT_LORA_PKT_PAYLOAD_LEN   64
 LR IoT LoRa macros.
 
#define LRIOT_LORA_DEFAULT_FREQ   868100000ul
 
#define LRIOT_UPDATE_FIRMWARE   0
 LR IoT update firmware macros.
 
#define LRIOT_TRANSCEIVER_FIRMWARE   0
 LR IoT firmware selector macros.
 
#define LRIOT_MODEM_FIRMWARE   1
 
#define LRIOT_FIRMWARE_SELECTOR   LRIOT_TRANSCEIVER_FIRMWARE
 
#define LRIOT_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define LRIOT_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define LRIOT_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  lriot_return_value_t { LRIOT_OK = 0 , LRIOT_ERROR = -1 }
 LR IoT Click return value data. More...
 

Functions

void lriot_cfg_setup (lriot_cfg_t *cfg)
 LR IoT configuration object setup function.
 
err_t lriot_init (lriot_t *ctx, lriot_cfg_t *cfg)
 LR IoT initialization function.
 
err_t lriot_default_cfg (lriot_t *ctx)
 LR IoT default configuration function.
 
void lriot_set_rst_pin (lriot_t *ctx, uint8_t state)
 LR IoT set rst pin function.
 
uint8_t lriot_get_busy_pin (lriot_t *ctx)
 LR IoT get busy pin function.
 
uint8_t lriot_get_int_pin (lriot_t *ctx)
 LR IoT get int pin function.
 
err_t lriot_get_chip_info (lriot_t *ctx, lriot_chip_info_t *info)
 LR IoT get chip info function.
 
err_t lriot_get_temperature (lriot_t *ctx, float *temperature)
 LR IoT get temperature function.
 
err_t lriot_send_lora_message (lriot_t *ctx, uint8_t *message)
 LR IoT send lora message function.
 
err_t lriot_read_lora_message (lriot_t *ctx, lriot_lora_packet_status_t *pkt_status, uint8_t *message)
 LR IoT read lora message function.
 
err_t lriot_get_wifi_scan_results (lriot_t *ctx, lriot_wifi_scan_results_t *results)
 LR IoT get wifi scan results function.
 
err_t lriot_get_gnss_scan_results (lriot_t *ctx, lriot_gnss_scan_results_t *results)
 LR IoT get gnss scan results function.
 
err_t lriot_update_firmware (lriot_t *ctx)
 LR IoT update firmware function.
 

Detailed Description

This file contains API for LR IoT Click Driver.

Enumeration Type Documentation

◆ lriot_return_value_t

LR IoT Click return value data.

Predefined enum values for driver return values.

Enumerator
LRIOT_OK 
LRIOT_ERROR