ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_gfx_internal.h
Go to the documentation of this file.
1
19
20#pragma once
21
22#include <stddef.h>
23#include <stdint.h>
24
25#include "ra8_attributes.h"
26#include "ra8_gfx.h"
27
32typedef struct {
33 uint8_t* fb;
34 uint16_t width;
35 uint16_t height;
37 uint8_t bpp;
39 int32_t clip_x0;
40 int32_t clip_y0;
41 int32_t clip_x1;
42 int32_t clip_y1;
44
59
78RA8_PRIV uint16_t priv_gfx_text_pack_565(uint32_t color);
79
98RA8_PRIV void priv_gfx_text_plot(int32_t x, int32_t y, uint32_t color);
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
Software 2D graphics primitives layered on top of a caller-ownedframebuffer (DRW / D/AVE 2D / GLCDC r...
ra8_gfx_format_t
Pixel format of the framebuffer bound by ra8_gfx_init().
Definition ra8_gfx.h:39
ra8_gfx_state_t g_gfx_text_state
Single module-wide framebuffer binding shared by every ra8_gfx TU.
void priv_gfx_text_plot(int32_t x, int32_t y, uint32_t color)
Plot a single pixel with bounds checking against the active clip.
uint16_t priv_gfx_text_pack_565(uint32_t color)
Pack a 32-bit colour into a single RGB565 word.
Internal module state populated by ra8_gfx_init().
uint8_t * fb
Framebuffer base.
uint16_t width
Width in pixels.
uint8_t bpp
Bytes per pixel.
bool initialized
Set after a successful init.
int32_t clip_y1
Clip bottom (exclusive), within [0,h].
int32_t clip_x1
Clip right (exclusive), within [0,w].
int32_t clip_x0
Clip left (inclusive), within [0,width].
int32_t clip_y0
Clip top (inclusive), within [0,height].
uint16_t height
Height in pixels.
ra8_gfx_format_t format
Pixel format.