rn2xx3_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Inria
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
21 #include <stdint.h>
22 
23 #include "rn2xx3.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
38 void rn2xx3_hex_to_bytes(const char *hex, uint8_t *byte_array);
39 
46 void rn2xx3_set_internal_state(rn2xx3_t *dev, uint8_t state);
47 
54 
62 void rn2xx3_cmd_append(rn2xx3_t *dev, const uint8_t *data, uint8_t data_len);
63 
73 
80 
90 
100 
110 
111 #ifdef __cplusplus
112 }
113 #endif
114 
High-level driver for the RN2483/RN2903 LoRa modules.
void rn2xx3_hex_to_bytes(const char *hex, uint8_t *byte_array)
Convert a string of hex to an array of bytes.
int rn2xx3_process_reply(rn2xx3_t *dev)
Process a command network reply.
void rn2xx3_cmd_start(rn2xx3_t *dev)
Starts writing a command with the content of the device command buffer.
int rn2xx3_cmd_finalize(rn2xx3_t *dev)
Finalize a command.
void rn2xx3_cmd_append(rn2xx3_t *dev, const uint8_t *data, uint8_t data_len)
Appends data to a command.
int rn2xx3_mac_tx_finalize(rn2xx3_t *dev)
Finalize the TX command.
void rn2xx3_set_internal_state(rn2xx3_t *dev, uint8_t state)
Sets internal device state.
int rn2xx3_process_response(rn2xx3_t *dev)
Process a command immediate response.
void rn2xx3_mac_tx_start(rn2xx3_t *dev)
Starts writing a tx command.
RN2483/RN2903 device descriptor.
Definition: rn2xx3.h:164