ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
main.c
Go to the documentation of this file.
1
39
40#include <stddef.h>
41#include <stdint.h>
42
43#include "ez_scene.h"
44#include "ra8_board_ek_ra8d2.h"
46#include "ra8_boot_entry.h"
47#include "ra8_cgc.h"
48#include "ra8_display_pal.h"
49#include "ra8_display_pal_lcd.h"
50#include "ra8_err.h"
51#include "ra8_gfx.h"
52#include "ra8_isr.h"
53#include "ra8_mstp.h"
54#include "ra8_panel.h"
55#include "ra8_panel_timing.h"
56#include "ra8_sdramc.h"
57#include "ra8_time.h"
58#include "ra8_touch.h"
59
73typedef enum : uint32_t {
74 k_ez_uart_baud = 115200U,
79} ez_boot_t;
80
98
112typedef enum : uint8_t {
117} ez_print_t;
118
128
139[[gnu::section(
140 ".sdram_data")]] static uint8_t s_cell_mem[(size_t)k_ez_cells * (size_t)k_ez_cell_bytes];
141
151
161
171
180static int32_t s_buckets[k_ez_buckets];
181
190static uint8_t s_row[k_ez_row_bytes];
191
201static uint8_t s_strip[k_ez_strip_bytes];
202
212
223 .framebuffer = s_framebuffer,
224 .framebuffer_bytes = sizeof(s_framebuffer),
225 .width_px = (uint16_t)k_ez_fb_w,
226 .height_px = (uint16_t)k_ez_fb_h,
227 .pixfmt = k_display_pixfmt_rgb565,
228 .panel_timing = &s_ra8_panel_ek_ra8d2_timing,
229};
230
239static display_handle_t* s_display = nullptr;
240
250
260
262static const uint8_t k_msg_boot[] = "ereader-zoom: boot\r\n";
264static const uint8_t k_msg_fail[] = "ereader-zoom: FAIL init\r\n";
266static const uint8_t k_msg_scene[] = "ereader-zoom: FAIL scene\r\n";
268static const uint8_t k_msg_rend[] = "ereader-zoom: FAIL render\r\n";
270static const uint8_t k_msg_pre[] = "ereader-zoom: page ";
272static const uint8_t k_msg_x[] = "x";
274static const uint8_t k_msg_tile[] = " tile ";
276static const uint8_t k_msg_cells[] = " cells ";
278static const uint8_t k_msg_z1[] = " z1=";
280static const uint8_t k_msg_pan[] = " pan=";
282static const uint8_t k_msg_z2[] = " z2=";
284static const uint8_t k_msg_lens[] = " lens=";
286static const uint8_t k_msg_hit[] = " hit=";
288static const uint8_t k_msg_miss[] = " miss=";
290static const uint8_t k_msg_evict[] = " evict=";
292static const uint8_t k_msg_warm[] = " warm=";
294static const uint8_t k_msg_ok[] = " ok\r\n";
295
297static void ez_print(const uint8_t* msg, uint32_t len)
298{
299 (void)ra8_board_uart_console_write(msg, (size_t)len);
300}
301
303static void ez_panic_halt(const uint8_t* msg, uint32_t len)
304{
305 ez_print(msg, len);
307 __asm__ volatile("bkpt #0");
308 while (1) {
309 __asm__ volatile("wfi");
310 }
311}
312
314static void ez_print_hex(uint32_t value)
315{
316 uint8_t buf[k_ez_hex_nibbles];
317 for (uint32_t i = 0U; i < (uint32_t)k_ez_hex_nibbles; ++i) {
318 const uint32_t shift = ((uint32_t)k_ez_hex_nibbles - 1U - i) * (uint32_t)k_ez_nibble_bits;
319 const uint32_t nib = (value >> shift) & (uint32_t)k_ez_nibble_mask;
320 buf[i] = (uint8_t)((nib < (uint32_t)k_ez_dec_ten) ? ('0' + nib) : ('A' + (nib - k_ez_dec_ten)));
321 }
322 ez_print(buf, (uint32_t)k_ez_hex_nibbles);
323}
324
326static void ez_print_uint(uint32_t value)
327{
328 uint8_t buf[k_ez_dec_ten];
329 uint32_t n = 0U;
330 if (value == 0U) {
331 buf[n] = '0';
332 n++;
333 }
334 while ((value > 0U) && (n < (uint32_t)k_ez_dec_ten)) {
335 buf[n] = (uint8_t)('0' + (value % (uint32_t)k_ez_dec_ten));
336 n++;
337 value /= (uint32_t)k_ez_dec_ten;
338 }
339 for (uint32_t i = 0U; i < n; ++i) {
340 ez_print(&buf[n - 1U - i], 1U);
341 }
342}
343
345static void ez_bringup_clocks(void)
346{
347 uint32_t cpuclk0_hz = 0U;
348 if ((ra8_cgc_init() != k_ra8_ok) || (ra8_mstp_init() != k_ra8_ok)) {
349 ez_panic_halt(k_msg_fail, (uint32_t)sizeof(k_msg_fail) - 1U);
350 }
352 ez_panic_halt(k_msg_fail, (uint32_t)sizeof(k_msg_fail) - 1U);
353 }
354 if (ra8_time_init(cpuclk0_hz) != k_ra8_ok) {
355 ez_panic_halt(k_msg_fail, (uint32_t)sizeof(k_msg_fail) - 1U);
356 }
359 ez_panic_halt(k_msg_fail, (uint32_t)sizeof(k_msg_fail) - 1U);
360 }
362 ez_panic_halt(k_msg_fail, (uint32_t)sizeof(k_msg_fail) - 1U);
363 }
365}
366
368static void ez_bringup_panel(void)
369{
370 ra8_delay_ms((uint32_t)k_ez_settle_ms);
371 if (ra8_sdramc_init() != k_ra8_ok) {
372 ez_panic_halt(k_msg_fail, (uint32_t)sizeof(k_msg_fail) - 1U);
373 }
375 ez_panic_halt(k_msg_fail, (uint32_t)sizeof(k_msg_fail) - 1U);
376 }
378 ez_panic_halt(k_msg_fail, (uint32_t)sizeof(k_msg_fail) - 1U);
379 }
380 if (ra8_gfx_init(s_fb.pixels, s_fb.width_px, s_fb.height_px, k_ra8_gfx_format_rgb565) !=
381 k_ra8_ok) {
382 ez_panic_halt(k_msg_fail, (uint32_t)sizeof(k_msg_fail) - 1U);
383 }
384}
385
387static void ez_bringup_touch(void)
388{
389 const ra8_board_touch_cfg_t cfg = {.max_points = (uint8_t)k_ez_touch_max_points,
390 .irq_pin = (uint8_t)k_ra8_touch_irq_pin_unset};
391 (void)ra8_board_touch_open(&cfg);
392}
393
395static void ez_flush(const ez_present_t* plan)
396{
397 const display_rect_t rect = {
398 .x = (uint16_t)plan->rect.x,
399 .y = (uint16_t)plan->rect.y,
400 .w = (uint16_t)plan->rect.w,
401 .h = (uint16_t)plan->rect.h,
402 };
403 /* The engine's fast/quality split IS the e-ink waveform choice: a pan burst
404 * flushes A2 (bi-level, ~10x faster than GC16) and the settle repaints the
405 * same rectangle in all 16 levels. On this GLCDC panel the hint is inert;
406 * the e-ink backend honours it. */
408 rect,
410}
411
413static bool ez_redraw(void)
414{
416 return false;
417 }
418 ez_present_t plan = {};
419 if (ez_scene_present(&s_scene, &plan) != k_ra8_ok) {
420 return false;
421 }
422 if (plan.present) {
423 ez_flush(&plan);
424 }
425 return true;
426}
427
429static void ez_print_banner(const ez_selftest_t* st)
430{
431 ez_print(k_msg_pre, (uint32_t)sizeof(k_msg_pre) - 1U);
432 ez_print_uint((uint32_t)k_ez_page_w);
433 ez_print(k_msg_x, (uint32_t)sizeof(k_msg_x) - 1U);
434 ez_print_uint((uint32_t)k_ez_page_h);
435 ez_print(k_msg_tile, (uint32_t)sizeof(k_msg_tile) - 1U);
436 ez_print_uint((uint32_t)k_ez_tile_edge);
437 ez_print(k_msg_cells, (uint32_t)sizeof(k_msg_cells) - 1U);
438 ez_print_uint((uint32_t)k_ez_cells);
439 ez_print(k_msg_z1, (uint32_t)sizeof(k_msg_z1) - 1U);
440 ez_print_hex(st->crc_1x);
441 ez_print(k_msg_pan, (uint32_t)sizeof(k_msg_pan) - 1U);
443 ez_print(k_msg_z2, (uint32_t)sizeof(k_msg_z2) - 1U);
444 ez_print_hex(st->crc_2x);
445 ez_print(k_msg_lens, (uint32_t)sizeof(k_msg_lens) - 1U);
447 ez_print(k_msg_hit, (uint32_t)sizeof(k_msg_hit) - 1U);
448 ez_print_uint(st->hits);
449 ez_print(k_msg_miss, (uint32_t)sizeof(k_msg_miss) - 1U);
451 ez_print(k_msg_evict, (uint32_t)sizeof(k_msg_evict) - 1U);
453 ez_print(k_msg_warm, (uint32_t)sizeof(k_msg_warm) - 1U);
454 ez_print_uint((uint32_t)st->warmed);
455 ez_print(k_msg_ok, (uint32_t)sizeof(k_msg_ok) - 1U);
456}
457
459static void ez_poll_touch(bool* was_touching)
460{
461 ra8_touch_point_t pt = {};
462 uint8_t got = 0U;
463 if (ra8_touch_read(&pt, 1U, &got) != k_ra8_ok) {
464 return;
465 }
466 const bool touching = (got > 0U);
467 if (touching && !(*was_touching)) {
468 if (ez_scene_tap(&s_scene, (int32_t)pt.x, (int32_t)pt.y, ra8_time_ms())) {
469 (void)ez_redraw();
470 }
471 }
472 *was_touching = touching;
473}
474
476static bool ez_setup_scene(void)
477{
478 const ez_scene_cfg_t cfg = {
479 .fb = s_framebuffer,
480 .fb_bytes = (uint32_t)sizeof(s_framebuffer),
481 .fb_w = (int32_t)k_ez_fb_w,
482 .fb_h = (int32_t)k_ez_fb_h,
483 .cell_mem = s_cell_mem,
484 .meta = s_meta,
485 .keys = s_keys,
486 .dims = s_dims,
487 .buckets = s_buckets,
488 .row = s_row,
489 .strip = s_strip,
490 .packed = s_packed,
491 };
492 return ez_scene_init(&s_scene, &cfg) == k_ra8_ok;
493}
494
502void main(void)
503{
505 ez_print(k_msg_boot, (uint32_t)sizeof(k_msg_boot) - 1U);
508
509 if (!ez_setup_scene()) {
510 ez_panic_halt(k_msg_scene, (uint32_t)sizeof(k_msg_scene) - 1U);
511 }
512
513 ez_selftest_t st = {};
514 if (ez_scene_selftest(&s_scene, &st) != k_ra8_ok) {
515 ez_panic_halt(k_msg_rend, (uint32_t)sizeof(k_msg_rend) - 1U);
516 }
517 /* The self-check consumed every pending plan, so publish its final frame
518 * explicitly: one clean full-quality flush of the content area. */
519 const ez_present_t final_plan = {
520 .rect = ez_content_rect((int32_t)k_ez_fb_w, (int32_t)k_ez_fb_h),
521 .quality = true,
522 .present = true,
523 };
524 ez_flush(&final_plan);
525 ez_print_banner(&st);
526
527 bool was_touching = false;
528 uint32_t ticks = 0U;
529 while (1) {
530 ez_poll_touch(&was_touching);
531 /* Settle promotion: once a gesture burst has been still for the view's
532 * settle window, repaint the same rectangle at full 16-level quality. */
534 (void)ez_redraw();
535 }
536 if ((ticks % (uint32_t)k_ez_led_every) == 0U) {
538 }
539 ticks++;
540 ra8_delay_ms((uint32_t)k_ez_frame_ms);
541 }
542}
void main(void)
Secure fallback main entry point.
Definition main.c:37
static const uint8_t k_msg_pre[]
Definition main.c:151
static const uint8_t k_msg_ok[]
Definition main.c:153
static const uint8_t k_msg_boot[]
Definition main.c:140
static const uint8_t k_msg_fail[]
Definition main.c:63
static display_handle_t * s_display
Definition main.c:78
static uint16_t s_framebuffer[(size_t) k_panel_height_px *(size_t) k_panel_width_px]
1024x600 RGB565 framebuffer in external SDRAM (GLCDC scans this).
Definition main.c:67
static const uint8_t k_msg_tile[]
Definition main.c:189
static display_fb_t s_fb
Definition main.c:203
static const uint8_t k_msg_x[]
Definition main.c:85
static ra8_tile_key_t s_keys[(size_t) k_ls_cells]
Cache key storage.
Definition main.c:264
static longstrip_t s_strip
Opened longstrip scroll state.
Definition main.c:271
static int32_t s_buckets[(size_t) k_ls_buckets]
Cache hash buckets.
Definition main.c:267
static ra8_keycache_cell_t s_meta[(size_t) k_ls_cells]
Cache link metadata.
Definition main.c:266
static ra8_tile_dims_t s_dims[(size_t) k_ls_cells]
Cache dim storage.
Definition main.c:265
static const uint8_t k_msg_rend[]
Definition main.c:257
static uint8_t s_cell_mem[(size_t) k_mg_cells *(size_t) k_mg_cell_bytes]
Tile-cache cell storage (k_mg_cells gray8 256x256 tiles, SDRAM).
Definition main.c:198
static void ez_bringup_clocks(void)
Bring up clocks, MSTP, system tick, LEDs and the SCI console.
Definition main.c:345
static const uint8_t k_msg_cells[]
Console banner fragment: cache cell-count label.
Definition main.c:276
static const uint8_t k_msg_miss[]
Console banner fragment: cache miss counter label.
Definition main.c:288
ez_print_t
Decimal / hexadecimal formatting constants for the banner.
Definition main.c:112
@ k_ez_hex_nibbles
Hex digits in a 32-bit value.
Definition main.c:113
@ k_ez_dec_ten
Decimal radix.
Definition main.c:116
@ k_ez_nibble_bits
Bits per hex nibble.
Definition main.c:114
@ k_ez_nibble_mask
Low-nibble mask.
Definition main.c:115
static void ez_print_uint(uint32_t value)
Print a small unsigned integer in decimal.
Definition main.c:326
static const uint8_t k_msg_z2[]
Console banner fragment: 2x render hash label.
Definition main.c:282
static uint8_t s_packed[k_ez_packed_bytes]
Composite scratch: the dithered strip packed to 4 bpp (SRAM).
Definition main.c:211
static void ez_bringup_touch(void)
Open the GT911 touch controller (best-effort, polled).
Definition main.c:387
static void ez_flush(const ez_present_t *plan)
Flush a scene plan through the PAL with the waveform it asked for.
Definition main.c:395
static const uint8_t k_msg_evict[]
Console banner fragment: cache eviction counter label.
Definition main.c:290
static const uint8_t k_msg_scene[]
Console banner fragment: scene wiring failure.
Definition main.c:266
static bool ez_setup_scene(void)
Wire the scene over the SDRAM cache storage and the SRAM scratch.
Definition main.c:476
static ez_scene_t s_scene
The demo scene: tiled page, zoom viewport and loupe.
Definition main.c:259
ez_boot_t
Boot, console and touch knobs.
Definition main.c:73
@ k_ez_uart_baud
Console baud.
Definition main.c:74
@ k_ez_settle_ms
PLL / SDRAM / panel-POR settle.
Definition main.c:75
@ k_ez_led_every
Heartbeat LED toggle sub-cadence.
Definition main.c:77
@ k_ez_touch_max_points
One contact = one tap.
Definition main.c:78
@ k_ez_frame_ms
Input poll period, ms.
Definition main.c:76
static void ez_print(const uint8_t *msg, uint32_t len)
Emit a byte run on the console.
Definition main.c:297
static const uint8_t k_msg_hit[]
Console banner fragment: cache hit counter label.
Definition main.c:286
static const uint8_t k_msg_pan[]
Console banner fragment: panned render hash label.
Definition main.c:280
static void ez_bringup_panel(void)
Bring up SDRAM + the GLCDC panel, then bind ra8_gfx to the FB.
Definition main.c:368
static bool ez_redraw(void)
Render, then flush whatever the scene says changed.
Definition main.c:413
static void ez_print_banner(const ez_selftest_t *st)
Print the deterministic boot banner (geometry + the four hashes).
Definition main.c:429
static const uint8_t k_msg_z1[]
Console banner fragment: 1:1 render hash label.
Definition main.c:278
static void ez_poll_touch(bool *was_touching)
Poll the GT911 once; on a fresh tap, mutate + redraw the viewport.
Definition main.c:459
static const uint8_t k_msg_lens[]
Console banner fragment: loupe render hash label.
Definition main.c:284
static void ez_panic_halt(const uint8_t *msg, uint32_t len)
Print a fail banner, then trap (ra8_emulator halts on the BKPT).
Definition main.c:303
static void ez_print_hex(uint32_t value)
Print a 32-bit value as 8 upper-case hex digits.
Definition main.c:314
static const display_cfg_t k_ez_display_cfg
Display PAL configuration: LCD/GLCDC backend over the SDRAM framebuffer.
Definition main.c:221
static const uint8_t k_msg_warm[]
Console banner fragment: prefetch counter label.
Definition main.c:292
static uint8_t s_row[k_ez_row_bytes]
Composite scratch: one source row at the widest viewport (SRAM).
Definition main.c:190
ez_fb_t
Framebuffer geometry (mirrors the EK-RA8D2 panel).
Definition main.c:94
@ k_ez_fb_h
Framebuffer height, pixels.
Definition main.c:96
@ k_ez_fb_w
Framebuffer width, pixels.
Definition main.c:95
Tap-to-zoom demo scene: tiled 12 MP page, zoom viewport, loupe (#478).
ra8_ui_rect_t ez_content_rect(int32_t fb_w, int32_t fb_h)
The content rectangle: the panel less the status bar.
Definition ez_scene.c:232
bool ez_scene_tick(ez_scene_t *s, uint32_t now_ms)
Advance both views' settle timers; report whether a repaint is due.
Definition ez_scene.c:689
@ k_ez_page_w
Source page width, pixels.
Definition ez_scene.h:74
@ k_ez_tile_edge
Tile edge, pixels (gray8 => 64 KiB/tile).
Definition ez_scene.h:76
@ k_ez_page_h
Source page height, pixels.
Definition ez_scene.h:75
ra8_err_t ez_scene_selftest(ez_scene_t *s, ez_selftest_t *out)
Drive the scene through the scripted boot self-check.
Definition ez_scene.c:861
ra8_err_t ez_scene_present(ez_scene_t *s, ez_present_t *out)
Take the pending flush plan for whichever view changed.
Definition ez_scene.c:677
ra8_err_t ez_scene_render(ez_scene_t *s)
Repaint the content area, the loupe (when open) and the status bar.
Definition ez_scene.c:624
@ k_ez_row_bytes
One source row at the widest viewport.
Definition ez_scene.h:196
@ k_ez_strip_bytes
gray8 destination strip (16 rows).
Definition ez_scene.h:197
@ k_ez_packed_bytes
The strip packed to 4 bpp.
Definition ez_scene.h:198
@ k_ez_buckets
Cache hash buckets (>= cells).
Definition ez_scene.h:173
@ k_ez_cell_bytes
One gray8 tile, bytes.
Definition ez_scene.h:168
@ k_ez_cells
Cells.
Definition ez_scene.h:172
ra8_err_t ez_scene_init(ez_scene_t *s, const ez_scene_cfg_t *cfg)
Wire the tile cache, the tiled source and both viewports.
Definition ez_scene.c:430
bool ez_scene_tap(ez_scene_t *s, int32_t x, int32_t y, uint32_t now_ms)
Apply a tap to the scene.
Definition ez_scene.c:531
Board-support layer for the Renesas EK-RA8D2 v1 evaluation kit.
ra8_err_t ra8_board_led_toggle(ra8_board_led_id_t led)
Toggle led's output state.
ra8_err_t ra8_board_led_init(ra8_board_led_id_t led)
Configure led as a digital output, initial level low (off).
ra8_err_t ra8_board_led_on(ra8_board_led_id_t led)
Drive led HIGH (light it).
@ k_ra8_board_led_blue
Convenience aliases by colour.
@ k_ra8_board_led_red
RA8 board led red.
ra8_err_t ra8_board_uart_console_write(const uint8_t *data, size_t len)
Polled blocking write to the J-Link OB VCOM console.
ra8_err_t ra8_board_uart_console_init(uint32_t baud)
Configure SCI8 + PD02/PD03 as the debug-console UART.
One-call bring-up of the EK-RA8D2 panel's GoodIX GT911 touch controller.
ra8_err_t ra8_board_touch_open(const ra8_board_touch_cfg_t *cfg)
Bring the on-board GT911 up and open the touch driver against it.
Boot entry points shared between a vector table and its startup code.
High-level Clock Generation Circuit driver.
ra8_err_t ra8_cgc_get_clock_hz(ra8_clock_id_t id, uint32_t *out_hz)
Query the current frequency of a clock-tree domain.
Definition ra8_cgc.c:132
@ k_ra8_clock_id_cpuclk0
Cortex-M85 CPUCLK0.
Definition ra8_cgc.h:70
ra8_err_t ra8_cgc_init(void)
Configure the clock tree to a safe default.
Definition ra8_cgc.c:727
Display Platform Abstraction Layer for the RA8D2.
@ k_display_pixfmt_rgb565
16 bpp, 5/6/5 packed.
ra8_err_t display_get_framebuffer(const display_handle_t *d, display_fb_t *out)
Return the framebuffer descriptor the backend is targeting.
ra8_err_t display_flush(const display_handle_t *d, display_rect_t rect, display_refresh_hint_t hint)
Commit pending framebuffer changes to the panel.
struct display_handle display_handle_t
ra8_err_t display_init(const display_cfg_t *cfg, display_handle_t **out_handle)
Initialise the display PAL and bring the selected backend up to a state where display_flush succeeds.
@ k_display_refresh_fast
Prioritise latency.
@ k_display_refresh_quality
Prioritise final quality.
LCD backend (ra8_glcdc) for the display PAL.
const display_backend_iface_t k_display_backend_lcd_ra8_glcdc
LCD backend vtable – pass its address through display_cfg_t.iface to drive the EK-RA8D2 panel.
Error Code Definitions for ra8-firmware.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
Definition ra8_err.h:119
Software 2D graphics primitives layered on top of a caller-ownedframebuffer (DRW / D/AVE 2D / GLCDC r...
@ k_ra8_gfx_format_rgb565
16-bit RGB565, little-endian in memory.
Definition ra8_gfx.h:40
ra8_err_t ra8_gfx_init(void *fb, uint16_t width, uint16_t height, ra8_gfx_format_t format)
Bind ra8_gfx to a caller-owned framebuffer.
NVIC + ICU IELSR allocator.
void ra8_isr_globals_enable(void)
Globally enable maskable interrupts (PRIMASK = 0).
Definition ra8_isr.c:439
Ref-counted Module Stop Control wrapper for the RA8D2.
ra8_err_t ra8_mstp_init(void)
Re-establish the ra8_mstp ref-count table from current hardware state.
Definition ra8_mstp.c:291
Active display-panel descriptor for the EK-RA8D2 (ER-TFT070-6).
@ k_panel_height_px
Native height (pixels).
Definition ra8_panel.h:52
@ k_panel_width_px
Native width (pixels).
Definition ra8_panel.h:51
#define RA8_BOARD_PANEL_FRAMEBUFFER(name)
Declare a correctly aligned, sized and placed RGB565 framebuffer for the on-board panel.
Definition ra8_panel.h:165
EK-RA8D2 panel timing as the HAL's ra8_glcdc_timing_t (ER-TFT070-6).
static const ra8_glcdc_timing_t s_ra8_panel_ek_ra8d2_timing
EK-RA8D2 ER-TFT070-6 RGB timing for ra8_glcdc_init / the LCD backend.
External SDRAM controller driver (framework).
ra8_err_t ra8_sdramc_init(void)
Initialise the external SDRAM at k_ra8_sdram_base_addr.
Definition ra8_sdramc.c:257
SysTick-based tick counter, delay and timestamp helpers.
ra8_err_t ra8_time_init(uint32_t cpu_hz)
Initialise SysTick for a 1 kHz tick interrupt.
Definition ra8_time.c:59
void ra8_delay_ms(uint32_t ms)
Busy-wait for at least ms milliseconds.
Definition ra8_time.c:129
uint32_t ra8_time_ms(void)
Get the current 1 kHz tick count.
Definition ra8_time.c:108
Multi-touch input driver – GoodIX GT911 backend.
ra8_err_t ra8_touch_read(ra8_touch_point_t *out_points, uint8_t max_count, uint8_t *got_count)
Drain the current touch frame.
Definition ra8_touch.c:551
@ k_ra8_touch_irq_pin_unset
Sentinel for "no IRQ pin attached".
Definition ra8_touch.h:72
Configuration descriptor passed into display_init.
Framebuffer descriptor returned by display_get_framebuffer.
Rectangle in framebuffer coordinates passed into display_flush.
What the scene asks the panel to flush, and how well.
Definition ez_scene.h:283
ra8_ui_rect_t rect
Panel rectangle to flush.
Definition ez_scene.h:284
bool quality
True: full 16-level GC16.
Definition ez_scene.h:285
bool present
False: nothing changed; do not flush.
Definition ez_scene.h:286
Everything ez_scene_init needs: storage and framebuffer geometry.
Definition ez_scene.h:252
The whole demo: one tiled page, one zoom viewport, one loupe.
Definition ez_scene.h:222
Deterministic boot self-check results (the app's golden numbers).
Definition ez_scene.h:305
uint32_t misses
Tile-cache misses (decodes).
Definition ez_scene.h:311
uint32_t crc_1x
Hash after the opening 1:1 render.
Definition ez_scene.h:306
uint32_t crc_pan
Hash after one right-pan step at 1:1.
Definition ez_scene.h:307
uint32_t evictions
Tile-cache evictions.
Definition ez_scene.h:312
uint32_t crc_2x
Hash after zooming to 2x at a fixed point.
Definition ez_scene.h:308
uint32_t crc_lens
Hash after opening the 4x loupe.
Definition ez_scene.h:309
uint16_t warmed
Tiles warmed by the pan read-ahead.
Definition ez_scene.h:313
uint32_t hits
Tile-cache hits over the whole sequence.
Definition ez_scene.h:310
The two touch settings that are an APPLICATION choice, not a board fact.
Per-cell link metadata (one caller-owned array entry per cell).
Per-cell user descriptor: the decoded tile dimensions.
Identifies one decoded image tile.
One decoded touch contact.
Definition ra8_touch.h:93
uint16_t x
Panel X coordinate.
Definition ra8_touch.h:94
uint16_t y
Panel Y coordinate.
Definition ra8_touch.h:95
int32_t w
Width (pixels, >= 0).
Definition ra8_ui.h:75
int32_t h
Height (pixels, >= 0).
Definition ra8_ui.h:76
int32_t x
Left edge (pixels).
Definition ra8_ui.h:73
int32_t y
Top edge (pixels).
Definition ra8_ui.h:74