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

This file contains API for LR 14 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  lr14_t
 LR 14 Click context object. More...
 
struct  lr14_cfg_t
 LR 14 Click configuration object. More...
 

Macros

#define LR14_CMD_AT   "AT"
 LR 14 control commands. More...
 
#define LR14_CMD_TOGGLE_ECHO   "ATE"
 
#define LR14_CMD_FACTORY_RESET   "ATR"
 
#define LR14_CMD_GET_MODEL_ID   "AT+HWMODEL"
 
#define LR14_CMD_GET_FW_VERSION   "AT+VER"
 
#define LR14_CMD_GET_SERIAL_NUMBER   "AT+SN"
 
#define LR14_CMD_NETWORK_WORK_MODE   "AT+NWM"
 
#define LR14_CMD_P2P_MODE_FREQUENCY   "AT+PFREQ"
 
#define LR14_CMD_P2P_MODE_SPREADING_FACTOR   "AT+PSF"
 
#define LR14_CMD_P2P_MODE_BANDWIDTH   "AT+PBW"
 
#define LR14_CMD_P2P_MODE_CODE_RATE   "AT+PCR"
 
#define LR14_CMD_P2P_MODE_PREAMBLE_LENGTH   "AT+PPL"
 
#define LR14_CMD_P2P_MODE_TX_POWER   "AT+PTP"
 
#define LR14_CMD_P2P_RX_MODE   "AT+PRECV"
 
#define LR14_CMD_P2P_TX_MODE   "AT+PSEND"
 
#define LR14_RSP_OK   "OK"
 LR 14 device response for AT commands. More...
 
#define LR14_RSP_ERROR   "AT_ERROR"
 
#define LR14_RSP_PARAM_ERROR   "AT_PARAM_ERROR"
 
#define LR14_RSP_BUSY_ERROR   "AT_BUSY_ERROR"
 
#define LR14_RSP_TEST_PARAM_OVERFLOW   "AT_TEST_PARAM_OVERFLOW"
 
#define LR14_RSP_NO_CLASSB_ENABLE   "AT_NO_CLASSB_ENABLE"
 
#define LR14_RSP_NO_NETWORK_JOINED   "AT_NO_NETWORK_JOINED"
 
#define LR14_RSP_RX_ERROR   "AT_RX_ERROR"
 
#define LR14_RSP_INITIAL   "----------------------"
 
#define LR14_EVT_RX_P2P   "+EVT:RXP2P"
 LR 14 device events settings. More...
 
#define LR14_EVT_RX_P2P_ERROR   "+EVT:RXP2P RECEIVE ERROR"
 
#define LR14_EVT_RX_P2P_TIMEOUT   "+EVT:RXP2P RECEIVE TIMEOUT"
 
#define LR14_EVT_TX_P2P   "+EVT:TXP2P"
 
#define LR14_TX_DRV_BUFFER_SIZE   200
 LR 14 driver buffer size. More...
 
#define LR14_RX_DRV_BUFFER_SIZE   600
 
#define LR14_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  lr14_return_value_t { LR14_OK = 0, LR14_ERROR = -1, LR14_ERROR_TIMEOUT = -2, LR14_ERROR_CMD = -3 }
 LR 14 Click return value data. More...
 

Functions

void lr14_cfg_setup (lr14_cfg_t *cfg)
 LR 14 configuration object setup function. More...
 
err_t lr14_init (lr14_t *ctx, lr14_cfg_t *cfg)
 LR 14 initialization function. More...
 
err_t lr14_generic_write (lr14_t *ctx, uint8_t *data_in, uint16_t len)
 LR 14 data writing function. More...
 
err_t lr14_generic_read (lr14_t *ctx, uint8_t *data_out, uint16_t len)
 LR 14 data reading function. More...
 
void lr14_set_rst_pin (lr14_t *ctx, uint8_t state)
 LR 14 set RST pin function. More...
 
void lr14_reset_device (lr14_t *ctx)
 LR 14 reset device function. More...
 
void lr14_cmd_run (lr14_t *ctx, uint8_t *cmd)
 LR 14 cmd run function. More...
 
void lr14_cmd_set (lr14_t *ctx, uint8_t *cmd, uint8_t *value)
 LR 14 cmd set function. More...
 
void lr14_cmd_get (lr14_t *ctx, uint8_t *cmd)
 LR 14 cmd get function. More...
 
void lr14_cmd_help (lr14_t *ctx, uint8_t *cmd)
 LR 14 cmd help function. More...
 

Detailed Description

This file contains API for LR 14 Click Driver.

Enumeration Type Documentation

◆ lr14_return_value_t

LR 14 Click return value data.

Predefined enum values for driver return values.

Enumerator
LR14_OK 
LR14_ERROR 
LR14_ERROR_TIMEOUT 
LR14_ERROR_CMD