44typedef enum : uint16_t {
49typedef enum : uint16_t {
54typedef enum : uint8_t {
58typedef enum : uint32_t {
83 .width_px = (uint16_t)
k_fb_w,
84 .height_px = (uint16_t)
k_fb_h,
93 __asm__
volatile(
"wfi");
99 for (uint32_t i = 0U; i < (uint32_t)
k_fb_w * (uint32_t)
k_fb_h; i++) {
102 __asm__
volatile(
"dsb" :::
"memory");
107 for (uint16_t x = 0U; x < (uint16_t)
k_fb_w; x++) {
108 const int32_t y_down = ((int32_t)x * (int32_t)
k_fb_h) / (int32_t)
k_fb_w;
109 const int32_t y_up = ((int32_t)
k_fb_h - 1) - y_down;
111 const int32_t yy_down = y_down + dy;
112 const int32_t yy_up = y_up + dy;
113 if ((yy_down >= 0) && (yy_down < (int32_t)
k_fb_h)) {
116 if ((yy_up >= 0) && (yy_up < (int32_t)
k_fb_h)) {
121 __asm__
volatile(
"dsb" :::
"memory");
142 uint32_t cpuclk0_hz = 0U;
void main(void)
Secure fallback main entry point.
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).
static void lcd_fb_fill(uint16_t color)
static void lcd_panic_halt(void)
static void lcd_bringup_clocks(void)
Bring up clocks, MSTP, system tick and the on-board LEDs.
static void lcd_draw_x(uint16_t color)
static display_handle_t * lcd_bringup_panel(void)
Bring up the panel through the display PAL.
@ k_lcd_x_thickness
LCD x thickness.
@ k_color_x
RGB565 yellow.
@ k_color_bg
RGB565 dark blue.
static const display_cfg_t k_lcd_draw_x_display_cfg
Display PAL config selecting the LCD backend.
@ k_lcd_powerup_delay_ms
LCD powerup delay ms.
@ k_lcd_heartbeat_ms
LCD heartbeat ms.
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.
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.
@ k_ra8_clock_id_cpuclk0
Cortex-M85 CPUCLK0.
ra8_err_t ra8_cgc_init(void)
Configure the clock tree to a safe default.
Display Platform Abstraction Layer for the RA8D2.
@ k_display_pixfmt_rgb565
16 bpp, 5/6/5 packed.
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.
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.
NVIC + ICU IELSR allocator.
void ra8_isr_globals_enable(void)
Globally enable maskable interrupts (PRIMASK = 0).
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.
Active display-panel descriptor for the EK-RA8D2 (ER-TFT070-6).
@ k_ra8_board_fb_align_bytes
GLCDC AXI burst alignment, in bytes.
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.
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.
void ra8_delay_ms(uint32_t ms)
Busy-wait for at least ms milliseconds.
Configuration descriptor passed into display_init.