rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
link_port_t Struct Reference

How a request reaches the far end and its answer comes back. More...

#include <link_port.h>

Data Fields

bool(*) exchange (void *ctx, link_host_t *h, const link_msg_t *req, link_msg_t *reply)
uint32_t(*) now_ms (void *ctx)
void * ctx
void(*) between (void *ctx)

Detailed Description

How a request reaches the far end and its answer comes back.

exchange carries one request built by link_host_read() or link_host_write() and returns true with the answer in reply, a refusal included, or false when it ended unanswered. It leaves no request outstanding on h either way. now_ms is the millisecond clock the requests are stamped with.

between, when not NULL, is called after each acknowledged frame of a write that has another frame to send. A write of 32 registers is 8 exchanges back to back, and an exchange answered at once returns without the caller's other work having run: the panel runs its safety loop here. It is not called for a write of one frame, after the last frame, or after a refusal.


The documentation for this struct was generated from the following file: