Internal driver definitions for the RN2483/RN2903 LoRa modules. More...

Detailed Description

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"
+ Include dependency graph for rn2xx3_internal.h:

Go to the source code of this file.

void rn2xx3_hex_to_bytes (const char *hex, uint8_t *byte_array)
 Convert a string of hex to an array of bytes. More...
 
void rn2xx3_set_internal_state (rn2xx3_t *dev, uint8_t state)
 Sets internal device state. More...
 
void rn2xx3_cmd_start (rn2xx3_t *dev)
 Starts writing a command with the content of the device command buffer. More...
 
void rn2xx3_cmd_append (rn2xx3_t *dev, const uint8_t *data, uint8_t data_len)
 Appends data to a command. More...
 
int rn2xx3_cmd_finalize (rn2xx3_t *dev)
 Finalize a command. More...
 
void rn2xx3_mac_tx_start (rn2xx3_t *dev)
 Starts writing a tx command. More...
 
int rn2xx3_mac_tx_finalize (rn2xx3_t *dev)
 Finalize the TX command. More...
 
int rn2xx3_process_response (rn2xx3_t *dev)
 Process a command immediate response. More...
 
int rn2xx3_process_reply (rn2xx3_t *dev)
 Process a command network reply. More...
 

Function Documentation

◆ 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]devThe device descriptor
[in]dataThe data buffer
[in]data_lenThe data max length

◆ rn2xx3_cmd_finalize()

int rn2xx3_cmd_finalize ( rn2xx3_t dev)

Finalize a command.

Parameters
[in]devThe device descriptor
Returns
RN2XX3_OK if the command succeeded
RN2XX3_ERR_* otherwise

◆ rn2xx3_cmd_start()

void rn2xx3_cmd_start ( rn2xx3_t dev)

Starts writing a command with the content of the device command buffer.

Parameters
[in]devThe 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]hexThe string of hex to convert
[out]byte_arrayThe resulting array of bytes

◆ rn2xx3_mac_tx_finalize()

int rn2xx3_mac_tx_finalize ( rn2xx3_t dev)

Finalize the TX command.

Parameters
[in]devThe 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]devThe device descriptor

◆ rn2xx3_process_reply()

int rn2xx3_process_reply ( rn2xx3_t dev)

Process a command network reply.

Parameters
[in]devThe 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]devThe 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]devThe device descriptor
[in]stateThe desired state