lr3 2.0.0.0
|
Functions | |
void | lr3_cfg_setup (lr3_cfg_t *cfg) |
Config Object Initialization function. | |
LR3_RETVAL | lr3_init (lr3_t *ctx, lr3_cfg_t *cfg) |
Initialization function. | |
uint8_t | lr3_chk_sum (lr3_message_t *cmd) |
Check sum function. | |
int32_t | lr3_generic_read (lr3_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. | |
void | lr3_generic_write (lr3_t *ctx, char *data_buf, uint16_t len) |
Generic write function. | |
void | lr3_hard_reset (lr3_t *ctx) |
Hardware reset function. | |
void | lr3_wake_up (lr3_t *ctx, uint8_t state) |
Wake Up function. | |
void | lr3_set_ind_handler (lr3_t *ctx, lr3_ind_hdl_t hdl) |
Set indication handler function. | |
uint8_t | lr3_command (lr3_t *ctx, lr3_message_t *msg, lr3_message_t *rsp) |
Command function. | |
uint8_t | lr3_read_message_process (lr3_t *ctx) |
Process function. | |
LR3_RETVAL | lr3_soft_reset (lr3_t *ctx) |
Software reset function. | |
LR3_RETVAL | lr3_factory_reset (lr3_t *ctx) |
Factory reset function. | |
LR3_RETVAL | lr3_write_eeprom (lr3_t *ctx, uint8_t address, uint8_t n_bytes, uint8_t *data_in) |
EEPROM write function. | |
LR3_RETVAL | lr3_read_eeprom (lr3_t *ctx, uint8_t address, uint8_t n_bytes, uint8_t *data_out) |
EEPROM read function. | |
LR3_RETVAL | lr3_get_fw_version (lr3_t *ctx, uint32_t *fw_version) |
Get FW Version function. | |
LR3_RETVAL | lr3_get_serial_no (lr3_t *ctx, uint32_t *serial_no) |
Get Serial Number function. | |
LR3_RETVAL | lr3_enable_pairing (lr3_t *ctx, uint8_t state) |
Enable Pairing function. | |
LR3_RETVAL | lr3_get_network_table_size (lr3_t *ctx) |
Get Network Table Size function. | |
LR3_RETVAL | lr3_get_network_table_row (lr3_t *ctx, uint8_t index, uint8_t *data_out) |
Get Network Table Row function. | |
LR3_RETVAL | lr3_delete_network_table_row (lr3_t *ctx, uint8_t *device_id) |
Delete Network Table Row function. | |
LR3_RETVAL | lr3_delete_all_network_table (lr3_t *ctx) |
Delete All Network Table function. | |
LR3_RETVAL | lr3_tx_message (lr3_t *ctx, lr3_tx_msg_t *tx_msg) |
Radio frame Transmission function. | |
LR3_RETVAL | lr3_get_pairing_request (lr3_t *ctx) |
Get Pairing Request function. | |
LR3_RETVAL | lr3_get_activation_status (lr3_t *ctx, uint8_t *data_out) |
Get Activation Status function. | |
LR3_RETVAL | lr3_check_link_request (lr3_t *ctx, uint8_t power, uint8_t message_num, uint8_t message_th) |
Radio frame Transmission function. | |
LR3_RETVAL | lr3_set_app_key (lr3_t *ctx, uint8_t *app_key) |
Set App Key function. | |
void lr3_cfg_setup | ( | lr3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
LR3_RETVAL lr3_check_link_request | ( | lr3_t * | ctx, |
uint8_t | power, | ||
uint8_t | message_num, | ||
uint8_t | message_th ) |
Radio frame Transmission function.
ctx | Click object. |
power | Defines the power, from 2 to 14 dBm (suggested value is 11 dBm) |
message_num | Defines the number of messages to be transmitted, from 4 to 20 (suggested value is 5) |
message_th | Defines pass/fail criteria treshold as the number of received messages, from 1 to message_num (suggested value is 4) |
@description Function initiates from END NODE a link check procedure between END NODE and MASTER.
uint8_t lr3_chk_sum | ( | lr3_message_t * | cmd | ) |
Check sum function.
ctx | Click object. |
cmd | Command structure. |
@description This function returns sum of all elements in Command structure.
uint8_t lr3_command | ( | lr3_t * | ctx, |
lr3_message_t * | msg, | ||
lr3_message_t * | rsp ) |
Command function.
ctx | Click object. |
msg | Pointer to command witch be sent |
rsp | Pointer to output where response be placed |
@description Function executes commands and reads response on executed commands. Also checks CRC error report.
LR3_RETVAL lr3_delete_all_network_table | ( | lr3_t * | ctx | ) |
Delete All Network Table function.
ctx | Click object. |
@description Function deletes whole Network Table.
LR3_RETVAL lr3_delete_network_table_row | ( | lr3_t * | ctx, |
uint8_t * | device_id ) |
Delete Network Table Row function.
ctx | Click object. |
device_id | Pointer to buffer where device ID is placed |
@description Function deletes a Network Table row from module Serial Number.
LR3_RETVAL lr3_enable_pairing | ( | lr3_t * | ctx, |
uint8_t | state ) |
Enable Pairing function.
ctx | Click object. |
state | state = 0 - disable pairing procedure state != 0 - enable pairing procedure |
@description Function enables or disables network the pairing procedure.
LR3_RETVAL lr3_factory_reset | ( | lr3_t * | ctx | ) |
Factory reset function.
ctx | Click object. |
@description Function performs the recovery of EEPROM default values.
int32_t lr3_generic_read | ( | lr3_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
Generic read function.
ctx | Click object. |
data_buf | Data buffer for read data. |
max_len | The maximum length of data that can be read. |
@description This function read maximum length of data.
void lr3_generic_write | ( | lr3_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
Generic write function.
lr3 | Click object. |
data_buf | Data buffer for sends. |
len | Number of bytes for sends. |
LR3_RETVAL lr3_get_activation_status | ( | lr3_t * | ctx, |
uint8_t * | data_out ) |
Get Activation Status function.
ctx | Click object. |
data_out | Pointer to buffer where MASTER Serial Number (4 bytes) be placed |
@description Function gets the module activation status.
LR3_RETVAL lr3_get_fw_version | ( | lr3_t * | ctx, |
uint32_t * | fw_version ) |
Get FW Version function.
ctx | Click object. |
fw_version | Pointer to buffer where FW Version be stored |
@description Function gets 32-bit FW version.
LR3_RETVAL lr3_get_network_table_row | ( | lr3_t * | ctx, |
uint8_t | index, | ||
uint8_t * | data_out ) |
Get Network Table Row function.
ctx | Click object. |
index | index of Network Table row and must be between 0 to Table size - 1 |
data_out | Pointer to buffer where Network Table row data be stored |
@description Function gets a Network Table row from index. The first 4 bytes is device ID and the fifth byte is the byte received at pairing phase.
LR3_RETVAL lr3_get_network_table_size | ( | lr3_t * | ctx | ) |
Get Network Table Size function.
ctx | Click object. |
@description Function gets from MASTER module the size of Network Table.
LR3_RETVAL lr3_get_pairing_request | ( | lr3_t * | ctx | ) |
Get Pairing Request function.
ctx | Click object. |
@description Function requests a pairing to a network.
LR3_RETVAL lr3_get_serial_no | ( | lr3_t * | ctx, |
uint32_t * | serial_no ) |
Get Serial Number function.
ctx | Click object. |
serial_no | Pointer to buffer where Serial Number be stored |
@description Function gets 32-bit Serial Number.
void lr3_hard_reset | ( | lr3_t * | ctx | ) |
Hardware reset function.
ctx | Click object. |
@description Resets device by setting pin and after that puts device back in normal operation mode.
LR3_RETVAL lr3_init | ( | lr3_t * | ctx, |
lr3_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
LR3_RETVAL lr3_read_eeprom | ( | lr3_t * | ctx, |
uint8_t | address, | ||
uint8_t | n_bytes, | ||
uint8_t * | data_out ) |
EEPROM read function.
ctx | Click object. |
address | EEPROM Address witch from data be read |
n_bytes | Number of bytes witch be read (max 254) |
data_out | Pointer to buffer where data be stored |
@description Function reads data from EEPROM.
uint8_t lr3_read_message_process | ( | lr3_t * | ctx | ) |
Process function.
ctx | Click object. |
@description Function executes reading indications and forwards indications to handler.
LR3_RETVAL lr3_set_app_key | ( | lr3_t * | ctx, |
uint8_t * | app_key ) |
Set App Key function.
ctx | Click object. |
app_key | Pointer to buffer witch from 16 byte AppKey data be written |
@description Function performs an EEPROM data write 16 byte AppKey data in Little Endian Order, needed for Application encryption customization.
void lr3_set_ind_handler | ( | lr3_t * | ctx, |
lr3_ind_hdl_t | hdl ) |
Set indication handler function.
ctx | Click object. |
hdl | Pointer to void handler function |
@description Function reads indications (response) to determined command.
LR3_RETVAL lr3_soft_reset | ( | lr3_t * | ctx | ) |
Software reset function.
ctx | Click object. |
@description Function resets module by sending command.
LR3_RETVAL lr3_tx_message | ( | lr3_t * | ctx, |
lr3_tx_msg_t * | tx_msg ) |
Radio frame Transmission function.
ctx | Click object. |
tx_msg | Structure arguments: - data_in Pointer to buffer witch from data be sent - n_bytes Number of bytes witch be sent (max 253) - destination_id Destination device Serial Number (4 bytes) - option 0bxxxxxxx0 - Unconfirmed Data Transmission 0bxxxxxxx1 - Confirmed Data Transmission |
@description Function performs the transmission of radio frames.
void lr3_wake_up | ( | lr3_t * | ctx, |
uint8_t | state ) |
Wake Up function.
ctx | Click object. |
state | 0 - wake up, 1 - shutdown |
@description Puts device in shutdown mode or wake up device depending on state.
LR3_RETVAL lr3_write_eeprom | ( | lr3_t * | ctx, |
uint8_t | address, | ||
uint8_t | n_bytes, | ||
uint8_t * | data_in ) |
EEPROM write function.
ctx | Click object. |
address | EEPROM Address where data be written |
n_bytes | Number of bytes witch be written (max 254) |
data_in | Pointer to buffer witch from data be written |
@description Function writes data to EEPROM.