Internal driver definitions for the RN2483/RN2903 LoRa modules.
More...
Internal driver definitions for the RN2483/RN2903 LoRa modules.
- Author
- Alexandre Abadie alexa.nosp@m.ndre.nosp@m..abad.nosp@m.ie@i.nosp@m.nria..nosp@m.fr
Definition in file rn2xx3_internal.h.
#include <stdint.h>
#include "rn2xx3.h"
Go to the source code of this file.
◆ rn2xx3_cmd_append()
void rn2xx3_cmd_append |
( |
rn2xx3_t * |
dev, |
|
|
const uint8_t * |
data, |
|
|
uint8_t |
data_len |
|
) |
| |
Appends data to a command.
- Parameters
-
[in] | dev | The device descriptor |
[in] | data | The data buffer |
[in] | data_len | The data max length |
◆ rn2xx3_cmd_finalize()
int rn2xx3_cmd_finalize |
( |
rn2xx3_t * |
dev | ) |
|
Finalize a command.
- Parameters
-
[in] | dev | The device descriptor |
- Returns
- RN2XX3_OK if the command succeeded
-
RN2XX3_ERR_* otherwise
◆ rn2xx3_cmd_start()
Starts writing a command with the content of the device command buffer.
- Parameters
-
[in] | dev | The device descriptor |
◆ rn2xx3_hex_to_bytes()
void rn2xx3_hex_to_bytes |
( |
const char * |
hex, |
|
|
uint8_t * |
byte_array |
|
) |
| |
Convert a string of hex to an array of bytes.
This functions is faster than fmt_hex_bytes
that doesn't work if it is used in the module UART interrupt callback.
- Parameters
-
[in] | hex | The string of hex to convert |
[out] | byte_array | The resulting array of bytes |
◆ rn2xx3_mac_tx_finalize()
int rn2xx3_mac_tx_finalize |
( |
rn2xx3_t * |
dev | ) |
|
Finalize the TX command.
- Parameters
-
[in] | dev | The device descriptor |
- Returns
- RN2XX3_OK if the command succeeded
-
RN2XX3_REPLY_* otherwise
◆ rn2xx3_mac_tx_start()
void rn2xx3_mac_tx_start |
( |
rn2xx3_t * |
dev | ) |
|
Starts writing a tx command.
- Parameters
-
[in] | dev | The device descriptor |
◆ rn2xx3_process_reply()
int rn2xx3_process_reply |
( |
rn2xx3_t * |
dev | ) |
|
Process a command network reply.
- Parameters
-
[in] | dev | The device descriptor |
- Returns
- RN2XX3_OK if the command succeeded
-
RN2XX3_REPLY_* otherwise
◆ rn2xx3_process_response()
int rn2xx3_process_response |
( |
rn2xx3_t * |
dev | ) |
|
Process a command immediate response.
- Parameters
-
[in] | dev | The device descriptor |
- Returns
- RN2XX3_OK if the command succeeded
-
RN2XX3_ERR_* otherwise
◆ rn2xx3_set_internal_state()
void rn2xx3_set_internal_state |
( |
rn2xx3_t * |
dev, |
|
|
uint8_t |
state |
|
) |
| |
Sets internal device state.
- Parameters
-
[in] | dev | The device descriptor |
[in] | state | The desired state |