|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The seam between hitec_prog.c, the session's driving, and hitec_prog_write.c, the edits, writes and the record. More...
Go to the source code of this file.
Enumerations | |
| enum | { ST_IDLE = 0 , ST_OPENING , ST_SES , ST_CLOSING , ST_CLEARING , ST_RELEASING , ST_RECORD } |
| The request phases: what the model waits on the link for. More... | |
| enum | { OP_NONE = 0 , OP_ENTER , OP_READ , OP_LEAVE , OP_WRITE } |
| The session operations. | |
Functions | |
| hitec_prog_msg_id_t | hpg_say2 (hitec_prog_t *p, hitec_prog_msg_id_t id, unsigned arg, unsigned reg) |
Say message id. | |
| 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. | |
| void | hpg_ses_say (hitec_prog_t *p, hitec_ses_t r) |
| The message of a session operation that did not end well. | |
| void | hpg_pump (hitec_prog_t *p) |
| The session's next step goes out, or its operation's end is taken. | |
| void | hpw_connect (hitec_prog_t *p) |
| A CONNECT starts: the switch off, the edits and the confirmations gone; the record stays. | |
| void | hpw_off (hitec_prog_t *p) |
| The write switch goes off: a LEAVE, a lost link, a stop. | |
| 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, and a record stands against it. | |
| void | hpw_write_done (hitec_prog_t *p, hitec_ses_t r) |
A write operation ended with r. | |
| 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_PROG_CARD_MS. | |
| bool | hpw_abort (hitec_prog_t *p) |
| ABORT of a write that waits for the card: nothing was written. | |
The seam between hitec_prog.c, the session's driving, and hitec_prog_write.c, the edits, writes and the record.
Hitec is a name or trademark of its owner; it is used here only to say which servos this module works with.
The functions one file calls of the other are prefixed hpg_ (in hitec_prog.c) and hpw_ (in hitec_prog_write.c). Nothing outside the two files includes this header; the interface is hitec_prog.h.
SPDX-License-Identifier: MIT
| anonymous enum |
| 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.
| p | The programmer. |
| safe | true for one that sends frames: not with STOP latched, not armed, not on a STOPPED port. |
| void hpg_pump | ( | hitec_prog_t * | p | ) |
The session's next step goes out, or its operation's end is taken.
| p | The programmer. |
| hitec_prog_msg_id_t hpg_say2 | ( | hitec_prog_t * | p, |
| hitec_prog_msg_id_t | id, | ||
| unsigned | arg, | ||
| unsigned | reg ) |
Say message id.
| p | The programmer. |
| id | hitec_prog_msg_id_t. |
| arg | Its argument. |
| reg | Its second argument. |
id. | void hpg_ses_say | ( | hitec_prog_t * | p, |
| hitec_ses_t | r ) |
The message of a session operation that did not end well.
| p | The programmer. |
| r | Its result. |
| bool hpw_abort | ( | hitec_prog_t * | p | ) |
ABORT of a write that waits for the card: nothing was written.
| p | The programmer. |
| void hpw_connect | ( | hitec_prog_t * | p | ) |
A CONNECT starts: the switch off, the edits and the confirmations gone; the record stays.
| p | The programmer. |
| void hpw_off | ( | hitec_prog_t * | p | ) |
The write switch goes off: a LEAVE, a lost link, a stop.
| p | The programmer. |
| 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, and a record stands against it.
| p | The programmer. |
| had | A servo was read before. |
| was | What that read found; NULL with none. |
| 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_PROG_CARD_MS.
| p | The programmer. |
| void hpw_write_done | ( | hitec_prog_t * | p, |
| hitec_ses_t | r ) |
A write operation ended with r.
| p | The programmer. |
| r | Its result. |