rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
hitec_rx_link.h
Go to the documentation of this file.
1
25#ifndef RCBENCH_HITEC_RX_LINK_H
26#define RCBENCH_HITEC_RX_LINK_H
27
28#include <stdbool.h>
29#include <stdint.h>
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
39#define HITEC_RX_LINK_ACK 0
40#define HITEC_RX_LINK_NO_ANSWER (-1)
41
43#define HITEC_RX_LINK_RETRY_MS 500u
44
67
71typedef struct {
72 uint32_t sent_ms;
73 uint8_t want;
74 uint8_t up;
75 uint8_t minor;
76 uint8_t owed;
77 uint8_t refused;
78 uint8_t waiting;
80
87
97void hitec_rx_link_want(hitec_rx_link_t *l, uint8_t mode);
98
105void hitec_rx_link_came_up(hitec_rx_link_t *l, uint16_t minor);
106
113
125bool hitec_rx_link_next(const hitec_rx_link_t *l, uint32_t now_ms,
126 uint16_t *value);
127
137void hitec_rx_link_done(hitec_rx_link_t *l, int result, uint32_t now_ms);
138
146
147#ifdef __cplusplus
148}
149#endif
150
151#endif /* RCBENCH_HITEC_RX_LINK_H */