31#define SCREEN_W UI_PANEL_W
32#define SCREEN_H UI_BODY_H
39#define FOOT (UI_ALERT_Y - UI_BAND_H - 4)
51#define PK_FONT_LABEL (&gfx_font_10x20)
52#define PK_FONT_FINE (&gfx_font_8x16)
53#define PK_FONT_PIN (&gfx_font_16x28)
54#define PK_FONT_HEAD (&gfx_font_20x36)
66#define BOARD_MAX_H 240
79#define KEY_H UI_BTN_H_TALL
83 "two tiers of keys fit above and below the tallest board");
85 "a key is a finger wide and tall");
100#define RAIL_DROP_0 30
101#define RAIL_DROP_1 78
122#define COUNT_Y (HEAD_Y + FACE_H + 8)
123#define REASON_Y (COUNT_Y + 24)
124#define REASON_PITCH 22
126#define HEAD_H (REASON_Y + REASON_PITCH + 20 - HEAD_Y)
135#define POP_ROW UI_TAP_MIN
138 "the protocol list ends above the alert band");
152#define PINS_Y (HEAD_Y + HEAD_H + 10)
154#define PINS_NAME_X 34
155#define PINS_TOP (PINS_Y + 48)
159 "the PINS table holds 8 pins above the alert band");
161 "a pin name (GPIO 28) ends 4px left of a two-digit pad");
163 "the PINS table ends 8px left of any key");
175#define USE_X (SCREEN_W - 8 - USE_W)
177#define USE_TOP (USE_Y + 56)
181#define USE_PIN_H_C 20
182#define USE_PIN_H_D 16
185 "the IN USE table starts 8px right of any key");
194 "the IN USE table holds a binding beside 4 ports");
200 "the IN USE table holds its fullest list");
209#define IVORY GFX_RGB(236, 235, 228)
210#define EBONY GFX_RGB(22, 23, 28)
211#define INK GFX_RGB(10, 10, 14)
212#define HALO GFX_RGB(6, 6, 8)
214enum { HIT_NONE = 0, HIT_FACE, HIT_ROW, HIT_BUTTON };
253 uint64_t
iface[OUTPUTS_IFACE_COUNT];
301bool pk_pad_xy(uint8_t pad,
int *px,
int *py);
#define ROW_H
Definition analyser_screen.c:117
#define SCREEN_W
Definition files_int.h:33
gfx: an RGB565 (16-bit red, green, blue) rasteriser with no dependencies.
Reading a board drawing (LINK_ART_DRAWING): the layout link_pages.h gives under LINK_DRAW_*.
#define LINK_PG_PORTS_MAX
Ports the page has room for.
Definition link_pages.h:2190
Binding a protocol to pins: what the operator chooses, and the OUTPUTS page that comes out of it.
#define OUTBIND_PROTOS
Entries in the protocol table, OFF included.
Definition out_bind.h:408
#define POP_ROW
Definition outputs_screen.c:108
The outputs screen: choose a protocol, then tick the pins it drives.
outputs_iface_t
Definition outputs_screen.h:284
void pk_cat_render(gfx_canvas_t *c)
Pick the cat on a visit's first frame and draw it while its box is clear; called last in a frame that...
Definition picker_cat.c:179
void pk_cat_reset(void)
Forget the cat: none until the next visit.
Definition picker_cat.c:165
void pk_cat_enter(void)
A visit begins: roll for the cat, picked on its first frame.
Definition picker_cat.c:172
void pk_render(gfx_canvas_t *c, int buffer_index)
Draws the screen into frame buffer buffer_index.
Definition picker_draw.c:507
bool pk_pad_is_top(uint8_t pad)
Returns which of the two pad rows a pad is in.
Definition picker_geometry.c:113
bool pk_pad_xy(uint8_t pad, int *px, int *py)
Gives where a pad sits on screen, from the drawing's pad record or else the shape's grid.
Definition picker_geometry.c:84
bool pk_marker_at(uint8_t e, int *mx, int *my, int *r)
Gives the centre and radius of the marker of pad-list entry e.
Definition picker_geometry.c:209
int pk_pop_rows(void)
Returns the rows of the protocol list: the protocols, then one PROG PORT entry per port.
Definition picker_geometry.c:284
bool pk_button_at(int i, gfx_rect_t *out, int *tier_out)
Gives the button of catalogue entry i and its tier; only a pin an output may have gets one.
Definition picker_geometry.c:129
gfx_rect_t pk_pop_rect(void)
Returns the protocol list's rectangle: one column of POP_W px, two with PROG PORT entries.
Definition picker_geometry.c:290
void pk_board_box(int *x, int *y, int *w, int *h)
Gives the box the board occupies: the drawing's outline or else the shape's, centred across the scree...
Definition picker_geometry.c:60
const link_drawing_t * pk_drawing(void)
The drawing, while it is the one for the board the binding names.
Definition picker_screen.c:183
const outbind_shape_t * pk_shape(void)
The shape page of the board the binding names.
Definition picker_screen.c:173
outputs_iface_t pk_iface_taken(uint8_t index)
What SETUP > INTERFACES holds pin index for: no protocol and no port holds it, and the IOmcu does not...
Definition picker_screen.c:239
bool pk_prog_taken(uint8_t index)
Whether the programming port has pin index: it is the port's and no protocol holds it....
Definition picker_screen.c:216
pk_state_t pk_s
The screen's state; picker_screen_int.h names it s.
Definition picker_screen.c:25
void pk_touched(void)
Count a change: every framebuffer's picture is stale.
Definition picker_screen.c:51
uint8_t pk_proto_shown(void)
The protocol shown: the binding's, OFF for one out of range.
Definition picker_screen.c:201
int8_t pk_channel_of(uint8_t index)
The channel the OUTPUTS page gives catalogue entry index. Channels are allocated in pin order across ...
Definition picker_screen.c:337
The pin picker: the board itself, with a button on every pin an output may have.
void(*) picker_apply_fn(const outbind_t *b)
Definition picker_screen.h:272
#define PICKER_USE_MAX
Definition picker_screen.h:226
void(*) picker_drawing_fn(uint16_t board)
Definition picker_screen.h:294
void(*) picker_select_fn(uint8_t proto)
Definition picker_screen.h:87
#define PK_CELL
Definition picker_screen_int.h:55
#define PINS_TOP
Definition picker_screen_int.h:155
#define USE_PIN_H_D
Definition picker_screen_int.h:182
#define TGAP
Definition picker_screen_int.h:77
#define GAP
Definition picker_screen_int.h:80
#define PINS_NAME_X
Definition picker_screen_int.h:154
#define BTNW
Definition picker_screen_int.h:78
#define USE_FOOT
Definition picker_screen_int.h:178
#define BOARD_W
The board's box: 600px wide and as tall as its outline makes it, up to 240px, centred between the bod...
Definition picker_screen_int.h:65
#define TIERS
Two staggered tiers of keys above the board and two below.
Definition picker_screen_int.h:76
#define USE_TOP
Definition picker_screen_int.h:177
#define FOOT
The lowest row the screen draws or takes a press on, in the screen's coordinates: 4px above the alert...
Definition picker_screen_int.h:39
#define BOARD_MAX_H
Definition picker_screen_int.h:66
#define PINS_X
The PINS table, left of the board: 171px, "CH7" in the label face (30px), "GPIO 28" in PK_FONT_PIN fr...
Definition picker_screen_int.h:151
#define MAX_FBS
Definition picker_screen_int.h:33
#define KEY_H
Definition picker_screen_int.h:79
#define PINS_W
Definition picker_screen_int.h:153
#define USE_X
Definition picker_screen_int.h:175
#define USE_NAME_H
Definition picker_screen_int.h:179
A drawing that passed link_drawing_parse().
Definition link_drawing.h:53
Where a board's pads are: two rows on one pitch, which is every 0.1-inch header board.
Definition out_bind.h:89
The selection: which board, the protocol being edited, and each protocol's pins.
Definition out_bind.h:423
PICK A PIN's state: the binding shown, the callbacks that apply and select, the IOmcu's drawing of th...
Definition picker_screen_int.h:221
uint32_t cat_roll
Definition picker_screen_int.h:262
bool chrome_valid[MAX_FBS]
Definition picker_screen_int.h:258
bool open
Definition picker_screen_int.h:238
picker_select_fn select
Definition picker_screen_int.h:224
uint32_t view_rev
Definition picker_screen_int.h:257
int hit_kind
Definition picker_screen_int.h:236
uint16_t drawing_board
Definition picker_screen_int.h:233
int port
Definition picker_screen_int.h:256
bool unread
Whether the binding shown is not one a read confirmed: no button acts.
Definition picker_screen_int.h:244
int hit
Definition picker_screen_int.h:237
bool cat_pending
Definition picker_screen_int.h:261
bool has_drawing
Definition picker_screen_int.h:234
link_drawing_t drawing
The IOmcu's drawing, for the board drawing_board names; it agreed with that board's catalogue when it...
Definition picker_screen_int.h:232
ui_cat_pick_t cat
Definition picker_screen_int.h:263
picker_drawing_fn source
Definition picker_screen_int.h:225
gfx_rect_t cat_drawn
Definition picker_screen_int.h:264
picker_apply_fn apply
Definition picker_screen_int.h:223
int refused
Pin whose tap a PWM clash refused last, -1 for none; the reason line says why.
Definition picker_screen_int.h:251
outbind_t bind
Definition picker_screen_int.h:222
uint64_t iface[OUTPUTS_IFACE_COUNT]
Definition picker_screen_int.h:253
A pick: a pose and the index of its spot in the screen's list, or both UI_CAT_NONE.
Definition ui_cats.h:76
Cat drawings on the screens: the poses, the spots a screen offers them, the random pick of one and th...
The panel's geometry, in one place.
#define UI_TAP_MIN
The smallest touch target for a control, in pixels: 48px, 7.2mm.
Definition ui_layout.h:71