lriot 2.1.0.0
|
helper functions definition for LR1110 modem More...
#include <stdbool.h>
#include <stdint.h>
#include "modem/lr1110_modem_helper_types.h"
#include "modem/lr1110_modem_common.h"
#include "modem/lr1110_modem_lorawan.h"
#include "modem/lr1110_modem_gnss.h"
Go to the source code of this file.
Functions | |
err_t | lr1110_modem_helper_get_utc_time (lriot_t *ctx, uint32_t *time) |
Query the current UTC time. | |
err_t | lr1110_modem_helper_gnss_get_gnss_week_number_rollover (lriot_t *ctx, uint8_t *gnss_week_number_rollover) |
Compute the Gnss Week Number Rollover. | |
err_t | lr1110_modem_helper_gnss_get_almanac_date_by_index (lriot_t *ctx, uint8_t sv_id, uint32_t *date, uint8_t gnss_week_number_rollover) |
Read the almanac date by SV index. | |
err_t | lr1110_modem_helper_gnss_get_result_destination (uint8_t *result_buffer, uint16_t result_buffer_size, uint8_t *destination) |
Extract the destination from the result returned by a GNSS scan. | |
err_t | lr1110_modem_helper_gnss_get_event_type (uint8_t *result_buffer, uint16_t result_buffer_size, lr1110_modem_gnss_scan_done_event_t *event_type) |
Extract the event type from the result returned by a GNSS scan,. | |
err_t | lr1110_modem_helper_get_event_data (lriot_t *ctx, lr1110_modem_event_t *modem_event) |
Extract the event data contained in the event field buffer. | |
helper functions definition for LR1110 modem
Revised BSD License Copyright Semtech Corporation 2020. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
err_t lr1110_modem_helper_get_event_data | ( | lriot_t * | ctx, |
lr1110_modem_event_t * | modem_event ) |
Extract the event data contained in the event field buffer.
[in] | ctx | Chip implementation context |
[out] | modem_event | Struct containing the event data |
err_t lr1110_modem_helper_get_utc_time | ( | lriot_t * | ctx, |
uint32_t * | time ) |
Query the current UTC time.
[in] | ctx | Chip implementation context |
[out] | time | UTC Time in seconds |
err_t lr1110_modem_helper_gnss_get_almanac_date_by_index | ( | lriot_t * | ctx, |
uint8_t | sv_id, | ||
uint32_t * | date, | ||
uint8_t | gnss_week_number_rollover ) |
Read the almanac date by SV index.
[in] | ctx | Chip implementation context |
[in] | sv_id | Satellite ID |
[out] | date | Almanac date UTC format in second |
[in] | gnss_week_number_rollover | Number of GPS Week Number Rollover which is a phenomenon that happens every 1024 weeks |
err_t lr1110_modem_helper_gnss_get_event_type | ( | uint8_t * | result_buffer, |
uint16_t | result_buffer_size, | ||
lr1110_modem_gnss_scan_done_event_t * | event_type ) |
Extract the event type from the result returned by a GNSS scan,.
[in] | result_buffer | Pointer to the buffer holding the result |
[in] | result_buffer_size | Size of the result in byte |
[out] | event_type | Event type of the result |
err_t lr1110_modem_helper_gnss_get_gnss_week_number_rollover | ( | lriot_t * | ctx, |
uint8_t * | gnss_week_number_rollover ) |
Compute the Gnss Week Number Rollover.
[in] | ctx | Chip implementation context |
[out] | gnss_week_number_rollover | Number of GPS Week Number Rollover which is a phenomenon that happens every 1024 weeks |
err_t lr1110_modem_helper_gnss_get_result_destination | ( | uint8_t * | result_buffer, |
uint16_t | result_buffer_size, | ||
uint8_t * | destination ) |
Extract the destination from the result returned by a GNSS scan.
[in] | result_buffer | Pointer to the buffer holding the result |
[in] | result_buffer_size | Size of the result in byte |
[out] | destination | Destination of the result |