46typedef enum : uint32_t {
60static const uint8_t
s_msg_boot[] =
"touch-demo: boot\r\n";
68static const uint8_t
s_msg_fail[] =
"touch-demo: FAIL init\r\n";
76static const uint8_t
s_msg_open[] =
"touch: FAIL open\r\n";
84static const uint8_t
s_msg_pre[] =
"touch: open=OK pts=";
143 __asm__
volatile(
"bkpt #0");
145 __asm__
volatile(
"wfi");
169 buf[n] = (uint8_t)(
'0' + (value % (uint32_t)
k_td_dec_ten));
173 for (uint32_t i = 0U; i < n; i++) {
204 for (uint32_t i = 0U; (i < (uint32_t)
k_td_poll_max) && (seen == 0U); i++) {
227 uint32_t cpuclk0_hz = 0U;
278 __asm__
volatile(
"wfi");
void main(void)
Secure fallback main entry point.
static const uint8_t s_msg_boot[]
Console marker emitted after core and peripheral setup.
static const uint8_t s_msg_fail[]
Diagnostic emitted when the VFS round-trip fails.
static const uint8_t s_msg_pre[]
Prefix for the original page-count diagnostic.
static const uint8_t s_msg_eol[]
Console line terminator for the result banner.
static uint8_t internal_td_poll_points(uint16_t *out_x, uint16_t *out_y)
Poll the GT911 for one touch frame; report the first contact.
static void internal_td_setup_or_halt(void)
Bring up clocks/MSTP/time + the SCI8 console; halt on failure.
static void internal_td_panic_halt(const uint8_t *msg, uint32_t len)
Print the fail banner and trap (ra8_emulator halts on the BKPT).
static const uint8_t s_msg_x[]
Label introducing the first contact X coordinate.
static void internal_td_print_uint(uint32_t value)
Print a small unsigned integer in decimal.
static const uint8_t s_msg_y[]
Label introducing the first contact Y coordinate.
td_consts_t
Console / GT911 / poll knobs (no magic numbers).
@ k_td_poll_max
Bounded poll iterations (NASA R2).
@ k_td_max_points
Read up to the GT911 capacity.
@ k_td_dec_ten
Decimal radix / small-buf cap.
@ k_td_uart_baud
Console baud.
static void internal_td_print(const uint8_t *msg, uint32_t len)
Emit a byte run on the SCI8 console.
static const uint8_t s_msg_open[]
Fatal touch-controller open-failure banner.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Board-support layer for the Renesas EK-RA8D2 v1 evaluation kit.
ra8_err_t ra8_board_uart_console_write(const uint8_t *data, size_t len)
Polled blocking write to the J-Link OB VCOM console.
ra8_err_t ra8_board_uart_console_init(uint32_t baud)
Configure SCI8 + PD02/PD03 as the debug-console UART.
One-call bring-up of the EK-RA8D2 panel's GoodIX GT911 touch controller.
ra8_err_t ra8_board_touch_open(const ra8_board_touch_cfg_t *cfg)
Bring the on-board GT911 up and open the touch driver against it.
Boot entry points shared between a vector table and its startup code.
High-level Clock Generation Circuit driver.
ra8_err_t ra8_cgc_get_clock_hz(ra8_clock_id_t id, uint32_t *out_hz)
Query the current frequency of a clock-tree domain.
@ k_ra8_clock_id_cpuclk0
Cortex-M85 CPUCLK0.
ra8_err_t ra8_cgc_init(void)
Configure the clock tree to a safe default.
Error Code Definitions for ra8-firmware.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
NVIC + ICU IELSR allocator.
void ra8_isr_globals_enable(void)
Globally enable maskable interrupts (PRIMASK = 0).
Ref-counted Module Stop Control wrapper for the RA8D2.
ra8_err_t ra8_mstp_init(void)
Re-establish the ra8_mstp ref-count table from current hardware state.
SysTick-based tick counter, delay and timestamp helpers.
ra8_err_t ra8_time_init(uint32_t cpu_hz)
Initialise SysTick for a 1 kHz tick interrupt.
Multi-touch input driver – GoodIX GT911 backend.
ra8_err_t ra8_touch_read(ra8_touch_point_t *out_points, uint8_t max_count, uint8_t *got_count)
Drain the current touch frame.
@ k_ra8_touch_irq_pin_unset
Sentinel for "no IRQ pin attached".
The two touch settings that are an APPLICATION choice, not a board fact.
One decoded touch contact.
uint16_t x
Panel X coordinate.
uint16_t y
Panel Y coordinate.