rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
servo_link.h
Go to the documentation of this file.
1
20
21#pragma once
22
23#include <stdbool.h>
24#include <stdint.h>
25
26#include "link_host.h"
27#include "link_port.h"
28#include "prog_link.h"
29#include "servo_cmd.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
37#define SERVO_HZ_UNKNOWN 0xFFFFu /* not known: perhaps a faster rate */
38
45
54typedef struct {
58 void *ctx;
60 bool (*armed)(void *ctx);
62 bool (*stopped)(void *ctx);
64 void (*alert)(void *ctx, servo_link_alert_t a);
66 void (*disarm)(void *ctx, bool link_up);
68 uint32_t (*stop_count)(void *ctx);
72 void (*arm_surfaces)(void *ctx);
74
83void servo_link_init(const servo_link_ctx_t *ctx);
84
95void servo_link_came_up(uint16_t minor);
96
99void servo_link_lost(void);
100
113void servo_link_binding(uint8_t channels, bool known);
114
121
128bool servo_link_binding_known(void);
129
135
149void servo_link_apply(const servo_cmd_t sv, bool link_up, uint32_t stops);
150
156void servo_link_let_go(void);
157
167void servo_link_service(bool link_up);
168
175bool servo_link_rate_settled(void);
176
187void servo_link_rate_reset_note(bool page, bool landed);
188
197void servo_link_prog_service(void);
198
204bool servo_link_release_owed(void);
205
212uint16_t servo_link_hz_sent(void);
213
222bool servo_link_take_release(void);
223
228void servo_link_ask_release(void);
229
237void servo_link_ask_hold(void);
238
244unsigned servo_link_rate_shown(void);
245
251bool servo_link_sweep_able(void);
252
258bool servo_link_surfaces(void);
259
266
273bool servo_link_take_hold_lost(uint16_t *pause_seq);
274
283bool servo_link_take_sweep_held(uint16_t *pause_seq, uint32_t *kept_ms);
284
293
295typedef struct {
296 uint16_t start_seq;
297 uint32_t start_ms;
299 uint32_t frozen_ms;
302
310
311#ifdef __cplusplus
312}
313#endif
A command of the SERVO screen as the panel's servo link takes it (servo_link.h), and what the link re...
servo_sweep_from_t
Where the IOmcu's output was when it started a sweep.
Definition servo_cmd.h:214
A command of the SERVO screen, as the servo link takes it.
Definition servo_cmd.h:58