62#define KST_LINE_GRACE_US 1000u
kst_line_err_t kst_line_open(kst_line_t *line, unsigned pin)
Claim the resources and take pin: from the return on the pad drives low.
Definition kst_line.c:85
uint32_t kst_line_now_us(void *ctx)
Read the microsecond clock; the third of the three driver functions.
Definition kst_line.c:269
bool kst_line_busy(const kst_line_t *line)
A transaction runs: between a start() that returned true and the poll() that returns true.
Definition kst_line.c:182
uint32_t kst_line_half_cell_ns(const kst_line_t *line)
The transmit half-cell the system clock gives, in ns; 0 on a closed line.
Definition kst_line.c:187
kst_driver_t kst_line_driver(kst_line_t *line)
The driver for a session on line.
Definition kst_line.c:275
void kst_line_init(kst_line_t *line)
Mark line closed.
Definition kst_line.c:75
void kst_line_close(kst_line_t *line)
Stop the state machine, give back what the open claimed and leave the pad an input with its pull-down...
Definition kst_line.c:149
bool kst_line_start(void *ctx, const kst_frame_t *frame, uint32_t window_ns)
The three functions of kst_driver_t; ctx is the kst_line_t.
Definition kst_line.c:192
bool kst_line_is_open(const kst_line_t *line)
Check whether a line is open.
Definition kst_line.c:177
bool kst_line_poll(void *ctx, kst_capture_t *out)
Poll a transaction; the second of the three driver functions.
Definition kst_line.c:228
kst_line_err_t
Error codes of the KST line driver.
Definition kst_line.h:65
@ KST_LINE_ERR_CLOCK
Definition kst_line.h:68
@ KST_LINE_ERR_PIO
Definition kst_line.h:69
@ KST_LINE_OK
Definition kst_line.h:66
@ KST_LINE_ERR_ARG
Definition kst_line.h:67
@ KST_LINE_ERR_DMA
Definition kst_line.h:70
The numbers and words a PIO pin driver for the KST wire works with.
#define KST_PIO_RX_WORDS
Stamps a transaction keeps: one for a line that is high at the start, KST_CAP_MAX_EDGES edges and one...
Definition kst_pio.h:96
#define KST_PIO_TX_WORDS
Words of the longest stream: 3 counts in front of 4 level words, 3 behind.
Definition kst_pio.h:91
KST servo programming protocol: the session with one servo.
The reply window as the driver saw it.
Definition kst_wire.h:230
The driver: the only way to the wire.
Definition kst_session.h:106
A master frame as line levels, one per half-cell.
Definition kst_wire.h:166
One line.
Definition kst_line.h:78
The counts a system clock gives.
Definition kst_pio.h:99
One transaction, as kst_pio_tx() laid it out.
Definition kst_pio.h:107