lriot 2.1.0.0
|
API for configuring and manipulating LR IoT Click driver. More...
Topics | |
LR IoT Registers Settings | |
Settings for registers of LR IoT Click driver. | |
LR IoT MikroBUS Map | |
MikroBUS pin mapping of LR IoT Click driver. | |
Functions | |
void | lriot_cfg_setup (lriot_cfg_t *cfg) |
LR IoT configuration object setup function. | |
err_t | lriot_init (lriot_t *ctx, lriot_cfg_t *cfg) |
LR IoT initialization function. | |
err_t | lriot_default_cfg (lriot_t *ctx) |
LR IoT default configuration function. | |
void | lriot_set_rst_pin (lriot_t *ctx, uint8_t state) |
LR IoT set rst pin function. | |
uint8_t | lriot_get_busy_pin (lriot_t *ctx) |
LR IoT get busy pin function. | |
uint8_t | lriot_get_int_pin (lriot_t *ctx) |
LR IoT get int pin function. | |
err_t | lriot_get_chip_info (lriot_t *ctx, lriot_chip_info_t *info) |
LR IoT get chip info function. | |
err_t | lriot_get_temperature (lriot_t *ctx, float *temperature) |
LR IoT get temperature function. | |
err_t | lriot_send_lora_message (lriot_t *ctx, uint8_t *message) |
LR IoT send lora message function. | |
err_t | lriot_read_lora_message (lriot_t *ctx, lriot_lora_packet_status_t *pkt_status, uint8_t *message) |
LR IoT read lora message function. | |
err_t | lriot_get_wifi_scan_results (lriot_t *ctx, lriot_wifi_scan_results_t *results) |
LR IoT get wifi scan results function. | |
err_t | lriot_get_gnss_scan_results (lriot_t *ctx, lriot_gnss_scan_results_t *results) |
LR IoT get gnss scan results function. | |
err_t | lriot_update_firmware (lriot_t *ctx) |
LR IoT update firmware function. | |
API for configuring and manipulating LR IoT Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void lriot_cfg_setup | ( | lriot_cfg_t * | cfg | ) |
LR IoT configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See lriot_cfg_t object definition for detailed explanation. |
err_t lriot_default_cfg | ( | lriot_t * | ctx | ) |
LR IoT default configuration function.
This function executes a default configuration of LR IoT click board.
[in] | ctx | : Click context object. See lriot_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t lriot_get_busy_pin | ( | lriot_t * | ctx | ) |
LR IoT get busy pin function.
This function returns the BUSY pin logic state.
[in] | ctx | : Click context object. See lriot_t object definition for detailed explanation. |
err_t lriot_get_chip_info | ( | lriot_t * | ctx, |
lriot_chip_info_t * | info ) |
LR IoT get chip info function.
This function reads the chip firmware information.
[in] | ctx | : Click context object. See lriot_t object definition for detailed explanation. |
[out] | info | : Chip information object. See lriot_chip_info_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t lriot_get_gnss_scan_results | ( | lriot_t * | ctx, |
lriot_gnss_scan_results_t * | results ) |
LR IoT get gnss scan results function.
This function performs a GNSS scanning and reads the results.
[in] | ctx | : Click context object. See lriot_t object definition for detailed explanation. |
[out] | results | : GNSS scan results object. See lriot_gnss_scan_results_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t lriot_get_int_pin | ( | lriot_t * | ctx | ) |
LR IoT get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See lriot_t object definition for detailed explanation. |
err_t lriot_get_temperature | ( | lriot_t * | ctx, |
float * | temperature ) |
LR IoT get temperature function.
This function reads the chip internal temperature in degrees Celsius.
[in] | ctx | : Click context object. See lriot_t object definition for detailed explanation. |
[out] | temperature | : Chip internal temperature in degrees Celsius. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t lriot_get_wifi_scan_results | ( | lriot_t * | ctx, |
lriot_wifi_scan_results_t * | results ) |
LR IoT get wifi scan results function.
This function performs a WiFi scanning and reads the results.
[in] | ctx | : Click context object. See lriot_t object definition for detailed explanation. |
[out] | results | : WiFi scan results object. See lriot_wifi_scan_results_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t lriot_init | ( | lriot_t * | ctx, |
lriot_cfg_t * | cfg ) |
LR IoT initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See lriot_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See lriot_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t lriot_read_lora_message | ( | lriot_t * | ctx, |
lriot_lora_packet_status_t * | pkt_status, | ||
uint8_t * | message ) |
LR IoT read lora message function.
This function waits for a LoRa packet to arrive and reads its payload message and packet status.
[in] | ctx | : Click context object. See lriot_t object definition for detailed explanation. |
[out] | pkt_status | : A received LoRa packet status. See lriot_lora_packet_status_t object definition for detailed explanation. |
[out] | message | : A received LoRa message buffer. Limited to LRIOT_LORA_PKT_PAYLOAD_LEN size in bytes. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t lriot_send_lora_message | ( | lriot_t * | ctx, |
uint8_t * | message ) |
LR IoT send lora message function.
This function sends a LoRa message to the receiver.
[in] | ctx | : Click context object. See lriot_t object definition for detailed explanation. |
[in] | message | : A message buffer to send. Should be of LRIOT_LORA_PKT_PAYLOAD_LEN size in bytes. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void lriot_set_rst_pin | ( | lriot_t * | ctx, |
uint8_t | state ) |
LR IoT set rst pin function.
This function sets the RST pin logic state.
[in] | ctx | : Click context object. See lriot_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t lriot_update_firmware | ( | lriot_t * | ctx | ) |
LR IoT update firmware function.
This function performs a firmware update depending on the LRIOT_UPDATE_FIRMWARE and LRIOT_FIRMWARE_SELECTOR macro definitions.
[in] | ctx | : Click context object. See lriot_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.