60 uint16_t
regs[LINK_SV_COUNT];
111 const uint16_t *in,
outputs_t *o, uint32_t now_ms);
240 uint16_t proto_minor,
bool refused);
The page map: what the panel can ask the IOmcu for, and set.
The intermediary every output goes through: one set of rules for arming, clamping,...
bool servo_page_target(servo_page_t *p, outputs_t *o, uint8_t first, uint8_t count)
Name the channels the sweep and the hold command: count channels of the bank from first,...
Definition servo_page.c:433
uint8_t servo_page_write(servo_page_t *p, uint8_t off, uint8_t n, const uint16_t *in, outputs_t *o, uint32_t now_ms)
A write to the page, validated whole against the bank o before any of it is stored.
Definition servo_page.c:196
void servo_page_read(servo_page_t *p, uint8_t off, uint8_t n, uint16_t *out)
The page as a read sees it: the sweep register 0 once the sweep has stopped, and the ends it reached ...
Definition servo_page.c:349
servo_resume_t
What a host writes to carry on a sweep it asked to be resumed.
Definition servo_page.h:204
@ SERVO_RESUME_REFUSED
Definition servo_page.h:209
@ SERVO_RESUME_WRITE
Definition servo_page.h:206
@ SERVO_RESUME_CURVE
Definition servo_page.h:205
@ SERVO_RESUME_TOO_OLD
Definition servo_page.h:207
@ SERVO_RESUME_UNTIMED
Definition servo_page.h:211
bool servo_page_step(servo_page_t *p, outputs_t *o, uint32_t now_ms)
One pass: stop a sweep the bank's surfaces are no longer armed for, one not written for OUT_DEFAULT_T...
Definition servo_page.c:363
uint16_t servo_page_hz(const servo_page_t *p)
The frame rate register: the target's rate, 0 for its own.
Definition servo_page.c:469
bool servo_phase_resumed(servo_phase_t *ph, uint32_t ack_ms, uint32_t *start_ms)
A held sweep resumed at ack_ms: its phase 0 moves on by the hold, into start_ms.
Definition servo_page.c:524
uint16_t servo_page_slots_hz(const servo_page_t *p)
The rate the slots take, for outputs_slot_rates() and the OUTPUTS and CHAN_CFG checks: the register w...
Definition servo_page.c:474
void servo_phase_stopped(servo_phase_t *ph)
The sweep stopped, or the far end restarted: nothing is held to resume.
Definition servo_page.c:502
void servo_page_ports(servo_page_t *p, uint16_t channels, uint16_t sliced)
The programming ports as a rate for a port target is judged, bit n for bank channel n: channels the p...
Definition servo_page.c:461
void servo_page_init(servo_page_t *p)
Set the page to its start: no sweep, no hold, the standard servo ports as target.
Definition servo_page.c:25
uint32_t servo_phase_held(servo_phase_t *ph, uint32_t ack_ms)
A running sweep held at ack_ms: its phase is kept; returned.
Definition servo_page.c:514
servo_resume_t servo_page_resume_plan(bool asked, bool held, bool timed, uint16_t proto_minor, bool refused)
The host's choice for a sweep command: asked a resume of the sweep held, held a hold at the far end,...
Definition servo_page.c:479
bool servo_phase_resumable(const servo_phase_t *ph)
Whether a hold of a running sweep stands to be resumed.
Definition servo_page.c:509
void servo_phase_started(servo_phase_t *ph, uint32_t ack_ms)
A sweep started, from its beginning, when acknowledged at ack_ms.
Definition servo_page.c:494
A servo swept through a curve: square, sine or triangle about its centre.
The state of a bank of channels and slots.
Definition outputs.h:143
The SERVO page state: its registers, the sweep, and the hold.
Definition servo_page.h:59
sweep_t sweep
Definition servo_page.h:61
uint16_t regs[LINK_SV_COUNT]
Definition servo_page.h:60
uint8_t target_first
Definition servo_page.h:65
bool finished
Definition servo_page.h:63
bool holding
Definition servo_page.h:64
uint32_t heard_ms
Definition servo_page.h:62
uint16_t sliced
Definition servo_page.h:68
uint8_t target_n
Definition servo_page.h:66
uint16_t ports
Definition servo_page.h:67
The far end's sweep phase as the host times it, from the acknowledgements of the writes that start,...
Definition servo_page.h:250
bool kept
Definition servo_page.h:253
uint32_t kept_ms
Definition servo_page.h:252
uint32_t start_ms
Definition servo_page.h:251
Definition servo_sweep.h:63