33static const char*
s_tag =
"GLCDC";
51typedef enum : uint8_t {
85 const uint8_t lo_idx = (uint8_t)(hi_idx + 1U);
117 const uint8_t lo_idx = (uint8_t)(hi_idx + 1U);
118 const uint32_t packed =
122 gam->
AREA[i] = packed;
132 const uint16_t* gain,
133 const uint16_t* threshold,
static const char * s_tag
Logging / check tag.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Validation and Error-Checking Macros for ra8-firmware.
#define RA8_CHECK_NULL_PTR(ptr, tag, message)
Reject nullptr pointer, returning k_ra8_err_null_ptr.
Error Code Definitions for ra8-firmware.
@ k_ra8_err_invalid_arg
Invalid function argument.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Graphics LCD Controller driver (two-layer with alpha blending).
ra8_glcdc_color_channel_t
Selector for the three GLCDC gamma colour channels.
@ k_ra8_glcdc_ch_count
Number of colour channels (sentinel).
@ k_ra8_glcdc_gamma_lut_depth
16 segments (8 LUT regs x 2 gains).
ra8_err_t ra8_glcdc_gamma_enable(bool enable)
Enable or disable the GLCDC gamma correction pipeline.
static void internal_write_area(volatile ra8_glcdc_gam_t *gam, const uint16_t *threshold)
Write one channel's 8 AREA (threshold-pair) registers.
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_glcdc_gam_reg_count_t
Number of LUT and AREA registers per gamma channel block.
@ k_ra8_glcdc_gam_reg_count
LUT/AREA registers per channel (depth/2).
@ k_ra8_glcdc_gam_pair_step
Entries packed per register (2 per reg).
static void internal_write_lut(volatile ra8_glcdc_gam_t *gam, const uint16_t *gain)
Write one channel's 8 LUT (gain-pair) registers.
Graphics LCD Controller (GLCDC) register layout for the RA8D2.
static volatile ra8_glcdc_gam_t * ra8_glcdc_gam_regs(uint8_t channel_idx)
Return a volatile pointer to a per-channel gamma register block.
@ k_ra8_glcdc_off_out_gamsw
OUT.GAMSW: gamma enable switch.
static volatile uint32_t * ra8_glcdc_reg32(ra8_glcdc_block_off_t offset)
Pointer to a 32-bit register inside the GLCDC block.
@ k_ra8_glcdc_gamsw_gamon
GAMSW.GAMON: global gamma enable.
@ k_ra8_glcdc_gam_area_th_h_shift
AREA TH1 bit-shift.
@ k_ra8_glcdc_gam_area_th_l_mask
AREA TH2 10-bit mask.
@ k_ra8_glcdc_gam_lut_gain_l_mask
LUT GAIN1 11-bit mask.
@ k_ra8_glcdc_gam_lut_gain_h_shift
LUT GAIN0 bit-shift.
Lightweight Logging Interface for ra8-firmware.
#define ra8_log_info_val(tag, message, value)
RA8 log info val.
Per-channel gamma correction register block (HUM Ch 63 p 3789-3793).
volatile uint32_t LUT[8]
Gain-pair registers LUT[0..7].
volatile uint32_t AREA[8]
Threshold-pair registers AREA[0..7].