|
Zephyr API Documentation 4.5.0-rc1
A Scalable Open Source RTOS
|
Main header file for LoRa driver API. More...
Go to the source code of this file.
Data Structures | |
| struct | lora_modem_config_gfsk |
| Structure containing the configuration of a GFSK modem. More... | |
| struct | lora_modem_config |
| Structure containing the configuration of a LoRa modem. More... | |
| struct | lora_driver_api |
| Driver Operations LoRa driver operations More... | |
Macros | |
| #define | LORA_GFSK_SYNC_WORD_MAX 8 |
| Longest sync word the GFSK modem will match on, in bytes. | |
| #define | LORA_GFSK_PREAMBLE_MAX (UINT16_MAX / BITS_PER_BYTE) |
| Longest preamble the GFSK modem will transmit, in bytes. | |
Typedefs | |
| typedef void(* | lora_recv_cb) (const struct device *dev, uint8_t *data, uint16_t size, int16_t rssi, int8_t snr, void *user_data) |
| Callback API for receiving data asynchronously. | |
| typedef void(* | lora_cad_cb) (const struct device *dev, bool activity_detected, void *user_data) |
| Callback API for channel activity detection asynchronously. | |
| typedef int(* | lora_api_config) (const struct device *dev, const struct lora_modem_config *config) |
| Callback API for configuring the LoRa module. | |
| typedef int(* | lora_api_config_gfsk) (const struct device *dev, const struct lora_modem_config_gfsk *config) |
| Callback API for configuring the GFSK modem. | |
| typedef uint32_t(* | lora_api_airtime) (const struct device *dev, uint32_t data_len) |
| Callback API for querying packet airtime. | |
| typedef int(* | lora_api_send) (const struct device *dev, uint8_t *data, uint32_t data_len) |
| Callback API for sending data over LoRa. | |
| typedef int(* | lora_api_send_async) (const struct device *dev, uint8_t *data, uint32_t data_len, struct k_poll_signal *async) |
| Callback API for sending data asynchronously over LoRa. | |
| typedef int(* | lora_api_recv) (const struct device *dev, uint8_t *data, uint8_t size, k_timeout_t timeout, int16_t *rssi, int8_t *snr) |
| Callback API for receiving data over LoRa. | |
| typedef int(* | lora_api_recv_async) (const struct device *dev, lora_recv_cb cb, void *user_data) |
| Callback API for receiving data asynchronously over LoRa. | |
| typedef int(* | lora_api_cad) (const struct device *dev, k_timeout_t timeout) |
| Callback API for channel activity detection. | |
| typedef int(* | lora_api_cad_async) (const struct device *dev, lora_cad_cb cb, void *user_data) |
| Callback API for channel activity detection asynchronously. | |
| typedef int(* | lora_api_rssi) (const struct device *dev, int16_t *rssi) |
| Callback API for reading the instantaneous RSSI. | |
| typedef int(* | lora_api_recv_duty_cycle) (const struct device *dev, k_timeout_t rx_period, k_timeout_t sleep_period, uint8_t *data, uint8_t size, k_timeout_t timeout, int16_t *rssi, int8_t *snr) |
| Callback API for blocking receive with duty cycling. | |
| typedef int(* | lora_api_recv_duty_cycle_async) (const struct device *dev, k_timeout_t rx_period, k_timeout_t sleep_period, lora_recv_cb cb, void *user_data) |
| Callback API for receive duty cycling (wake-on-radio). | |
| typedef int(* | lora_api_test_cw) (const struct device *dev, uint32_t frequency, int8_t tx_power, uint16_t duration) |
| Callback API for transmitting a continuous wave. | |
Functions | |
| static int | lora_config (const struct device *dev, const struct lora_modem_config *config) |
| Configure the LoRa modem. | |
| static int | lora_config_gfsk (const struct device *dev, const struct lora_modem_config_gfsk *config) |
| Configure the GFSK modem. | |
| static uint32_t | lora_airtime (const struct device *dev, uint32_t data_len) |
| Query the airtime of a packet with a given length. | |
| static int | lora_send (const struct device *dev, uint8_t *data, uint32_t data_len) |
| Send data over LoRa. | |
| static int | lora_send_async (const struct device *dev, uint8_t *data, uint32_t data_len, struct k_poll_signal *async) |
| Asynchronously send data over LoRa. | |
| static int | lora_recv (const struct device *dev, uint8_t *data, uint8_t size, k_timeout_t timeout, int16_t *rssi, int8_t *snr) |
| Receive data over LoRa. | |
| static int | lora_recv_async (const struct device *dev, lora_recv_cb cb, void *user_data) |
| Receive data asynchronously over LoRa. | |
| static int | lora_cad (const struct device *dev, k_timeout_t timeout) |
| Perform Channel Activity Detection. | |
| static int | lora_cad_async (const struct device *dev, lora_cad_cb cb, void *user_data) |
| Perform Channel Activity Detection asynchronously. | |
| static int | lora_rssi (const struct device *dev, int16_t *rssi) |
| Read the instantaneous RSSI of the current channel. | |
| int | lora_energy_detect (const struct device *dev, int16_t rssi_threshold, k_timeout_t duration) |
| Perform energy-detection carrier sense. | |
| static int | lora_recv_duty_cycle (const struct device *dev, k_timeout_t rx_period, k_timeout_t sleep_period, uint8_t *data, uint8_t size, k_timeout_t timeout, int16_t *rssi, int8_t *snr) |
| Receive data using duty cycling (wake-on-radio). | |
| static int | lora_recv_duty_cycle_async (const struct device *dev, k_timeout_t rx_period, k_timeout_t sleep_period, lora_recv_cb cb, void *user_data) |
| Start receive duty cycling (wake-on-radio). | |
| static int | lora_test_cw (const struct device *dev, uint32_t frequency, int8_t tx_power, uint16_t duration) |
| Transmit an unmodulated continuous wave at a given frequency. | |
Main header file for LoRa driver API.