|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Composite board-view renderer implementation (see board_overlay.h). More...
#include "board_overlay.h"#include <stdint.h>#include <stdio.h>#include "board_overlay_internal.h"Go to the source code of this file.
Data Structures | |
| struct | overlay_memory_context_t |
| Context adapting the legacy contiguous composite to a fill surface. More... | |
Functions | |
| static bool | internal_memory_fill (void *context, uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint16_t color) |
| Fill one already-clipped rectangle in a contiguous RGB565 surface. | |
| static void | internal_draw_led (board_overlay_surface_t *surface, int32_t x, int32_t y, const board_led_status_t *led) |
| Draw one LED indicator dot (filled when on) plus its caption. | |
| static int32_t | internal_draw_leds (board_overlay_surface_t *surface, int32_t x, int32_t y, const board_status_t *st) |
| Paint the three LED indicators in a row; returns the next free y. | |
| static int32_t | internal_draw_run_stats (board_overlay_surface_t *surface, int32_t x, int32_t y, const board_status_t *st) |
| Paint the run-stats block (PC / chunks / MMIO / state); next free y. | |
| static int32_t | internal_draw_io_block (board_overlay_surface_t *surface, int32_t x, int32_t y, const board_status_t *st) |
| Paint the I/O block (USB / IRQ / touch / SD); returns next free y. | |
| static uint32_t | internal_console_tabs_per_row (int32_t panel_w, uint32_t count) |
Tabs drawn per row for a wrapping tab grid of count cells. | |
| static uint32_t | internal_console_tab_row_count (int32_t panel_w, uint32_t count) |
Number of rows a wrapping tab grid of count cells occupies. | |
| static void | internal_console_tab_rect (int32_t panel_x, int32_t panel_w, uint32_t idx, uint32_t count, int32_t *r) |
| Compute one console tab's cell rectangle in the wrapping grid. | |
| static void | internal_draw_console_tabs (board_overlay_surface_t *surface, int32_t panel_x, int32_t panel_w, const board_status_t *st) |
| Draw the wrapping console tab bar at the top of the console panel. | |
| static void | internal_draw_console_heading (board_overlay_surface_t *surface, int32_t x, const board_status_t *st) |
| Draw the console heading line and its rule. | |
| static void | internal_draw_console_body (board_overlay_surface_t *surface, int32_t panel_x, int32_t body_y, int32_t body_h, const board_status_t *st) |
| Draw the scrolling console body below the tab bar. | |
| static void | internal_draw_console (board_overlay_surface_t *surface, int32_t x, const board_status_t *st) |
| Perform draw console for the board overlay model. | |
| static void | internal_draw_button (board_overlay_surface_t *surface, int32_t x, const char *label, bool pressed) |
Draw one labelled push-button face at x (green when pressed). | |
| static void | internal_draw_buttons (board_overlay_surface_t *surface, int32_t x, const board_status_t *st) |
| Paint the "BUTTONS" heading and the clickable SW1 / SW2 buttons. | |
| static uint8_t | internal_battery_clamp (uint8_t soc) |
| Clamp a SOC value to 0..100 for display. | |
| static uint16_t | internal_battery_fill_color (uint8_t soc, bool charging) |
| Pick the battery gauge fill colour: green charging, else red/amber/green by level. | |
| static void | internal_draw_power (board_overlay_surface_t *surface, int32_t x, const board_status_t *st) |
| Paint the POWER section: a drag-to-set battery slider and a CHG toggle. | |
| static void | internal_draw_core (board_overlay_surface_t *surface, int32_t x, const board_status_t *st) |
| Paint the primary-core / low-power toggle on the right of the BUTTONS row. | |
| bool | board_overlay_draw_sidebar (board_overlay_surface_t *surface, uint16_t panel_w, const board_status_t *st) |
| Paint the sidebar background, divider, title and all status sections. | |
| void | board_overlay_compose (uint16_t *out, const uint16_t *panel, uint16_t panel_w, uint16_t panel_h, const board_status_t *st) |
Render the full composite (panel region + status sidebar) into out. | |
| board_overlay_btn_t | board_overlay_hit_button (uint16_t x, uint16_t y, uint16_t panel_w) |
| Classify a composite-space click against the sidebar's on-screen buttons. | |
| bool | board_overlay_battery_pct_at (uint16_t x, uint16_t panel_w, uint8_t *out_pct) |
| Map a click column on the battery slider track to a 0..100 SOC percent. | |
| bool | board_overlay_hit_console_tab (uint16_t x, uint16_t y, uint16_t panel_w, uint32_t tab_count, uint32_t *out_idx) |
| Map a composite-space click on the console tab bar to a tab index. | |
Composite board-view renderer implementation (see board_overlay.h).
Renders the panel framebuffer plus a status sidebar into one RGB565 buffer. Text is drawn with an embedded 5x7 column-major ASCII font (printable range 0x20..0x7E); each glyph is five bytes, one per column, with the low seven bits giving the rows top-to-bottom. Keeping the whole composite in a plain pixel buffer is deliberate: the macOS window and the --ppm snapshot show the identical bytes, so the overlay is verifiable headlessly.
Definition in file board_overlay.c.
| bool board_overlay_battery_pct_at | ( | uint16_t | x, |
| uint16_t | panel_w, | ||
| uint8_t * | out_pct ) |
Map a click column on the battery slider track to a 0..100 SOC percent.
The POWER section draws a horizontal slider whose fill mirrors the battery SOC. board_overlay_hit_button reports k_board_overlay_btn_battery when a click lands on that track's row; this then converts the click column to the percent the user dragged to, so the caller can drive the fuel-gauge model. The percent is the click's fraction across the track, clamped to 0..100 (a click left of the track yields 0, right of it yields 100), and the same fixed geometry that board_overlay_compose draws the track with is used here so the drawn fill and the drag position stay in lock-step.
| [in] | x | Click column in composite pixels (top-left origin). |
| [in] | panel_w | Panel width the composite was built with (sidebar origin). |
| [out] | out_pct | Receives the mapped state-of-charge percent (0..100). |
out_pct was written, false if out_pct is NULL. | true | The board overlay battery pct at condition holds or completed successfully; false otherwise. |
Definition at line 844 of file board_overlay.c.
References k_pwr_soc_full, k_pwr_track_w, and k_pwr_x_dx.
Referenced by apply_battery_click().
| void board_overlay_compose | ( | uint16_t * | out, |
| const uint16_t * | panel, | ||
| uint16_t | panel_w, | ||
| uint16_t | panel_h, | ||
| const board_status_t * | st ) |
Render the full composite (panel region + status sidebar) into out.
Clears out to the sidebar background, blits the panel pixels into the top-left region, draws a divider, then paints the three LED indicators and the USB / UART / IRQ / touch text lines from st. The output is exactly what board_view blits and what --ppm writes, so a headless pixel check over a sidebar region verifies the overlay.
| [out] | out | Composite RGB565 buffer, board_overlay_total_width by board_overlay_total_height pixels (row-major, no gap). |
| [in] | panel | Panel framebuffer (RGB565), or NULL for a blank panel. |
| [in] | panel_w | Panel width in pixels. |
| [in] | panel_h | Panel height in pixels. |
| [in] | st | Live peripheral snapshot to render (NULL draws no status). |
Definition at line 779 of file board_overlay.c.
References board_overlay_draw_sidebar(), board_overlay_total_height(), board_overlay_total_width(), internal_memory_fill(), and priv_blit_panel().
| bool board_overlay_draw_sidebar | ( | board_overlay_surface_t * | surface, |
| uint16_t | panel_w, | ||
| const board_status_t * | st ) |
Paint the sidebar background, divider, title and all status sections.
Draw the status sidebar through a bounded rectangle sink.
Definition at line 723 of file board_overlay.c.
References board_status_t::app_name, board_overlay_total_height(), board_overlay_total_width(), board_overlay_surface_t::fill, board_overlay_surface_t::height, internal_draw_buttons(), internal_draw_console(), internal_draw_core(), internal_draw_io_block(), internal_draw_leds(), internal_draw_power(), internal_draw_run_stats(), k_io_head_y, k_ovl_accent, k_ovl_bg, k_ovl_bg_alt, k_ovl_divider, k_ovl_heading, k_ovl_sidebar_w, k_pad_x, k_section_gap, k_sidebar_top, k_title_bar_h, k_title_gap, board_overlay_surface_t::ok, priv_draw_text(), priv_fill_rect(), and board_overlay_surface_t::width.
Referenced by board_overlay_compose(), and priv_emu_view_surface_build().
| board_overlay_btn_t board_overlay_hit_button | ( | uint16_t | x, |
| uint16_t | y, | ||
| uint16_t | panel_w ) |
Classify a composite-space click against the sidebar's on-screen buttons.
The interactive board view draws SW1 / SW2 push-buttons in the status sidebar at a fixed layout (the same constants board_overlay_compose draws them with). Given a click in composite pixels and the panel_w used to compose the frame, this reports which button the click hit so the caller can drive the user-switch model rather than injecting a panel touch. Out-of-band clicks (the panel, sidebar text) return k_board_overlay_btn_none.
| [in] | x | Click column in composite pixels (top-left origin). |
| [in] | y | Click row in composite pixels (top-left origin). |
| [in] | panel_w | Panel width the composite was built with (sidebar origin). |
| value | The operation-specific board overlay hit button value. |
Definition at line 800 of file board_overlay.c.
References k_board_overlay_btn_batt_chg, k_board_overlay_btn_battery, k_board_overlay_btn_console, k_board_overlay_btn_lowpower, k_board_overlay_btn_none, k_board_overlay_btn_sw1, k_board_overlay_btn_sw2, k_btn_gap, k_btn_h, k_btn_w, k_btn_x_dx, k_btn_y, k_con_head_y, k_core_lp_off, k_core_lp_w, k_ovl_sidebar_w, k_pwr_chg_off, k_pwr_chg_w, k_pwr_h, k_pwr_track_w, k_pwr_x_dx, and k_pwr_y.
Referenced by internal_run_classify_click(), and route_click().
| bool board_overlay_hit_console_tab | ( | uint16_t | x, |
| uint16_t | y, | ||
| uint16_t | panel_w, | ||
| uint32_t | tab_count, | ||
| uint32_t * | out_idx ) |
Map a composite-space click on the console tab bar to a tab index.
The tabbed console wraps tab_count equal-width tabs into as many rows as the console panel width needs (the same grid geometry the compose path draws them with). Given a click in composite pixels, the panel_w used to compose the frame, and the live tab_count, this reports which tab the click landed on so the caller can switch the active console channel. Clicks outside the tab grid (including the console body below it) return false and leave out_idx untouched, so the caller can fall through to the body's autoscroll toggle.
| [in] | x | Click column in composite pixels (top-left origin). |
| [in] | y | Click row in composite pixels (top-left origin). |
| [in] | panel_w | Panel width the composite was built with (sidebar origin). |
| [in] | tab_count | Number of tabs drawn (1 .. k_overlay_console_tabs_max). |
| [out] | out_idx | Receives the hit tab index (0 .. tab_count - 1). |
out_idx written; false otherwise. | true | The board overlay hit console tab condition holds or completed successfully; false otherwise. |
Definition at line 861 of file board_overlay.c.
References internal_console_tab_rect(), k_overlay_console_tabs_max, k_ovl_sidebar_w, and k_pad_x.
Referenced by internal_run_classify_click(), and route_click().
|
static |
Clamp a SOC value to 0..100 for display.
Clamp a soc value to 0..100 for display; this step is contained within the board overlay model and uses bounded caller or module-owned storage.
| [in] | soc | Soc input used by the operation. |
| value | The operation-specific battery clamp value. |
Definition at line 585 of file board_overlay.c.
References k_pwr_soc_full, and RA8_INTERNAL.
Referenced by internal_draw_power().
|
static |
Pick the battery gauge fill colour: green charging, else red/amber/green by level.
Pick the battery gauge fill colour: green charging, else red/amber/green by level; this step is contained within the board overlay model and uses bounded caller or module-owned storage.
| [in] | soc | Soc input used by the operation. |
| [in] | charging | Charging input used by the operation. |
| value | The operation-specific battery fill color value. |
Definition at line 602 of file board_overlay.c.
References k_ovl_amber, k_ovl_ok, k_ovl_red, k_pwr_soc_low, k_pwr_soc_mid, and RA8_INTERNAL.
Referenced by internal_draw_power().
|
static |
Compute one console tab's cell rectangle in the wrapping grid.
The bar wraps into internal_console_tabs_per_row columns; cell idx lands at row idx/per_row, column idxper_row. Each row is k_con_tab_h tall and each cell one k_con_tab_gap narrower/shorter than its pitch. Both internal_draw_console_tabs and board_overlay_hit_console_tab derive their geometry here so the drawn tab and its click hit-box stay in lock-step.
| [in] | panel_x | Console panel left edge (sidebar left + padding). |
| [in] | panel_w | Console panel width in pixels. |
| [in] | idx | Tab index (0 .. count - 1). |
| [in] | count | Total tab count (clamped to >= 1 internally). |
| [out] | r | Receives the cell rect {x, y, w, h}; 4-int array. |
count is the live channel count (0 is treated as 1). r is a non-NULL array of at least 4 int32_t. r[0]/r[1] are within the console panel band. r[2]/r[3] (w/h) are >= 0 (clamped, never negative). Definition at line 306 of file board_overlay.c.
References internal_console_tabs_per_row(), k_con_tab_gap, k_con_tab_h, k_con_y, and RA8_INTERNAL.
Referenced by board_overlay_hit_console_tab(), and internal_draw_console_tabs().
|
static |
Number of rows a wrapping tab grid of count cells occupies.
Ceiling-divides count by internal_console_tabs_per_row, so the tab bar is exactly tall enough to show every lane. internal_draw_console and the hit-test use it to size the tab band and leave the rest of the panel for the scrolling body.
| [in] | panel_w | Console panel width in pixels. |
| [in] | count | Total tab count. |
count] for count >= 1; 0 when count is 0. | 0 | count is 0 (no tabs to draw). |
panel_w is the live console panel width. count is the live channel count. count is 0. count (every cell has a slot). Definition at line 275 of file board_overlay.c.
References internal_console_tabs_per_row(), and RA8_INTERNAL.
Referenced by internal_draw_console().
|
static |
Tabs drawn per row for a wrapping tab grid of count cells.
The tab bar wraps: each row holds as many equal-width cells as fit at the minimum cell pitch k_con_tab_min_w, so a wide panel packs more lanes per row and a narrow one fewer. The result is clamped to [1, count] so a single lane still gets a full-width tab and the grid never claims more cells per row than exist. Both internal_console_tab_rect and internal_console_tab_row_count build on this.
| [in] | panel_w | Console panel width in pixels. |
| [in] | count | Total tab count (>= 1 expected; 0 is treated as 1). |
count)]. | 1 | The panel is narrower than one minimum cell, or count is 0/1. |
panel_w is the live console panel width. count is the live channel count. count). Definition at line 242 of file board_overlay.c.
References k_con_tab_min_w, and RA8_INTERNAL.
Referenced by internal_console_tab_rect(), and internal_console_tab_row_count().
|
static |
Draw one labelled push-button face at x (green when pressed).
Draw one labelled push-button face at x (green when pressed); this step is contained within the board overlay model and uses bounded caller or module-owned storage.
| [in,out] | surface | Descriptor-backed presentation surface to access. |
| [in] | x | Horizontal coordinate in pixels. |
| [in] | label | NUL-terminated label used by the operation. |
| [in] | pressed | Pressed input used by the operation. |
Definition at line 537 of file board_overlay.c.
References k_btn_h, k_btn_label_x, k_btn_label_y, k_btn_w, k_btn_y, k_ovl_btn_border, k_ovl_btn_down, k_ovl_btn_label, k_ovl_btn_up, priv_draw_text(), and priv_fill_rect().
Referenced by internal_draw_buttons().
|
static |
Paint the "BUTTONS" heading and the clickable SW1 / SW2 buttons.
Paint the "buttons" heading and the clickable sw1 / sw2 buttons; this step is contained within the board overlay model and uses bounded caller or module-owned storage.
| [in,out] | surface | Descriptor-backed presentation surface to access. |
| [in] | x | Horizontal coordinate in pixels. |
| [in] | st | Board-status snapshot used to render or report state. |
Definition at line 567 of file board_overlay.c.
References internal_draw_button(), k_btn_gap, k_btn_head_y, k_btn_w, priv_section_head(), board_status_t::sw1_pressed, and board_status_t::sw2_pressed.
Referenced by board_overlay_draw_sidebar().
|
static |
Perform draw console for the board overlay model.
Perform draw console for the board overlay model; this step is contained within the board overlay model and uses bounded caller or module-owned storage.
| [in,out] | surface | Descriptor-backed presentation surface to access. |
| [in] | x | Horizontal coordinate in pixels. |
| [in] | st | Board-status snapshot used to render or report state. |
Definition at line 495 of file board_overlay.c.
References board_status_t::console_ch_count, board_overlay_surface_t::height, internal_console_tab_row_count(), internal_draw_console_body(), internal_draw_console_heading(), internal_draw_console_tabs(), k_con_bottom, k_con_line_h, k_con_tab_h, k_con_y, k_overlay_console_tabs_max, k_ovl_console_bg, k_ovl_sidebar_w, k_pad_x, and priv_fill_rect().
Referenced by board_overlay_draw_sidebar().
|
static |
Draw the scrolling console body below the tab bar.
Lines are drawn bottom-up so the console scrolls like a terminal: console[0] is the newest line and lands on the bottom row, highlighted.
| [in,out] | surface | Clipped composite rectangle sink. |
| [in] | panel_x | Left edge of the console panel. |
| [in] | body_y | Top of the body area, below the tab bar. |
| [in] | body_h | Height of the body area, pixels. |
| [in] | st | Board status carrying the visible lines. |
surface is valid and st is non-NULL. body_h is at least one line high. Definition at line 464 of file board_overlay.c.
References board_status_t::console, board_status_t::console_count, k_con_line_h, k_con_pad, k_ovl_console_new, k_ovl_console_txt, priv_draw_text(), and RA8_INTERNAL.
Referenced by internal_draw_console().
|
static |
Draw the console heading line and its rule.
The heading doubles as the scroll indicator: paused shows how far back the held view sits and how to resume, live shows the byte counter.
| [in,out] | surface | Clipped composite rectangle sink. |
| [in] | x | Left edge of the sidebar panel. |
| [in] | st | Board status carrying the console counters. |
surface is valid and st is non-NULL. surface. < Widest heading (the PAUSED variant), plus slack.
Definition at line 415 of file board_overlay.c.
References board_status_t::console_autoscroll, board_status_t::console_scroll, board_status_t::console_total, k_con_head_y, k_ovl_amber, k_ovl_ok, k_ovl_rule, k_ovl_sidebar_w, k_pad_x, k_rule_dy, priv_draw_text(), priv_fill_rect(), and board_status_t::uart_tx_total.
Referenced by internal_draw_console().
|
static |
Draw the wrapping console tab bar at the top of the console panel.
One equal-width cell per channel (ALL | UART | ITM | SPI | I2C | CAN | ...), wrapped across as many rows as the panel width needs and captioned "NAME n" where n is the channel's live line count. The active tab is filled bright with white text; an inactive tab with traffic is dim, and an empty channel (count 0) is dimmer still so it reads as "no data yet". Geometry comes from internal_console_tab_rect so the drawn cells line up with the click hit-test.
| [in,out] | surface | Clipped composite rectangle sink. |
| [in] | panel_x | Console panel left edge. |
| [in] | panel_w | Console panel width in pixels. |
| [in] | st | Live status snapshot (tab names / counts / active index). |
st is non-NULL. surface is valid for its declared composite geometry. < Console tab caption: "<name> <line count>".
Definition at line 353 of file board_overlay.c.
References board_status_t::console_active_ch, board_status_t::console_ch_count, board_status_t::console_ch_count_lines, board_status_t::console_ch_name, internal_console_tab_rect(), k_con_tab_cap_y, k_con_tab_txt, k_overlay_console_tabs_max, k_ovl_tab_empty_txt, k_ovl_tab_off_bg, k_ovl_tab_off_txt, k_ovl_tab_on_bg, k_ovl_tab_on_txt, priv_draw_text(), priv_fill_rect(), and RA8_INTERNAL.
Referenced by internal_draw_console().
|
static |
Paint the primary-core / low-power toggle on the right of the BUTTONS row.
One button captioned "<core> <power>" – "M85 FULL" by default, "M33 LP" under –primary-core m33 + low-power. The core half is read-only (set by –primary-core); a click toggles the low-power half (bright when on). It shares the BUTTONS row, sitting to the right of SW1/SW2; the geometry matches board_overlay_hit_button.
| [in,out] | surface | Descriptor-backed presentation surface to access. |
| [in] | x | Horizontal coordinate in pixels. |
| [in] | st | Board-status snapshot used to render or report state. |
Definition at line 697 of file board_overlay.c.
References board_status_t::core_is_m33, k_btn_h, k_btn_label_x, k_btn_label_y, k_btn_y, k_core_lp_off, k_core_lp_w, k_ovl_btn_border, k_ovl_btn_down, k_ovl_btn_label, k_ovl_btn_up, board_status_t::low_power, priv_draw_text(), and priv_fill_rect().
Referenced by board_overlay_draw_sidebar().
|
static |
Paint the I/O block (USB / IRQ / touch / SD); returns next free y.
Paint the i/o block (usb / irq / touch / sd); returns next free y; this step is contained within the board overlay model and uses bounded caller or module-owned storage.
| [in,out] | surface | Descriptor-backed presentation surface to access. |
| [in] | x | Horizontal coordinate in pixels. |
| [in] | y | Vertical coordinate in pixels. |
| [in] | st | Board-status snapshot used to render or report state. |
| value | The operation-specific draw io block value. |
< Widest I/O row (USB/IRQ/touch/SD summary), plus slack.
Definition at line 175 of file board_overlay.c.
References board_status_t::has_touch, board_status_t::irq0, board_status_t::irq1, board_status_t::irq_total, k_ovl_text, k_sd_unit_div, priv_kv_row(), priv_section_head(), RA8_INTERNAL, board_status_t::sd_attached, board_status_t::sd_bytes, board_status_t::sd_fat_bits, board_status_t::sd_label, board_status_t::touch_x, board_status_t::touch_y, and board_status_t::usb_state.
Referenced by board_overlay_draw_sidebar().
|
static |
Draw one LED indicator dot (filled when on) plus its caption.
Draw one led indicator dot (filled when on) plus its caption; this step is contained within the board overlay model and uses bounded caller or module-owned storage.
| [in,out] | surface | Descriptor-backed presentation surface to access. |
| [in] | x | Horizontal coordinate in pixels. |
| [in] | y | Vertical coordinate in pixels. |
| [in] | led | Led input used by the operation. |
< LED dot side in pixels.
Definition at line 80 of file board_overlay.c.
References board_led_status_t::color, k_led_label_dy, k_ovl_led_off, k_ovl_led_ring, k_ovl_text, board_led_status_t::label, board_led_status_t::on, priv_draw_text(), priv_fill_rect(), and RA8_INTERNAL.
Referenced by internal_draw_leds().
|
static |
Paint the three LED indicators in a row; returns the next free y.
Paint the three led indicators in a row; returns the next free y; this step is contained within the board overlay model and uses bounded caller or module-owned storage.
| [in,out] | surface | Descriptor-backed presentation surface to access. |
| [in] | x | Horizontal coordinate in pixels. |
| [in] | y | Vertical coordinate in pixels. |
| [in] | st | Board-status snapshot used to render or report state. |
| value | The operation-specific draw leds value. |
Definition at line 114 of file board_overlay.c.
References internal_draw_led(), k_led_col_dx, k_led_row_h, k_overlay_led_count, board_status_t::leds, and priv_section_head().
Referenced by board_overlay_draw_sidebar().
|
static |
Paint the POWER section: a drag-to-set battery slider and a CHG toggle.
The slider track is a bordered bar whose left portion is filled to the SOC fraction in the level colour (red <=20%, amber <=50%, green above, or green while charging); the "NN%" reading is drawn over it. To the right, a CHG button shows the charge state – green "CHG +" while charging, dim "BATT" on battery. The geometry matches board_overlay_hit_button and board_overlay_battery_pct_at so a click drags the percent or toggles charge.
| [in,out] | surface | Clipped composite rectangle sink. |
| [in] | x | Section text origin (sidebar left + padding). |
| [in] | st | Live status snapshot (battery_soc / battery_charging). |
Definition at line 635 of file board_overlay.c.
References board_status_t::battery_charging, board_status_t::battery_soc, internal_battery_clamp(), internal_battery_fill_color(), k_btn_label_x, k_ovl_btn_border, k_ovl_btn_down, k_ovl_btn_label, k_ovl_btn_up, k_ovl_heading, k_pwr_chg_off, k_pwr_chg_w, k_pwr_h, k_pwr_head_y, k_pwr_label_y, k_pwr_soc_full, k_pwr_track_w, k_pwr_y, priv_draw_text(), priv_fill_rect(), and priv_section_head().
Referenced by board_overlay_draw_sidebar().
|
static |
Paint the run-stats block (PC / chunks / MMIO / state); next free y.
Paint the run-stats block (pc / chunks / mmio / state); next free y; this step is contained within the board overlay model and uses bounded caller or module-owned storage.
| [in,out] | surface | Descriptor-backed presentation surface to access. |
| [in] | x | Horizontal coordinate in pixels. |
| [in] | y | Vertical coordinate in pixels. |
| [in] | st | Board-status snapshot used to render or report state. |
| value | The operation-specific draw run stats value. |
< Widest RUN row ("<state> chunk <n>"), plus slack.
Definition at line 137 of file board_overlay.c.
References board_status_t::chunks, k_ovl_dim, k_ovl_heading, k_ovl_ok, k_ovl_text, board_status_t::mmio_reads, board_status_t::mmio_writes, board_status_t::pc, priv_kv_row(), priv_section_head(), RA8_INTERNAL, and board_status_t::running.
Referenced by board_overlay_draw_sidebar().
|
static |
Fill one already-clipped rectangle in a contiguous RGB565 surface.
Fill one already-clipped rectangle in a contiguous rgb565 surface; this step is contained within the board overlay model and uses bounded caller or module-owned storage.
| [in,out] | context | Callback context registered for this operation. |
| [in] | x | Horizontal coordinate in pixels. |
| [in] | y | Vertical coordinate in pixels. |
| [in] | width | Width of the affected region in pixels. |
| [in] | height | Height of the affected region in pixels. |
| [in] | color | RGB color value used by the drawing operation. |
| true | The memory fill condition holds or completed successfully; false otherwise. |
Definition at line 47 of file board_overlay.c.
References overlay_memory_context_t::pixels, RA8_INTERNAL, and overlay_memory_context_t::stride.
Referenced by board_overlay_compose().