rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Toggle main menu visibility
Loading...
Searching...
No Matches
outputs_screen_int.h
Go to the documentation of this file.
1
9
#pragma once
10
11
#include <stdbool.h>
12
#include <stddef.h>
13
#include <stdint.h>
14
15
#include "
gfx.h
"
16
#include "
touch_types.h
"
17
#include "
ui_layout.h
"
18
28
#define OU_FONT_LABEL (&gfx_font_10x20)
29
#define OU_FONT_FINE (&gfx_font_8x16)
30
#define OU_FONT_PIN (&gfx_font_16x28)
31
#define OU_FONT_HEAD (&gfx_font_20x36)
32
#define OU_CELL 10
33
#define OU_LINE 22
34
39
#define OU_FOOT (UI_ALERT_Y - UI_BAND_H - 4)
40
51
#define COL_X 16
52
#define COL_W 300
53
#define COL_Y 16
54
55
#define DD_Y 44
56
#define DD_H 64
57
58
/* The entry's state laid out and dropped, as the screen's reset() does:
59
* no entry shown. */
60
void
outputs_port_reset(
void
);
61
62
/* No entry shown: a protocol was picked. A segment's press goes too. */
63
void
outputs_port_hide(
void
);
64
65
/* A segment's press under way is dropped: touch events went missing, or
66
* the screen is left. */
67
void
outputs_port_cancel(
void
);
68
69
/* A touch event while the protocol list is shut: whether a segment of
70
* the entry shown took it. */
71
bool
outputs_port_event(
const
touch_event_t
*evt);
72
73
/* Once a frame: what the settings and the SERVO screen's locks show is
74
* compared with what was drawn. */
75
void
outputs_port_tick(
void
);
76
77
/* Whether the entry's FUNCTION list is open. */
78
bool
outputs_port_fn_open(
void
);
79
80
/* The home tag: an open FUNCTION list shuts and the tag is taken (true);
81
* with none open the screen is left (false). */
82
bool
outputs_port_back(
void
);
83
84
/* Bumped by every change of what the entry draws; the screen repaints on
85
* a change of it as on one of its own. outputs_port_touched() bumps it. */
86
uint32_t outputs_port_revision(
void
);
87
void
outputs_port_touched(
void
);
88
89
/* The entry's left column, under the dropdown @p dd drawn @p pressed and
90
* @p open. */
91
void
outputs_port_draw(
gfx_canvas_t
*c,
gfx_rect_t
dd,
bool
pressed,
92
bool
open);
93
94
/* Entry @p port's name in the list and on the dropdown: PROG PORT, or
95
* PROG PORT n where the list holds several. */
96
void
outputs_port_name(uint8_t port,
char
*buf,
size_t
cap);
97
98
/* Each function's pins now (outputs_iface_pins()), for the screens'
99
* repaint: a row stepped on SETUP, or a page read, moves a pin or its
100
* owner without a touch on the screen. */
101
void
outputs_iface_read(uint64_t pins[OUTPUTS_IFACE_COUNT]);
102
103
/* Whether a programming port the list shows holds GPIO @p gpio. */
104
bool
outputs_port_holds(uint8_t gpio);
105
106
/* The entry the screen opens on: what outputs_screen_open_on() asked for,
107
* once, or the overview; selected. */
108
void
outputs_port_open(
void
);
109
110
/* What outputs_screen_open_on() asked for is dropped, as at a reset. */
111
void
outputs_port_forget_open(
void
);
112
113
/* Every programming port's pin, LINK_PG_PORTS_MAX of them, OUTPUTS_NO_PIN
114
* past the entries: what outbind_pwm_clash_ports() checks a pin beside. */
115
/* The ports' pins that hold a PWM slice, for the slice and compare
116
* rules: @p pins (LINK_PG_PORTS_MAX of them) with a NONE port's pin taken
117
* out, as the IOmcu's prog_port_slots_check() does. A NONE port's pin
118
* stays taken as a pin. One static copy, UI task only. */
119
const
uint8_t *outputs_pwm_pins(
const
uint8_t *pins);
120
const
uint8_t *outputs_port_pins(
void
);
gfx.h
gfx: an RGB565 (16-bit red, green, blue) rasteriser with no dependencies.
gfx_canvas_t
Definition
gfx.h:129
gfx_rect_t
Definition
gfx.h:81
touch_event_t
A DOWN, MOVE or UP of one contact.
Definition
touch_types.h:69
touch_types.h
Plain data types shared by the touch controller driver, the coordinate mapper and the event tracker....
ui_layout.h
The panel's geometry, in one place.
shared
ui
outputs_screen_int.h
Generated by
1.18.0