rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
link_msg.h
Go to the documentation of this file.
1
11
12#ifndef RCBENCH_LINK_MSG_H
13#define RCBENCH_LINK_MSG_H
14
15#include <stdint.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
22#define LINK_MAX_REGS 32
23
27typedef enum {
28 LINK_OP_READ = 0x01,
30 LINK_OP_DATA = 0x03,
31 LINK_OP_ACK = 0x04,
32 LINK_OP_NACK = 0x05,
33} link_op_t;
34
36typedef enum {
37 LINK_NACK_BAD_PAGE = 1,
39 LINK_NACK_READ_ONLY = 3,
40 LINK_NACK_BAD_VALUE = 4,
41 LINK_NACK_NOT_ARMED = 5,
51
55typedef struct {
56 uint8_t op;
57 uint8_t page;
58 uint8_t offset;
59 uint8_t count;
60 uint16_t regs[LINK_MAX_REGS];
62
63#ifdef __cplusplus
64}
65#endif
66
67#endif /* RCBENCH_LINK_MSG_H */