rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
link_drawing.h
Go to the documentation of this file.
1
18
19#ifndef RCBENCH_LINK_DRAWING_H
20#define RCBENCH_LINK_DRAWING_H
21
22#include <stdbool.h>
23#include <stdint.h>
24
25#include "link_pages.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
32typedef struct {
33 uint8_t pad;
34 uint8_t kind;
35 uint8_t value;
36 uint8_t flags;
37 uint16_t x;
38 uint16_t y;
40
42typedef struct {
43 uint8_t kind;
44 uint8_t param;
45 uint16_t colour;
46 uint16_t a,
47 b,
48 c,
49 d;
51
53typedef struct {
54 const uint8_t *data;
55 uint32_t bytes;
56 uint8_t pads;
57 uint16_t shapes;
58 uint16_t width;
59 uint16_t height;
60 uint16_t colour;
61 uint16_t ring;
62 uint8_t corner;
63 uint8_t ring_r;
64 uint8_t hole_r;
66
80bool link_drawing_parse(link_drawing_t *out, const uint8_t *data,
81 uint32_t bytes, const char **why);
82
91bool link_drawing_pad_at(const link_drawing_t *d, uint8_t i,
92 link_draw_pad_t *out);
93
104bool link_drawing_find_pad(const link_drawing_t *d, uint8_t pad,
105 link_draw_pad_t *out);
106
115bool link_drawing_shape_at(const link_drawing_t *d, uint16_t i,
116 link_draw_shape_t *out);
117
118#ifdef __cplusplus
119}
120#endif
121
122#endif /* RCBENCH_LINK_DRAWING_H */