Unified LoRa transport interface.
More...
#include <lora.h>
|
| int(* | init )(const struct ares_lora_transport *transport, const void *config, lora_transport_handler_t evt_handler, void *context) |
| | Function for initializing the LoRa transport interface.
|
| int(* | uninit )(const struct ares_lora_transport *transport) |
| | Function for uninitializing the LoRa transport interface.
|
| int(* | enable )(const struct ares_lora_transport *transport, bool block_tx) |
| | Function for enabling transport in given TX mode.
|
| int(* | write )(const struct ares_lora_transport *transport, const void *data, size_t length, size_t *cnt) |
| | Function for writing data to the transfer interface.
|
| int(* | read )(const struct ares_lora_transport *transport, void *data, size_t length, size_t *cnt) |
| | Function for reading data from the transport interface.
|
| int(* | configure )(const struct ares_lora_transport *transport, const struct lora_modem_config *config) |
| | Function for reconfiguring the LoRa modem defined in the transport interface.
|
Unified LoRa transport interface.
◆ configure
| int(* ares_lora_transport_api::configure) (const struct ares_lora_transport *transport, const struct lora_modem_config *config) |
Function for reconfiguring the LoRa modem defined in the transport interface.
- Parameters
-
| [in] | transport | Pointer to the transfer instance. |
| [in] | config | Pointer to the new LoRa modem configurations. |
- Returns
- 0 on success.
-
negative error code otherwise.
◆ enable
| int(* ares_lora_transport_api::enable) (const struct ares_lora_transport *transport, bool block_tx) |
Function for enabling transport in given TX mode.
Function can be used to reconfigure TX to work in blocking mode.
- Parameters
-
| [in] | transport | Pointer to transfer instance. |
| [in] | block_tx | If true, the transport TX is enabled in blocking mode. |
- Returns
- 0 on success.
-
negative error code otherwise.
◆ init
Function for initializing the LoRa transport interface.
- Parameters
-
| [in] | transport | Pointer to the transfer instance. |
| [in] | config | Pointer to the instance configuration. |
| [in] | evt_handler | Event handler. |
| [in] | context | Pointer to the context passed to event handler. |
- Returns
- 0 on success.
-
negative error code otherwise.
◆ read
| int(* ares_lora_transport_api::read) (const struct ares_lora_transport *transport, void *data, size_t length, size_t *cnt) |
Function for reading data from the transport interface.
- Parameters
-
| [in] | transport | Pointer to the transfer instance. |
| [in] | data | Pointer to the destination buffer. |
| [in] | length | Destination buffer length. |
| [out] | cnt | Pointer to the received bytes counter. |
- Returns
- 0 on success.
-
negative error code otherwise.
◆ uninit
Function for uninitializing the LoRa transport interface.
- Parameters
-
| [in] | transport | Pointer to the transfer instance. |
- Returns
- 0 on success.
-
negative error code otherwise.
◆ write
| int(* ares_lora_transport_api::write) (const struct ares_lora_transport *transport, const void *data, size_t length, size_t *cnt) |
Function for writing data to the transfer interface.
- Parameters
-
| [in] | transport | Pointer to the transfer interface. |
| [in] | data | Pointer to the source buffer. |
| [in] | length | Source buffer length. |
| [out] | cnt | Pointer to the sent bytes counter. |
- Returns
- 0 on success.
-
negative error code otherwise.
The documentation for this struct was generated from the following file: