1 /*
2    Copyright (c) 2021 Fraunhofer AISEC. See the COPYRIGHT
3    file at the top-level directory of this distribution.
4 
5    Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6    http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7    <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8    option. This file may not be copied, modified, or distributed
9    except according to those terms.
10 */
11 #ifndef EDHOC_TXRX_WRAPPER_H
12 #define EDHOC_TXRX_WRAPPER_H
13 
14 #include "common/byte_array.h"
15 
16 /**
17  * @brief   The user should call inside this function its send function.
18  * @param   data pointer to the data to be send
19  * @param   data_len length of the data
20  */
21 extern enum err tx(uint8_t *data, uint32_t data_len);
22 
23 /**
24  * @brief   The user should call inside this function its receive function.
25  *          The length of the buffer pointed by data can be checked before
26  *          copying data into it by using *data_len. After copying the length
27  *          of the received data should be written in data_len.
28  * @param   data pointer to a buffer where the edhoc message must be copied in
29  * @param   data_len length of the received data
30  */
31 extern enum err rx(uint8_t *data, uint32_t *data_len);
32 
33 #endif
34