rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Toggle main menu visibility
Loading...
Searching...
No Matches
link_port.h
Go to the documentation of this file.
1
23
#ifndef RCBENCH_LINK_PORT_H
24
#define RCBENCH_LINK_PORT_H
25
26
#include <stdbool.h>
27
#include <stdint.h>
28
29
#include "
link_host.h
"
30
#include "
link_msg.h
"
31
32
#ifdef __cplusplus
33
extern
"C"
{
34
#endif
35
52
typedef
struct
{
53
bool (*exchange)(
void
*ctx,
link_host_t
*h,
const
link_msg_t
*req,
54
link_msg_t
*reply);
55
uint32_t (*now_ms)(
void
*ctx);
56
void
*ctx;
57
void (*between)(
void
*ctx);
58
}
link_port_t
;
59
88
bool
link_write_acked
(
link_host_t
*h,
const
link_port_t
*port, uint8_t page,
89
uint8_t offset, uint8_t count,
const
uint16_t *regs,
90
link_msg_t
*reply);
91
105
bool
link_read_window
(
link_host_t
*h,
const
link_port_t
*port, uint8_t page,
106
uint8_t offset, uint8_t count,
link_msg_t
*reply);
107
108
#ifdef __cplusplus
109
}
110
#endif
111
112
#endif
/* RCBENCH_LINK_PORT_H */
link_host.h
The panel's half of the link: poll, match the reply to the question, and escalate when the answers st...
link_msg.h
What crosses the link, independent of the transport: an op, a page, an offset, a count and up to a pa...
link_write_acked
bool link_write_acked(link_host_t *h, const link_port_t *port, uint8_t page, uint8_t offset, uint8_t count, const uint16_t *regs, link_msg_t *reply)
Write count registers of page from offset, one frame of up to LINK_CAN_REGS_PER_FRAME registers per e...
Definition
link_port.c:31
link_read_window
bool link_read_window(link_host_t *h, const link_port_t *port, uint8_t page, uint8_t offset, uint8_t count, link_msg_t *reply)
Read count registers of page from offset in one exchange.
Definition
link_port.c:80
link_host_t
The panel's state for one link: the outstanding request, the counters and the reassembly buffer.
Definition
link_host.h:35
link_msg_t
One link message: the op, the register window and its values.
Definition
link_msg.h:55
link_port_t
How a request reaches the far end and its answer comes back.
Definition
link_port.h:52
shared
link
include
link_port.h
Generated by
1.18.0