Go to the documentation of this file.
35 #include "drv_digital_out.h"
36 #include "drv_digital_in.h"
59 #define LR10_CMD_AT "AT"
60 #define LR10_CMD_FDEFAULT "FDEFAULT"
61 #define LR10_CMD_RESET "RESET"
62 #define LR10_CMD_LOWPOWER "LOWPOWER"
63 #define LR10_CMD_VER "VER"
64 #define LR10_CMD_MSG "MSG"
65 #define LR10_CMD_MSGHEX "MSGHEX"
66 #define LR10_CMD_CMSG "CMSG"
67 #define LR10_CMD_CMSGHEX "CMSGHEX"
68 #define LR10_CMD_PMSG "PMSG"
69 #define LR10_CMD_PMSGHEX "PMSGHEX"
70 #define LR10_CMD_CH "CH"
71 #define LR10_CMD_DR "DR"
72 #define LR10_CMD_ADR "ADR"
73 #define LR10_CMD_REPT "REPT"
74 #define LR10_CMD_RETRY "RETRY"
75 #define LR10_CMD_POWER "POWER"
76 #define LR10_CMD_RXWIN2 "RXWIN2"
77 #define LR10_CMD_RXWIN1 "RXWIN1"
78 #define LR10_CMD_PORT "PORT"
79 #define LR10_CMD_MODE "MODE"
80 #define LR10_CMD_ID "ID"
81 #define LR10_CMD_KEY "KEY"
82 #define LR10_CMD_CLASS "CLASS"
83 #define LR10_CMD_JOIN "JOIN"
84 #define LR10_CMD_LW "LW"
85 #define LR10_CMD_BEACON "BEACON"
86 #define LR10_CMD_TEST "TEST"
87 #define LR10_CMD_UART "UART"
88 #define LR10_CMD_DELAY "DELAY"
89 #define LR10_CMD_VDD "VDD"
90 #define LR10_CMD_RTC "RTC"
91 #define LR10_CMD_EEPROM "EEPROM"
92 #define LR10_CMD_WDT "WDT"
93 #define LR10_CMD_TEMP "TEMP"
94 #define LR10_CMD_LOG "LOG"
100 #define LR10_SUB_CMD_ID_DEVADDR "DEVADDR"
101 #define LR10_SUB_CMD_ID_DEVEUI "DEVEUI"
102 #define LR10_SUB_CMD_ID_APPEUI "APPEUI"
103 #define LR10_SUB_CMD_CH_NUM "NUM"
104 #define LR10_SUB_CMD_KEY_NWKSKEY "NWKSKEY"
105 #define LR10_SUB_CMD_KEY_APPSKEY "APPSKEY"
106 #define LR10_SUB_CMD_MODE_TEST "TEST"
107 #define LR10_SUB_CMD_MODE_LWOTAA "LWOTAA"
108 #define LR10_SUB_CMD_MODE_LWABP "LWABP"
109 #define LR10_SUB_CMD_JOIN_FORCE "FORCE"
110 #define LR10_SUB_CMD_JOIN_AUTO "AUTO"
111 #define LR10_SUB_CMD_BEACON_DMMUL "DMMUL"
112 #define LR10_SUB_CMD_BEACON_INFO "INFO"
113 #define LR10_SUB_CMD_BEACON_GWGPS "GWGPS"
114 #define LR10_SUB_CMD_DELAY_RX1 "RX1"
115 #define LR10_SUB_CMD_DELAY_RX2 "RX2"
116 #define LR10_SUB_CMD_DELAY_JRX1 "JRX1"
117 #define LR10_SUB_CMD_DELAY_JRX2 "JRX2"
118 #define LR10_SUB_CMD_LW_CDR "CDR"
119 #define LR10_SUB_CMD_LW_ULDL "ULDL"
120 #define LR10_SUB_CMD_LW_DC "DC"
121 #define LR10_SUB_CMD_LW_NET "NET"
122 #define LR10_SUB_CMD_LW_MC "MC"
123 #define LR10_SUB_CMD_LW_THLD "THLD"
124 #define LR10_SUB_CMD_LW_BAT "BAT"
125 #define LR10_SUB_CMD_LW_TPS "TPS"
126 #define LR10_SUB_CMD_LW_SCR "SCR"
127 #define LR10_SUB_CMD_LW_JDC "JDC"
128 #define LR10_SUB_CMD_LW_CT "CT"
129 #define LR10_SUB_CMD_LW_LEN "LEN"
130 #define LR10_SUB_CMD_LW_VER "VER"
131 #define LR10_SUB_CMD_LW_DTR "DTR"
132 #define LR10_SUB_CMD_LW_LCR "LCR"
133 #define LR10_SUB_CMD_LW_LDRO "LDRO"
134 #define LR10_SUB_CMD_LW_DCMRX "DCMRX"
135 #define LR10_SUB_CMD_LW_DUMRX "DUMRX"
136 #define LR10_SUB_CMD_LW_AFPACK "AFPACK"
137 #define LR10_SUB_CMD_LW_CHRB "CHRB"
138 #define LR10_SUB_CMD_RTC_ZONE "ZONE"
139 #define LR10_SUB_CMD_RTC_FULL "FULL"
140 #define LR10_SUB_CMD_RTC_LEAPSEC "LEAPSEC"
141 #define LR10_SUB_CMD_RTC_UTCMS "UTCMS"
142 #define LR10_SUB_CMD_EEPROM_ADDR "ADDR"
143 #define LR10_SUB_CMD_UART_TIMEOUT "TIMEOUT"
144 #define LR10_SUB_CMD_UART_BR "BR"
145 #define LR10_SUB_CMD_TEST_STOP "STOP"
146 #define LR10_SUB_CMD_TEST_HELP "HELP"
147 #define LR10_SUB_CMD_TEST_TXCW "TXCW"
148 #define LR10_SUB_CMD_TEST_TXCLORA "TXCLORA"
149 #define LR10_SUB_CMD_TEST_RFCFG "RFCFG"
150 #define LR10_SUB_CMD_TEST_RX "RXLRPKT"
151 #define LR10_SUB_CMD_TEST_TX_HEX "TXLRPKT"
152 #define LR10_SUB_CMD_TEST_TX_STR "TXLRSTR"
153 #define LR10_SUB_CMD_TEST_RSSI "RSSI"
154 #define LR10_SUB_CMD_LOG_DEBUG "DEBUG"
155 #define LR10_SUB_CMD_LOG_QUIET "QUIET"
161 #define LR10_SYMBOL_END_CMD "\r\n"
162 #define LR10_SYMBOL_QUERY "?"
163 #define LR10_SYMBOL_SET_VAL_CMD "="
164 #define LR10_SYMBOL_PREFIX_CMD "+"
165 #define LR10_SYMBOL_SEPARATOR ","
166 #define LR10_SYMBOL_SPACE " "
167 #define LR10_SYMBOL_NULL ""
168 #define LR10_SYMBOL_QUOTE "\""
169 #define LR10_ASCII_SPACE 0x20
170 #define LR10_ASCII_QUOTE 0x22
178 #define LR10_TX_DRV_BUFFER_SIZE 100
179 #define LR10_RX_DRV_BUFFER_SIZE 300
197 #define LR10_MAP_MIKROBUS( cfg, mikrobus ) \
198 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
199 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
200 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST )
void lr10_cfg_setup(lr10_cfg_t *cfg)
LR 10 configuration object setup function.
pin_name_t rst
Definition: lr10.h:234
void lr10_hw_reset(lr10_t *ctx)
LR 10 HW reset function.
err_t lr10_init(lr10_t *ctx, lr10_cfg_t *cfg)
LR 10 initialization 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_write_cmd(lr10_t *ctx, uint8_t *command)
LR 10 command writing function.
lr10_en_quote_t
LR 10 Click enable quote value data.
Definition: lr10.h:261
uart_stop_bits_t stop_bit
Definition: lr10.h:241
pin_name_t rx_pin
Definition: lr10.h:230
err_t lr10_inquire_cmd(lr10_t *ctx, uint8_t *command)
LR 10 inquire command function.
LR 10 Click configuration object.
Definition: lr10.h:228
uint32_t baud_rate
Definition: lr10.h:237
err_t lr10_generic_read(lr10_t *ctx, uint8_t *data_out, uint16_t len)
LR 10 data reading function.
err_t lr10_generic_write(lr10_t *ctx, uint8_t *data_in, uint16_t len)
LR 10 data writing function.
LR 10 Click context object.
Definition: lr10.h:210
lr10_return_value_t
LR 10 Click return value data.
Definition: lr10.h:250
err_t lr10_write_cmd_param(lr10_t *ctx, uint8_t *command, uint8_t *param)
LR 10 command - parameter writing function.
uart_parity_t parity_bit
Definition: lr10.h:240
#define LR10_TX_DRV_BUFFER_SIZE
LR 10 driver buffer size.
Definition: lr10.h:178
#define LR10_RX_DRV_BUFFER_SIZE
Definition: lr10.h:179
uart_data_bits_t data_bit
Definition: lr10.h:239
bool uart_blocking
Definition: lr10.h:238
@ LR10_ERROR
Definition: lr10.h:252
pin_name_t tx_pin
Definition: lr10.h:231
@ LR10_OK
Definition: lr10.h:251
uart_t uart
Definition: lr10.h:215
@ LR10_QUOTE_ENABLE
Definition: lr10.h:263
digital_out_t rst
Definition: lr10.h:212
@ LR10_QUOTE_DISABLE
Definition: lr10.h:262