|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Active display-panel descriptor for the EK-RA8D2 (ER-TFT070-6). More...
#include <stddef.h>#include <stdint.h>Go to the source code of this file.
Macros | |
| #define | RA8_INTERNAL_PANEL_SECTION gnu::section(".sdram_data"), |
| Internal section specifier on target ELF binaries. | |
| #define | RA8_BOARD_PANEL_FRAMEBUFFER(name) |
| Declare a correctly aligned, sized and placed RGB565 framebuffer for the on-board panel. | |
Enumerations | |
| enum | ra8_panel_geometry_t : uint16_t { k_panel_width_px = 1024U , k_panel_height_px = 600U , k_panel_width_mm = 154U , k_panel_height_mm = 86U , k_panel_ppi = 169U } |
| ER-TFT070-6 geometry as compile-time constants. More... | |
| enum | ra8_panel_timing_t : uint16_t { k_panel_h_front = 160U , k_panel_h_back = 160U , k_panel_h_sync = 4U , k_panel_v_front = 12U , k_panel_v_back = 23U , k_panel_v_sync = 3U } |
| ER-TFT070-6 RGB timing (porches + sync); active size = the geometry. More... | |
| enum | ra8_panel_framebuffer_t : uint16_t { k_ra8_board_fb_align_bytes = 64U } |
| How a framebuffer for this panel must be laid out in memory. More... | |
Active display-panel descriptor for the EK-RA8D2 (ER-TFT070-6).
BSP description of the display wired to the EK-RA8D2 Parallel Graphics Expansion Board 1: the ER-TFT070-6, a 7.0" 1024x600 IPS panel driven RGB565 through the GLCDC. Panel-agnostic code (the shared UI, the host preview) reads its geometry from here rather than hardcoding pixels.
Each board package exposes its own ra8_panel.h; the build selects the active panel through the include path (no preprocessor selection), so a different board – e.g. a future e-reader – swaps in its own descriptor without touching the UI.
Holds the full panel description: UI-facing geometry plus the GLCDC RGB timing (porches / sync). The geometry + timing values here are plain constants (host-includable); the GLCDC-typed timing instance the HAL consumes lives in the companion ra8_panel_timing.h (target-only, since it pulls in the HAL type).
Self-contained (no MCU / FSP includes) so host-side previews include it unchanged.
Definition in file ra8_panel.h.
| #define RA8_BOARD_PANEL_FRAMEBUFFER | ( | name | ) |
Declare a correctly aligned, sized and placed RGB565 framebuffer for the on-board panel.
Expands to a file-scope static array of k_panel_height_px x k_panel_width_px 16-bit pixels, aligned to k_ra8_board_fb_align_bytes so the GLCDC's AXI bursts fetch cleanly, and placed in .sdram_data – the external-SDRAM output section every EK-RA8D2 linker script defines. All three are board facts, and none of them is checkable by the API that consumes the pointer: the wrong alignment is torn scanout, and 1.2 MiB of surface does not fit in on-chip SRAM at all.
This is the one case the project style rules name as macro-legal – reducing duplicated code – because the alternative, a library-owned array behind an accessor, would fix the size at library build time and cost every application the memory whether it drives the panel or not.
An application drawing into a smaller scratch surface declares its own array instead, but should still take the alignment from k_ra8_board_fb_align_bytes rather than writing 64 again.
| [in] | name | Identifier for the declared array (a token, not a value). |
Definition at line 165 of file ra8_panel.h.
| #define RA8_INTERNAL_PANEL_SECTION gnu::section(".sdram_data"), |
Internal section specifier on target ELF binaries.
Definition at line 116 of file ra8_panel.h.
| enum ra8_panel_framebuffer_t : uint16_t |
How a framebuffer for this panel must be laid out in memory.
The GLCDC fetches scanlines over AXI in bursts, and a framebuffer whose base is not 64-byte aligned splits every burst – which shows up as torn scanout, not as an error. Nothing in the API can catch it, so the number has to be stated where a consumer will find it. Before this existed, thirteen example files each declared their own = 64U under a different name (k_app_fb_align_bytes, k_cm_fb_align, k_wd_fb_align, ...), every one carrying the same copied comment – the tell that the fact had been copied rather than derived.
Use RA8_BOARD_PANEL_FRAMEBUFFER for a full-panel surface. An application drawing into a smaller scratch surface declares its own array but should still take the alignment from here.
| Enumerator | |
|---|---|
| k_ra8_board_fb_align_bytes | GLCDC AXI burst alignment, in bytes. |
Definition at line 107 of file ra8_panel.h.
| enum ra8_panel_geometry_t : uint16_t |
ER-TFT070-6 geometry as compile-time constants.
The resolution is the hard pixel budget for any UI. The physical fields drive design rules: size touch targets and fonts in millimetres, not just pixels, because the panel PPI is far below a laptop display and the glass does no supersampling. PPI = k_panel_width_px / (k_panel_width_mm / 25.4), which for this panel is about 169. Physical values are approximate – confirm against the ER-TFT070-6 datasheet.
Definition at line 50 of file ra8_panel.h.
| enum ra8_panel_timing_t : uint16_t |
ER-TFT070-6 RGB timing (porches + sync); active size = the geometry.
Per the LVGL EK-RA8D2 reference for this panel (these differ from the generic 1024x600 values: h_back 140->160, h_sync 20->4, v_back 20->23). Assembled into the HAL's ra8_glcdc_timing_t in ra8_panel_timing.h.
Definition at line 68 of file ra8_panel.h.