lriot  2.1.0.0
Data Structures | Macros | Enumerations | Functions
lriot.h File Reference

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

#include "mikrosdk_version.h"
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
#include "spi_specifics.h"
#include "common/lr1110_bootloader_types.h"
#include "common/lr1110_types.h"
#include "transceiver/lr1110_crypto_engine_types.h"
#include "transceiver/lr1110_gnss_types.h"
#include "transceiver/lr1110_radio_types.h"
#include "transceiver/lr1110_system_types.h"
#include "transceiver/lr1110_wifi_types.h"
#include "modem/lr1110_modem_lorawan_types.h"
#include "modem/lr1110_modem_wifi_types.h"
#include "modem/lr1110_modem_gnss_types.h"
#include "modem/lr1110_modem_helper_types.h"
#include "modem/lr1110_modem_system_types.h"

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. More...
 
#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. More...
 
#define LRIOT_GNSS_SCAN_MAX_SATELLITES   16
 LR IoT GNSS scan macros. More...
 
#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. More...
 
#define LRIOT_WIFI_SCAN_DISPLAY_ALL   0
 
#define LRIOT_LORA_PKT_PAYLOAD_LEN   64
 LR IoT LoRa macros. More...
 
#define LRIOT_LORA_DEFAULT_FREQ   868100000ul
 
#define LRIOT_UPDATE_FIRMWARE   0
 LR IoT update firmware macros. More...
 
#define LRIOT_TRANSCEIVER_FIRMWARE   0
 LR IoT firmware selector macros. More...
 
#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. More...
 
#define LRIOT_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define LRIOT_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

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. More...
 
err_t lriot_init (lriot_t *ctx, lriot_cfg_t *cfg)
 LR IoT initialization function. More...
 
err_t lriot_default_cfg (lriot_t *ctx)
 LR IoT default configuration function. More...
 
void lriot_set_rst_pin (lriot_t *ctx, uint8_t state)
 LR IoT set rst pin function. More...
 
uint8_t lriot_get_busy_pin (lriot_t *ctx)
 LR IoT get busy pin function. More...
 
uint8_t lriot_get_int_pin (lriot_t *ctx)
 LR IoT get int pin function. More...
 
err_t lriot_get_chip_info (lriot_t *ctx, lriot_chip_info_t *info)
 LR IoT get chip info function. More...
 
err_t lriot_get_temperature (lriot_t *ctx, float *temperature)
 LR IoT get temperature function. More...
 
err_t lriot_send_lora_message (lriot_t *ctx, uint8_t *message)
 LR IoT send lora message function. More...
 
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. More...
 
err_t lriot_get_wifi_scan_results (lriot_t *ctx, lriot_wifi_scan_results_t *results)
 LR IoT get wifi scan results function. More...
 
err_t lriot_get_gnss_scan_results (lriot_t *ctx, lriot_gnss_scan_results_t *results)
 LR IoT get gnss scan results function. More...
 
err_t lriot_update_firmware (lriot_t *ctx)
 LR IoT update firmware function. More...
 

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