lr10 2.1.0.0
lr10.h File Reference

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

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  lr10_t
 LR 10 Click context object. More...
 
struct  lr10_cfg_t
 LR 10 Click configuration object. More...
 

Macros

#define LR10_CMD_AT   "AT"
 LR 10 control commands.
 
#define LR10_CMD_FDEFAULT   "FDEFAULT"
 
#define LR10_CMD_RESET   "RESET"
 
#define LR10_CMD_LOWPOWER   "LOWPOWER"
 
#define LR10_CMD_VER   "VER"
 
#define LR10_CMD_MSG   "MSG"
 
#define LR10_CMD_MSGHEX   "MSGHEX"
 
#define LR10_CMD_CMSG   "CMSG"
 
#define LR10_CMD_CMSGHEX   "CMSGHEX"
 
#define LR10_CMD_PMSG   "PMSG"
 
#define LR10_CMD_PMSGHEX   "PMSGHEX"
 
#define LR10_CMD_CH   "CH"
 
#define LR10_CMD_DR   "DR"
 
#define LR10_CMD_ADR   "ADR"
 
#define LR10_CMD_REPT   "REPT"
 
#define LR10_CMD_RETRY   "RETRY"
 
#define LR10_CMD_POWER   "POWER"
 
#define LR10_CMD_RXWIN2   "RXWIN2"
 
#define LR10_CMD_RXWIN1   "RXWIN1"
 
#define LR10_CMD_PORT   "PORT"
 
#define LR10_CMD_MODE   "MODE"
 
#define LR10_CMD_ID   "ID"
 
#define LR10_CMD_KEY   "KEY"
 
#define LR10_CMD_CLASS   "CLASS"
 
#define LR10_CMD_JOIN   "JOIN"
 
#define LR10_CMD_LW   "LW"
 
#define LR10_CMD_BEACON   "BEACON"
 
#define LR10_CMD_TEST   "TEST"
 
#define LR10_CMD_UART   "UART"
 
#define LR10_CMD_DELAY   "DELAY"
 
#define LR10_CMD_VDD   "VDD"
 
#define LR10_CMD_RTC   "RTC"
 
#define LR10_CMD_EEPROM   "EEPROM"
 
#define LR10_CMD_WDT   "WDT"
 
#define LR10_CMD_TEMP   "TEMP"
 
#define LR10_CMD_LOG   "LOG"
 
#define LR10_SUB_CMD_ID_DEVADDR   "DEVADDR"
 LR 10 control subcommands.
 
#define LR10_SUB_CMD_ID_DEVEUI   "DEVEUI"
 
#define LR10_SUB_CMD_ID_APPEUI   "APPEUI"
 
#define LR10_SUB_CMD_CH_NUM   "NUM"
 
#define LR10_SUB_CMD_KEY_NWKSKEY   "NWKSKEY"
 
#define LR10_SUB_CMD_KEY_APPSKEY   "APPSKEY"
 
#define LR10_SUB_CMD_MODE_TEST   "TEST"
 
#define LR10_SUB_CMD_MODE_LWOTAA   "LWOTAA"
 
#define LR10_SUB_CMD_MODE_LWABP   "LWABP"
 
#define LR10_SUB_CMD_JOIN_FORCE   "FORCE"
 
#define LR10_SUB_CMD_JOIN_AUTO   "AUTO"
 
#define LR10_SUB_CMD_BEACON_DMMUL   "DMMUL"
 
#define LR10_SUB_CMD_BEACON_INFO   "INFO"
 
#define LR10_SUB_CMD_BEACON_GWGPS   "GWGPS"
 
#define LR10_SUB_CMD_DELAY_RX1   "RX1"
 
#define LR10_SUB_CMD_DELAY_RX2   "RX2"
 
#define LR10_SUB_CMD_DELAY_JRX1   "JRX1"
 
#define LR10_SUB_CMD_DELAY_JRX2   "JRX2"
 
#define LR10_SUB_CMD_LW_CDR   "CDR"
 
#define LR10_SUB_CMD_LW_ULDL   "ULDL"
 
#define LR10_SUB_CMD_LW_DC   "DC"
 
#define LR10_SUB_CMD_LW_NET   "NET"
 
#define LR10_SUB_CMD_LW_MC   "MC"
 
#define LR10_SUB_CMD_LW_THLD   "THLD"
 
#define LR10_SUB_CMD_LW_BAT   "BAT"
 
#define LR10_SUB_CMD_LW_TPS   "TPS"
 
#define LR10_SUB_CMD_LW_SCR   "SCR"
 
#define LR10_SUB_CMD_LW_JDC   "JDC"
 
#define LR10_SUB_CMD_LW_CT   "CT"
 
#define LR10_SUB_CMD_LW_LEN   "LEN"
 
#define LR10_SUB_CMD_LW_VER   "VER"
 
#define LR10_SUB_CMD_LW_DTR   "DTR"
 
