89typedef enum : uint8_t {
99typedef enum : uint8_t {
366 const uint32_t* clut,
451typedef enum : uint8_t {
473typedef enum : uint8_t {
515 const uint16_t* gain,
516 const uint16_t* threshold,
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_err_t ra8_glcdc_layer2_chroma_key_enable(uint32_t key_rgb888)
Enable chroma-key transparency on graphics layer 2.
ra8_err_t ra8_glcdc_set_brightness(uint8_t r, uint8_t g, uint8_t b)
Programme per-channel output brightness.
void(* ra8_glcdc_event_fn_t)(void *ctx, uint32_t status_mask)
GLCDC event callback (VSYNC / line detect / underflow).
ra8_err_t ra8_glcdc_attach_handler(ra8_glcdc_event_fn_t fn, void *ctx)
Attach a GLCDC event callback.
ra8_err_t ra8_glcdc_init(const ra8_glcdc_config_t *cfg)
Initialise GLCDC with the EK-RA8D2 1024x600 timings and the supplied graphics layer 1 framebuffer.
ra8_err_t ra8_glcdc_enter_stop(void)
Put GLCDC into MSTP-gated stop.
ra8_err_t ra8_glcdc_set_layer2(const ra8_glcdc_layer2_cfg_t *cfg)
Configure the Graphics 2 (background-image) layer.
ra8_err_t ra8_glcdc_set_background_color(uint32_t argb)
Set the panel-wide background colour shown where neither layer covers a pixel.
ra8_err_t ra8_glcdc_start(bool enable)
Start or stop the panel output.
ra8_err_t ra8_glcdc_clear_status(uint32_t mask)
Clear GLCDC status flags.
ra8_err_t ra8_glcdc_layer1_show(uintptr_t fb_addr)
Make graphics layer 1 visible by pointing it at a framebuffer.
ra8_err_t ra8_glcdc_set_contrast(uint8_t r, uint8_t g, uint8_t b)
Programme per-channel output contrast gain.
ra8_err_t ra8_glcdc_set_clut_double_buffered(uint8_t layer, const uint32_t *clut, uint32_t entries, bool swap_now)
Update a CLUT plane double-buffered, optionally swapping on the next vsync.
ra8_err_t ra8_glcdc_set_blend(ra8_glcdc_blend_mode_t mode, uint8_t global_alpha)
Set the layer-1-over-layer-2 blend mode and global alpha.
ra8_err_t ra8_glcdc_gamma_enable(bool enable)
Enable or disable the GLCDC gamma correction pipeline.
ra8_glcdc_color_channel_t
Selector for the three GLCDC gamma colour channels.
@ k_ra8_glcdc_ch_r
Red channel -> GAM[0].
@ k_ra8_glcdc_ch_count
Number of colour channels (sentinel).
@ k_ra8_glcdc_ch_b
Blue channel -> GAM[2].
@ k_ra8_glcdc_ch_g
Green channel -> GAM[1].
ra8_err_t ra8_glcdc_get_status(uint32_t *out_mask)
Read GLCDC status register (VSYNC/HSYNC/underflow).
ra8_glcdc_blend_mode_t
Compositing mode between Graphics 1 and Graphics 2.
@ k_ra8_blend_alpha
Per-pixel + global alpha blend (DISPSEL=10+AR).
@ k_ra8_blend_overwrite
Layer 1 fully covers layer 2 (DISPSEL=01).
@ k_ra8_blend_normal
Layer 1 over layer 2, no alpha (DISPSEL=10).
void ra8_glcdc_dispatch(void)
Dispatch a GLCDC event – snapshot + fire callback.
ra8_err_t ra8_glcdc_layer2_show(uintptr_t fb_addr, uint16_t panel_x, uint16_t panel_y, uint16_t fb_w, uint16_t fb_h)
Make graphics layer 2 visible at an arbitrary panel position.
ra8_err_t ra8_glcdc_set_gamma(ra8_glcdc_color_channel_t channel, const uint16_t *gain, const uint16_t *threshold, uint8_t count)
Programme the piecewise-linear gamma correction table for one channel.
ra8_err_t ra8_glcdc_set_dithering(ra8_glcdc_dither_mode_t mode)
Programme the output dithering mode (PDTHA.SEL).
ra8_glcdc_dither_mode_t
Output-stage dithering mode for 24bpp -> 18/16bpp panels.
@ k_ra8_dither_off
No dithering (PDTHA.SEL=0).
@ k_ra8_dither_truncate
Round/truncate (PDTHA.SEL=2).
@ k_ra8_dither_2x2
2x2 ordered dither (PDTHA.SEL=3).
ra8_err_t ra8_glcdc_deinit(void)
Tear down GLCDC (stop + MSTP release).
ra8_glcdc_gamma_lut_const_t
Piecewise-linear LUT depth constants for the GLCDC gamma correction.
@ k_ra8_glcdc_gamma_lut_depth
16 segments (8 LUT regs x 2 gains).
ra8_err_t ra8_glcdc_exit_stop(void)
Exit MSTP-gated stop.
Graphics LCD Controller (GLCDC) register layout for the RA8D2.
ra8_glcdc_pixel_fmt_t
Pixel format codes written to GRn_FLM6.FORMAT[30:28].
Minimal GLCDC configuration for a single-layer panel.
ra8_glcdc_pixel_fmt_t format
Pixel format code.
uint32_t framebuffer_addr
SRAM or SDRAM address.
ra8_glcdc_timing_t timing
Panel timing (from BSP).
uint16_t width_px
Visible width.
uint16_t height_px
Visible height.
Configuration for the background-image (Graphics 2) layer.
uint32_t framebuffer_addr
Layer-2 framebuffer base address.
uint16_t height_px
Layer-2 image height (lines).
uint16_t pos_x
Top-left X within the panel viewport.
uint16_t width_px
Layer-2 image width (pixels).
uint16_t pos_y
Top-left Y within the panel viewport.
uint32_t line_stride_bytes
Bytes between successive scan lines.
ra8_glcdc_pixel_fmt_t format
Pixel format code (FLM6.FORMAT).
uint8_t alpha
Constant alpha 0..255 (AB7.ARCDEF).
Panel RGB timing the driver programs (accessory parameters).
uint16_t v_sync
VSYNC pulse width (lines).
uint16_t v_front
Vertical front porch (lines).
uint16_t v_active
Active lines per frame.
uint16_t h_front
Horizontal front porch (px).
uint16_t h_sync
HSYNC pulse width (px clocks).
uint16_t h_active
Active pixels per line.
uint16_t h_back
Horizontal back porch (px).
uint16_t v_back
Vertical back porch (lines).