ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_sdfont.h
Go to the documentation of this file.
1
51#pragma once
52
53#include <stdint.h>
54
55#include "ra8_err.h"
56#include "ra8_port_constants.h"
57
75
104
145[[nodiscard]] ra8_err_t ra8_sdfont_load(const ra8_sdfont_cfg_t* cfg,
146 uint8_t* buf,
147 uint32_t cap,
148 uint32_t* out_len,
149 ra8_sdfont_source_t* out_source);
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
Typed Port / Pin Constants for the RA8D2 IOPORT Module.
ra8_port_pin_t
Packed (port << 8) | pin pin identifier.
ra8_err_t ra8_sdfont_load(const ra8_sdfont_cfg_t *cfg, uint8_t *buf, uint32_t cap, uint32_t *out_len, ra8_sdfont_source_t *out_source)
Mount the Pmod SD card and load a font, provisioning it if absent.
Definition ra8_sdfont.c:392
ra8_sdfont_source_t
Provenance of the font bytes returned by ra8_sdfont_load.
Definition ra8_sdfont.h:70
@ k_ra8_sdfont_source_card
File already on the card; read as-is.
Definition ra8_sdfont.h:71
@ k_ra8_sdfont_source_provisioned
File was absent; written from the blob, then read back from the card.
Definition ra8_sdfont.h:72
SD-card font-store bus description + provisioning policy.
Definition ra8_sdfont.h:92
ra8_port_pin_t copi
Controller-Out / Peripheral-In pin.
Definition ra8_sdfont.h:96
uint32_t provision_len
Length of provision_blob in bytes.
Definition ra8_sdfont.h:102
ra8_port_pin_t sck
SPI clock pin.
Definition ra8_sdfont.h:94
ra8_port_pin_t cipo
Controller-In / Peripheral-Out pin.
Definition ra8_sdfont.h:95
uint8_t spi_channel
SCI channel in Simple-SPI mode (Pmod2 = SCI0 = 0).
Definition ra8_sdfont.h:93
ra8_port_pin_t cs
Chip-select pin, driven as a GPIO output.
Definition ra8_sdfont.h:97
const char * filename
8.3 file to load; NULL selects "FONT.OTF".
Definition ra8_sdfont.h:99
const uint8_t * provision_blob
Fallback font written if the file is absent; NULL disables provisioning (read-only load).
Definition ra8_sdfont.h:100
uint32_t pclka_hz
PCLKA rate (Hz) feeding the SCI baud divider.
Definition ra8_sdfont.h:98