#define LR10_SUB_CMD_LW_LCR   "LCR"
 
#define LR10_SUB_CMD_LW_LDRO   "LDRO"
 
#define LR10_SUB_CMD_LW_DCMRX   "DCMRX"
 
#define LR10_SUB_CMD_LW_DUMRX   "DUMRX"
 
#define LR10_SUB_CMD_LW_AFPACK   "AFPACK"
 
#define LR10_SUB_CMD_LW_CHRB   "CHRB"
 
#define LR10_SUB_CMD_RTC_ZONE   "ZONE"
 
#define LR10_SUB_CMD_RTC_FULL   "FULL"
 
#define LR10_SUB_CMD_RTC_LEAPSEC   "LEAPSEC"
 
#define LR10_SUB_CMD_RTC_UTCMS   "UTCMS"
 
#define LR10_SUB_CMD_EEPROM_ADDR   "ADDR"
 
#define LR10_SUB_CMD_UART_TIMEOUT   "TIMEOUT"
 
#define LR10_SUB_CMD_UART_BR   "BR"
 
#define LR10_SUB_CMD_TEST_STOP   "STOP"
 
#define LR10_SUB_CMD_TEST_HELP   "HELP"
 
#define LR10_SUB_CMD_TEST_TXCW   "TXCW"
 
#define LR10_SUB_CMD_TEST_TXCLORA   "TXCLORA"
 
#define LR10_SUB_CMD_TEST_RFCFG   "RFCFG"
 
#define LR10_SUB_CMD_TEST_RX   "RXLRPKT"
 
#define LR10_SUB_CMD_TEST_TX_HEX   "TXLRPKT"
 
#define LR10_SUB_CMD_TEST_TX_STR   "TXLRSTR"
 
#define LR10_SUB_CMD_TEST_RSSI   "RSSI"
 
#define LR10_SUB_CMD_LOG_DEBUG   "DEBUG"
 
#define LR10_SUB_CMD_LOG_QUIET   "QUIET"
 
#define LR10_SYMBOL_END_CMD   "\r\n"
 LR 10 control symbols.
 
#define LR10_SYMBOL_QUERY   "?"
 
#define LR10_SYMBOL_SET_VAL_CMD   "="
 
#define LR10_SYMBOL_PREFIX_CMD   "+"
 
#define LR10_SYMBOL_SEPARATOR   ","
 
#define LR10_SYMBOL_SPACE   " "
 
#define LR10_SYMBOL_NULL   ""
 
#define LR10_SYMBOL_QUOTE   "\""
 
#define LR10_ASCII_SPACE   0x20
 
#define LR10_ASCII_QUOTE   0x22
 
#define LR10_TX_DRV_BUFFER_SIZE   100
 LR 10 driver buffer size.
 
#define LR10_RX_DRV_BUFFER_SIZE   300
 
#define LR10_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  lr10_return_value_t { LR10_OK = 0 , LR10_ERROR = -1 }
 LR 10 Click return value data. More...
 
enum  lr10_en_quote_t { LR10_QUOTE_DISABLE = 0 , LR10_QUOTE_ENABLE }
 LR 10 Click enable quote value data. More...
 

Functions

void lr10_cfg_setup (lr10_cfg_t *cfg)
 LR 10 configuration object setup function.
 
err_t lr10_init (lr10_t *ctx, lr10_cfg_t *cfg)
 LR 10 initialization function.
 
void lr10_hw_reset (lr10_t *ctx)
 LR 10 HW reset function.
 
err_t lr10_generic_write (lr10_t *ctx, uint8_t *data_in, uint16_t len)
 LR 10 data writing function.
 
err_t lr10_generic_read (lr10_t *ctx, uint8_t *data_out, uint16_t len)
 LR 10 data reading function.
 
err_t lr10_write_cmd (lr10_t *ctx, uint8_t *command)
 LR 10 command writing function.
 
err_t lr10_write_cmd_param (lr10_t *ctx, uint8_t *command, uint8_t *param)
 LR 10 command - parameter writing function.
 
err_t lr10_write_cmd_sub_param (lr10_t *ctx, uint8_t *command, uint8_t *sub_param, uint8_t *param, lr10_en_quote_t en_quote)
 LR 10 command - subcommands - parameter writing function.
 
err_t lr10_inquire_cmd (lr10_t *ctx, uint8_t *command)
 LR 10 inquire command function.
 

Detailed Description

This file contains API for LR 10 Click Driver.

Enumeration Type Documentation

◆ lr10_en_quote_t

LR 10 Click enable quote value data.

Predefined enum values for driver enable quote values.

Enumerator
LR10_QUOTE_DISABLE 
LR10_QUOTE_ENABLE 

◆ lr10_return_value_t

LR 10 Click return value data.

Predefined enum values for driver return values.

Enumerator
LR10_OK 
LR10_ERROR