|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
E-ink backend (IT8951) for the display PAL. More...
Go to the source code of this file.
Functions | |
| uint8_t | ra8_display_pal_eink_luma_from_rgb565 (uint16_t px) |
| Convert one RGB565 pixel to an 8 bpp greyscale (Rec.601 luma). | |
Variables | |
| const display_backend_iface_t | k_display_backend_eink_it8951 |
| E-ink (IT8951) backend vtable. | |
E-ink backend (IT8951) for the display PAL.
Exports the const display_backend_iface_t instance that drives an IT8951-compatible e-ink panel through libs/ra8_hal/src/ra8_epaper.c. Apps select this backend by setting display_cfg_t.iface = &k_display_backend_eink_it8951; and pass the BSP's IT8951 descriptor (a const ra8_epaper_cfg_t*) through display_cfg_t.panel_timing. The backend accepts the same canonical RGB565 framebuffer the LCD backend uses, so swapping panels is a config change – the app's drawing code is unchanged.
On display_flush the backend converts the requested rectangle from RGB565 to the IT8951's native 8 bpp greyscale (Rec.601 luma) and pushes it to the controller, then refreshes with the waveform mapped from the caller's display_refresh_hint_t (fast -> A2, quality -> GC16, init -> INIT). On-panel HIL validation needs an IT8951 panel on the bench; the vtable + conversion are host-verified against the fake-backed ra8_epaper driver.
Definition in file ra8_display_pal_eink.h.
| uint8_t ra8_display_pal_eink_luma_from_rgb565 | ( | uint16_t | px | ) |
Convert one RGB565 pixel to an 8 bpp greyscale (Rec.601 luma).
Internal-but-exposed so host unit tests can pin the conversion the e-ink flush path relies on. Expands the 5/6/5 channels to 8 bits by bit-replication, then applies the integer Rec.601 weights (77/150/29, /256). Pure white maps to 255 and pure black to 0.
| [in] | px | Source pixel in RGB565 (little-endian field layout). |
| 0 | For px == 0x0000 (black). |
| 255 | For px == 0xFFFF (white). |
Definition at line 122 of file ra8_display_pal_eink.c.
References k_eink_b5_mask, k_eink_g6_mask, k_eink_g6_shift, k_eink_luma_b, k_eink_luma_g, k_eink_luma_r, k_eink_luma_shift, k_eink_r5_mask, and k_eink_r5_shift.
Referenced by internal_eink_pack_row_4bpp().
|
extern |
E-ink (IT8951) backend vtable.
init brings up the IT8951 over SPI via ra8_epaper_init (using the ra8_epaper_cfg_t supplied in display_cfg_t.panel_timing); get_framebuffer hands back the app's RGB565 buffer; flush converts the dirty rectangle to 8 bpp luma and refreshes the panel; clear fills the framebuffer; deinit sleeps the panel.
Definition at line 645 of file ra8_display_pal_eink.c.
Referenced by main().