lr2 2.1.0.0
|
This file contains API for LR 2 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 | lr2_buffers_t |
Click buffers object definition. More... | |
struct | lr2_timer_t |
Timer Flags and Counter object definition. More... | |
struct | lr2_procces_flags_t |
Process Flags object definition. More... | |
struct | lr2_response_t |
Response object definition. More... | |
struct | lr2_mac_t |
Mac object definition. More... | |
struct | lr2_t |
LR 2 Click context object. More... | |
struct | lr2_cfg_t |
LR 2 Click configuration object. More... | |
Macros | |
#define | LR2_CMD_SYS_GET_VER "sys get ver" |
LR 2 Click Commands. | |
#define | LR2_CMD_MAC_PAUSE "mac pause" |
#define | LR2_CMD_RADIO_SET_WDT "radio set wdt 0" |
#define | LR2_ARG_0 "0" |
#define | LR2_JM_OTAA "otaa" |
LR 2 Join mode. | |
#define | LR2_JM_ABP "abp" |
#define | LR2_PL_CNF "cnf " |
LR 2 Payload. | |
#define | LR2_PL_UNCNF "uncnf " |
#define | LR2_INVALID_PARAM 1 |
LR 2 Errors. | |
#define | LR2_NOT_JOINED 2 |
#define | LR2_NO_FREE_CH 3 |
#define | LR2_SILENT 4 |
#define | LR2_ERR_REJOIN_NEEDED 5 |
#define | LR2_BUSY 6 |
#define | LR2_MAC_PAUSED 7 |
#define | LR2_INVALID_PAR_DATA_LEN 8 |
#define | LR2_KEYS_NOT_INIT 9 |
#define | LR2_MAC_ERR 10 |
#define | LR2_MAC_RX 12 |
#define | LR2_INVALID_REPAR_DATA_LEN 13 |
#define | LR2_RADIO_ERR 14 |
#define | LR2_DENIED 18 |
#define | LR2_MAX_DATA_SIZE 256 |
LR 2 Command String Max Size. | |
#define | LR2_MAX_TRANSFER_SIZE 384 |
#define | LR2_MAX_CMD_SIZE 64 |
#define | LR2_MAX_RSP_SIZE 20 |
LR 2 Response String Max Size. | |
#define | LR2_RESP_COUNT 100 |
LR 2 Number of Response Indexes. | |
#define | LR2_TIMER_EXPIRED 50000 |
LR 2 Timer Limit. | |
#define | LR2_MAC_TX "mac tx " |
LR 2 Variables. | |
#define | LR2_JOIN "mac join " |
#define | LR2_RADIO_TX "radio tx " |
#define | LR2_RADIO_RX "radio rx " |
#define | LR2_DRV_RX_BUFFER_SIZE 300 |
LR 2 driver buffer size. | |
#define | LR2_DRV_TX_BUFFER_SIZE 100 |
#define | LR2_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | lr2_return_value_t { LR2_OK = 0 , LR2_ERROR = -1 } |
LR 2 Click return value data. More... | |
Functions | |
void | lr2_cfg_setup (lr2_cfg_t *cfg) |
LR 2 configuration object setup function. | |
err_t | lr2_init (lr2_t *ctx, lr2_cfg_t *cfg) |
LR 2 initialization function. | |
void | lr2_default_cfg (lr2_t *ctx, bool cb_default, void(*response_p)(char *response)) |
LR 2 default configuration function. | |
void | lr2_generic_write (lr2_t *ctx, char *data_buf, uint16_t len) |
LR 2 data writing function. | |
int32_t | lr2_generic_read (lr2_t *ctx, char *data_buf, uint16_t max_len) |
LR 2 data reading function. | |
void | lr2_cmd (lr2_t *ctx, char *cmd, char *response) |
Send command function. | |
uint8_t | lr2_mac_tx (lr2_t *ctx, lr2_mac_t *mac) |
Function for writing mac parameters. | |
uint8_t | lr2_join (lr2_t *ctx, char *join_mode, char *response) |
Function for setting join mode. | |
uint8_t | lr2_rx (lr2_t *ctx, char *window_size, char *response) |
Main receiver function | |
uint8_t | lr2_tx (lr2_t *ctx, char *buffer) |
Main tnanceiver function. | |
void | lr2_rx_isr (lr2_t *ctx, char rx_input) |
Receiver. | |
void | lr2_tick_isr (lr2_t *ctx) |
Timer. | |
void | lr2_tick_conf (lr2_t *ctx, uint32_t timer_limit) |
Timer Configuration. | |
void | lr2_isr_process (lr2_t *ctx) |
Main Process. | |
void | lr2_put_char (lr2_t *ctx, char data_in) |
Function for write char. | |
This file contains API for LR 2 Click Driver.
enum lr2_return_value_t |