12#ifndef RCBENCH_LINK_HOST_H
13#define RCBENCH_LINK_HOST_H
30#define LINK_HOST_TIMEOUT_MS 1000u
45 uint32_t last_reply_ms;
88 uint8_t count, uint32_t now_ms,
link_msg_t *out);
102 uint8_t count,
const uint16_t *regs, uint32_t now_ms,
bool link_host_read(link_host_t *h, uint8_t page, uint8_t offset, uint8_t count, uint32_t now_ms, link_msg_t *out)
Build a request.
Definition link_host.c:91
bool link_host_write(link_host_t *h, uint8_t page, uint8_t offset, uint8_t count, const uint16_t *regs, uint32_t now_ms, link_msg_t *out)
Build a write request.
Definition link_host.c:97
void link_host_init(link_host_t *h, uint32_t now_ms)
Set up the panel's link state.
Definition link_host.c:35
bool link_host_pending(const link_host_t *h)
Whether a request is outstanding.
Definition link_host.c:315
void link_host_abandon(link_host_t *h)
Give up on the outstanding request.
Definition link_host.c:320
bool link_host_accept(link_host_t *h, const link_msg_t *part, uint32_t now_ms, link_msg_t *whole)
Offer one received message against the outstanding request.
Definition link_host.c:138
bool link_host_tick(link_host_t *h, uint32_t now_ms)
Time out the outstanding request, and report the link down once.
Definition link_host.c:282
What crosses the link, independent of the transport: an op, a page, an offset, a count and up to a pa...
#define LINK_MAX_REGS
Registers in a page, and therefore in the largest transfer.
Definition link_msg.h:22
The page map: what the panel can ask the IOmcu for, and set.
The panel's state for one link: the outstanding request, the counters and the reassembly buffer.
Definition link_host.h:35
uint32_t acc_seen
Definition link_host.h:62
uint32_t timeouts
Definition link_host.h:52
uint32_t sent_ms
Definition link_host.h:44
uint32_t mismatches
Definition link_host.h:50
One link message: the op, the register window and its values.
Definition link_msg.h:55