rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
link_artxfer.h
Go to the documentation of this file.
1
21
22#ifndef RCBENCH_LINK_ARTXFER_H
23#define RCBENCH_LINK_ARTXFER_H
24
25#include <stdbool.h>
26#include <stdint.h>
27
28#include "link_pages.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
35typedef struct {
36 uint16_t blocks;
37 uint16_t width;
38 uint16_t height;
39 uint16_t format;
40 uint16_t crc;
41 uint32_t hash;
42 uint32_t bytes;
44
48typedef struct {
49 link_art_meta_t meta;
50 uint8_t *buf;
51 uint32_t cap;
52 uint32_t at;
53 uint16_t next;
54 bool begun;
56
71bool link_artxfer_meta_ok(const uint16_t *meta, link_art_meta_t *out);
72
85bool link_artxfer_begin(link_artxfer_t *x, const uint16_t *meta,
86 uint8_t *buf, uint32_t cap);
87
96uint16_t link_artxfer_next(const link_artxfer_t *x);
97
110bool link_artxfer_take(link_artxfer_t *x, const uint16_t *data);
111
121
134
135/* --------------------------------------------- the IOmcu's side */
136
152void link_artserve_meta(uint16_t *regs, uint16_t format, uint16_t width,
153 uint16_t height, uint32_t bytes, uint16_t crc,
154 uint32_t hash);
155
167void link_artserve_block(uint16_t *regs, const uint8_t *payload,
168 uint32_t bytes, uint16_t block);
169
170#ifdef __cplusplus
171}
172#endif
173
174#endif /* RCBENCH_LINK_ARTXFER_H */