-
Notifications
You must be signed in to change notification settings - Fork 2
/
ll_ifc_private.h
49 lines (40 loc) · 1.16 KB
/
ll_ifc_private.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef __LL_IFC_PRIVATE_H
#define __LL_IFC_PRIVATE_H
#include "ll_ifc_consts.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief
* Read/Write from the module. If the opcode does not have a payload
* associated with it, then buf_in and/or buf_out should be set to NULL
*
* @param[in] op
* opcode of the command being sent to the module
*
* @param[in] buf_in
* byte array containing the data payload to be sent to the module
*
* @param[in] in_len
* size of the output buffer in bytes
*
* @param[in] buf_out
* byte array for storing data returned from the module
*
* @param[in] out_len
* size of the output buffer in bytes
*
* @return
* positive number of bytes returned,
* negative if an error
* Error Values:
* LL_IFC_ERROR_INCORRECT_PARAMETER = Invalid values in one or more arguments
* other negative values defined by recv_packet()
*
*/
int32_t hal_read_write(opcode_t op, uint8_t buf_in[], uint16_t in_len, uint8_t buf_out[], uint16_t out_len);
int32_t hal_read_write_exact(opcode_t op, uint8_t buf_in[], uint16_t in_len, uint8_t buf_out[], uint16_t out_len);
#ifdef __cplusplus
}
#endif
#endif /* __LL_IFC_PRIVATE_H */