lr5 2.0.0.0
|
Functions | |
void | lr5_cfg_setup (lr5_cfg_t *cfg) |
Config Object Initialization function. | |
LR5_RETVAL | lr5_init (lr5_t *ctx, lr5_cfg_t *cfg) |
Initialization function. | |
int32_t | lr5_generic_read (lr5_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. | |
void | lr5_response_handler_set (lr5_t *ctx, void(*handler)(uint8_t *, uint8_t *, uint8_t *)) |
Set Handler function. | |
void | lr5_uart_isr (lr5_t *ctx) |
UART ISR function. | |
LR5_RETVAL | lr5_response_ready (lr5_t *ctx) |
Response Ready function. | |
LR5_RETVAL | lr5_task (lr5_t *ctx) |
Parser Task function. | |
void | lr5_hw_reset (lr5_t *ctx) |
HW Reset function. | |
LR5_RETVAL | lr5_data_indication (lr5_t *ctx) |
Data Indication function. | |
void | lr5_reset_cmd (lr5_t *ctx) |
SW Reset Command. | |
void | lr5_factory_reset_cmd (lr5_t *ctx) |
Factory Reset Command. | |
LR5_RETVAL | lr5_eeprom_write_cmd (lr5_t *ctx, uint8_t start_addr, uint8_t *data_in, uint8_t n_bytes) |
EEPROM Write Command. | |
LR5_RETVAL | lr5_eeprom_read_cmd (lr5_t *ctx, uint8_t start_addr, uint8_t n_bytes) |
EEPROM Read Command. | |
void | lr5_get_fw_version_cmd (lr5_t *ctx) |
Get FW Version Command. | |
void | lr5_get_serial_no_cmd (lr5_t *ctx) |
Get Mipot Serial Number Command. | |
void | lr5_get_dev_eui_cmd (lr5_t *ctx) |
Get DevEUI Command. | |
void | lr5_join_cmd (lr5_t *ctx, uint8_t mode) |
Join Network Command. | |
void | lr5_get_activation_status_cmd (lr5_t *ctx) |
Get Activation Status Command. | |
void | lr5_set_app_key_cmd (lr5_t *ctx, uint8_t *app_key) |
Set App Key Command. | |
void | lr5_set_app_session_key_cmd (lr5_t *ctx, uint8_t *app_s_key) |
Set App Session Key Command. | |
void | lr5_set_nwk_session_key_cmd (lr5_t *ctx, uint8_t *nwk_s_key) |
Set Nwk Session Key Command. | |
LR5_RETVAL | lr5_tx_msg_cmd (lr5_t *ctx, lr5_msg_t *msg) |
TX Message Command. | |
void | lr5_get_session_status_cmd (lr5_t *ctx) |
Get Session Status Command. | |
void | lr5_set_next_dr_cmd (lr5_t *ctx, uint8_t data_rate) |
Set Next TX Data Rate Command. | |
void | lr5_set_battery_level_cmd (lr5_t *ctx, uint8_t battery_level) |
Set Battery Level Command. | |
void | lr5_get_battery_level_cmd (lr5_t *ctx) |
Get Battery Level Command. | |
void | lr5_set_uplink_cnt_cmd (lr5_t *ctx, uint32_t uplink_cnt) |
Set Uplink Counter Command. | |
void | lr5_get_uplink_cnt_cmd (lr5_t *ctx) |
Get Uplink Counter Command. | |
void | lr5_set_downlink_cnt_cmd (lr5_t *ctx, uint32_t downlink_cnt) |
Set Downlink Counter Command. | |
void | lr5_get_downlink_cnt_cmd (lr5_t *ctx) |
Get Downlink Counter Command. | |
void | lr5_set_ch_mask_cmd (lr5_t *ctx, uint8_t *ch_mask) |
Set Channels Mask Command. | |
LR5_RETVAL | lr5_get_ch_param_cmd (lr5_t *ctx, uint8_t ch_idx) |
Get Channel Parameters Command. | |
void lr5_cfg_setup | ( | lr5_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
LR5_RETVAL lr5_data_indication | ( | lr5_t * | ctx | ) |
Data Indication function.
ctx | Click object. |
@description This function returns 0 when received radio frame transfer from the module to the host is started, or returns 1 if is not started.
LR5_RETVAL lr5_eeprom_read_cmd | ( | lr5_t * | ctx, |
uint8_t | start_addr, | ||
uint8_t | n_bytes ) |
EEPROM Read Command.
ctx | Click object. |
start_addr | Address which from a data reading be started |
n_bytes | Number of bytes to be read |
@description This command performs an EEPROM data reading.
LR5_RETVAL lr5_eeprom_write_cmd | ( | lr5_t * | ctx, |
uint8_t | start_addr, | ||
uint8_t * | data_in, | ||
uint8_t | n_bytes ) |
EEPROM Write Command.
ctx | Click object. |
start_addr | Address which from a data writing be started |
data_in | Data to be written |
n_bytes | Number of bytes to be written |
@description This command performs an EEPROM data writing.
void lr5_factory_reset_cmd | ( | lr5_t * | ctx | ) |
Factory Reset Command.
ctx | Click object. |
@description This command performs an EEPROM recovery to default values.
int32_t lr5_generic_read | ( | lr5_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
Generic read function.
ctx | Click object. |
data_buf | Buffer to be read. |
max_len | Number of maximum bytes that can be read. |
@description This function reads buffer of data using uart_read function.
void lr5_get_activation_status_cmd | ( | lr5_t * | ctx | ) |
Get Activation Status Command.
ctx | Click object. |
@description This command allows user to get the module activation status.
void lr5_get_battery_level_cmd | ( | lr5_t * | ctx | ) |
Get Battery Level Command.
ctx | Click object. |
@description This command allows user to get the battery level value.
LR5_RETVAL lr5_get_ch_param_cmd | ( | lr5_t * | ctx, |
uint8_t | ch_idx ) |
Get Channel Parameters Command.
ctx | Click object. |
ch_idx | Channel index from 0 to 15 |
@description This command allows user to get the parameters for desired channel.
void lr5_get_dev_eui_cmd | ( | lr5_t * | ctx | ) |
Get DevEUI Command.
ctx | Click object. |
@description This command allows user to get DevEUI provided by Mipot.
void lr5_get_downlink_cnt_cmd | ( | lr5_t * | ctx | ) |
Get Downlink Counter Command.
ctx | Click object. |
@description This command allows user to get the downlink counter from RAM memory.
void lr5_get_fw_version_cmd | ( | lr5_t * | ctx | ) |
Get FW Version Command.
ctx | Click object. |
@description This command allows user to get the 32bit firmware version.
void lr5_get_serial_no_cmd | ( | lr5_t * | ctx | ) |
Get Mipot Serial Number Command.
ctx | Click object. |
@description This command allows user to get the 32bit Mipot serial number.
void lr5_get_session_status_cmd | ( | lr5_t * | ctx | ) |
Get Session Status Command.
ctx | Click object. |
@description This command allows user to get the module current status.
void lr5_get_uplink_cnt_cmd | ( | lr5_t * | ctx | ) |
Get Uplink Counter Command.
ctx | Click object. |
@description This command allows user to get the uplink counter from RAM memory.
void lr5_hw_reset | ( | lr5_t * | ctx | ) |
HW Reset function.
ctx | Click object. |
@description This function performs a HW reset and puts a device back to the normal mode by using RST pin.
LR5_RETVAL lr5_init | ( | lr5_t * | ctx, |
lr5_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.
void lr5_join_cmd | ( | lr5_t * | ctx, |
uint8_t | mode ) |
Join Network Command.
ctx | Click object. |
mode | 0 - ABP, 1 - OTAA |
@description This command performs a joining to the network.
void lr5_reset_cmd | ( | lr5_t * | ctx | ) |
SW Reset Command.
ctx | Click object. |
@description This command performs a SW reset of the module.
void lr5_response_handler_set | ( | lr5_t * | ctx, |
void(*)(uint8_t *, uint8_t *, uint8_t *) | handler ) |
Set Handler function.
ctx | Click object. |
handler | Pointer on the function that should be performed |
@description This function sets handler on the function that should be performed.
LR5_RETVAL lr5_response_ready | ( | lr5_t * | ctx | ) |
Response Ready function.
ctx | Click object. |
@description This function returns 1 if entire response from the module is received, or returns 0 if is not received. Also clears the response ready flag.
void lr5_set_app_key_cmd | ( | lr5_t * | ctx, |
uint8_t * | app_key ) |
Set App Key Command.
ctx | Click object. |
app_key | Data to be written |
@description This command performs the app key data writing to the EEPROM.
void lr5_set_app_session_key_cmd | ( | lr5_t * | ctx, |
uint8_t * | app_s_key ) |
Set App Session Key Command.
ctx | Click object. |
app_s_key | Data to be written |
@description This command performs the app session key data writing to the EEPROM.
void lr5_set_battery_level_cmd | ( | lr5_t * | ctx, |
uint8_t | battery_level ) |
Set Battery Level Command.
ctx | Click object. |
battery_level | 0 - The end-device is connected to an external power source 1...254 - The battery level 255 - The end-device was not able to measure battery level |
@description This command allows user to set the battery level.
void lr5_set_ch_mask_cmd | ( | lr5_t * | ctx, |
uint8_t * | ch_mask ) |
Set Channels Mask Command.
ctx | Click object. |
ch_mask | The 9 bytes mask for all channels between 0 and 71 The first byte is mask for channels between 0 and 7 The MSB of each byte is the lowest channel index |
@description This command allows user to set the channels mask to enable or disable a group of channels.
void lr5_set_downlink_cnt_cmd | ( | lr5_t * | ctx, |
uint32_t | downlink_cnt ) |
Set Downlink Counter Command.
ctx | Click object. |
downlink_cnt | The 32bit downlink counter |
@description This command allows user to set the downlink counter in RAM memory.
void lr5_set_next_dr_cmd | ( | lr5_t * | ctx, |
uint8_t | data_rate ) |
Set Next TX Data Rate Command.
ctx | Click object. |
data_rate | Data Rate selection, from 0 to 4 |
@description This command allows user to set next transmission data rate.
void lr5_set_nwk_session_key_cmd | ( | lr5_t * | ctx, |
uint8_t * | nwk_s_key ) |
Set Nwk Session Key Command.
ctx | Click object. |
nwk_s_key | Data to be written |
@description This command performs the nwk session key data writing to the EEPROM.
void lr5_set_uplink_cnt_cmd | ( | lr5_t * | ctx, |
uint32_t | uplink_cnt ) |
Set Uplink Counter Command.
ctx | Click object. |
uplink_cnt | The 32bit uplink counter |
@description This command allows user to set the uplink counter in RAM memory.
LR5_RETVAL lr5_task | ( | lr5_t * | ctx | ) |
Parser Task function.
ctx | Click object. |
@description This function makes a response from the MIPOT 32001409 module.
LR5_RETVAL lr5_tx_msg_cmd | ( | lr5_t * | ctx, |
lr5_msg_t * | msg ) |
TX Message Command.
ctx | Click object. |
msg | TX Message object. Msg structure arguments: - options 0 - Unreliable data transmission, 1 - Reliable data transmission - port Port number, from 1 to 223 - msg_data Data to transmit - msg_length The maximum allowed data length depends upon set data rate |
@description This command performs the transmission of radio frame.
void lr5_uart_isr | ( | lr5_t * | ctx | ) |
UART ISR function.
ctx | Click object. |
@description This function sets the flag when entire response packet is received using lr5_process function in main.