rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
hitec_prog_int.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <stdbool.h>
18
19#include "hitec_prog.h"
20
22enum {
23 ST_IDLE = 0,
30};
31
33enum { OP_NONE = 0, OP_ENTER, OP_READ, OP_LEAVE, OP_WRITE };
34
35/* --- hitec_prog.c --------------------------------------------------------- */
36
47 unsigned arg, unsigned reg);
48
58
66
72void hpg_pump(hitec_prog_t *p);
73
74/* --- hitec_prog_write.c --------------------------------------------------- */
75
83
89void hpw_off(hitec_prog_t *p);
90
99void hpw_read_done(hitec_prog_t *p, bool had, const hitec_image_t *was);
100
108
115void hpw_tick(hitec_prog_t *p);
116
123bool hpw_abort(hitec_prog_t *p);
hitec_prog_msg_id_t hpg_held_idle(const hitec_prog_t *p, bool safe)
Whether an operation of the held port may start now.
Definition hitec_prog.c:829
hitec_prog_msg_id_t hpg_say2(hitec_prog_t *p, hitec_prog_msg_id_t id, unsigned arg, unsigned reg)
Say message id.
Definition hitec_prog.c:100
void hpg_pump(hitec_prog_t *p)
The session's next step goes out, or its operation's end is taken.
Definition hitec_prog.c:662
void hpg_ses_say(hitec_prog_t *p, hitec_ses_t r)
The message of a session operation that did not end well.
Definition hitec_prog.c:377
The programmer for servos by Hitec as the SERVO screen runs it: the session with one servo,...
hitec_prog_msg_id_t
What the screen says.
Definition hitec_prog.h:146
void hpw_read_done(hitec_prog_t *p, bool had, const hitec_image_t *was)
A full read ended well: the draft is the servo again, the switch goes off when the servo changed,...
Definition hitec_prog_write.c:925
void hpw_off(hitec_prog_t *p)
The write switch goes off: a LEAVE, a lost link, a stop.
Definition hitec_prog_write.c:919
void hpw_connect(hitec_prog_t *p)
A CONNECT starts: the switch off, the edits and the confirmations gone; the record stays.
Definition hitec_prog_write.c:911
void hpw_tick(hitec_prog_t *p)
Every feed: a stop switches the switch off, and a write that waits for the card gives up after HITEC_...
Definition hitec_prog_write.c:946
void hpw_write_done(hitec_prog_t *p, hitec_ses_t r)
A write operation ended with r.
Definition hitec_prog_write.c:698
bool hpw_abort(hitec_prog_t *p)
ABORT of a write that waits for the card: nothing was written.
Definition hitec_prog_write.c:959
@ ST_RECORD
Definition hitec_prog_int.h:29
@ ST_RELEASING
Definition hitec_prog_int.h:28
@ ST_OPENING
Definition hitec_prog_int.h:24
@ ST_CLOSING
Definition hitec_prog_int.h:26
@ ST_CLEARING
Definition hitec_prog_int.h:27
@ ST_IDLE
Definition hitec_prog_int.h:23
@ ST_SES
Definition hitec_prog_int.h:25
hitec_ses_t
Result of an operation.
Definition hitec_session.h:145
The registers or cells of one servo, as read.
Definition hitec_reg.h:95
The programmer's state.
Definition hitec_prog.h:389