81typedef enum : uint32_t {
96typedef enum : uint8_t {
107typedef enum : uint16_t {
118#ifndef RA8_OFF_TARGET
146 __asm__
volatile(
"wfi");
171 uint32_t len = (uint32_t)
strlen(s);
190 uint32_t cpuclk0_hz = 0U;
209#ifndef RA8_OFF_TARGET
230 .use_external_osc = 1U,
231 .deep_sleep_enable = 0U,
316 (void)first_unused_memory;
348#ifndef RA8_OFF_TARGET
void main(void)
Secure fallback main entry point.
Apache NimBLE HCI transport adapter against the ra8_ble HCI ring.
ra8_err_t ble_hci_ra8_ble_init(void)
Attach the adapter to the ra8_ble HCI ring.
static TX_THREAD s_demo_thread
static void internal_demo_panic_halt(void)
Halt forever in WFI.
demo_config_t
Compile-time settings for the HTTPS client demo.
@ k_demo_thread_stack
Demo thread stack.
static void internal_demo_thread_entry(ULONG thread_input)
ThreadX worker entry: bring NetX up, run TLS session, dump body.
static UCHAR s_demo_stack[k_demo_thread_stack]
void tx_application_define(void *first_unused_memory)
ThreadX system-define hook: build worker thread + byte pool.
static const char * s_demo_tag
Tag used in SCI8 / ra8_log output to identify this app.
static uint8_t s_demo_battery_level
Current battery percentage value (mirrored to GATT cache).
static void internal_demo_tick_battery(void)
Tick the battery shadow value.
static CHAR s_demo_thread_name[]
Persistent mutable name retained by the ThreadX thread control block.
@ k_demo_thread_prio
ThreadX priority + threshold.
@ k_demo_tick_ms
Battery decrement period.
static void internal_demo_ble_or_halt(void)
Bring the BLE controller + NimBLE adapter up.
demo_uuid_t
16-bit UUID handles for the Battery Service.
@ k_demo_uuid_battery_service
Battery Service.
@ k_demo_uuid_battery_level
Battery Level char.
static void internal_demo_clocks_or_halt(void)
Bring CGC + SysTick + SCI8 + GPIO basics up.
static const char s_demo_local_name[]
Local-name string broadcast in adv-data.
demo_battery_t
Battery Level characteristic policy.
@ k_demo_battery_step
Decrement amount per tick.
@ k_demo_battery_min
Minimum percentage (rolls to max).
@ k_demo_battery_init
Initial reading at boot.
@ k_demo_battery_max
Maximum percentage.
static void internal_demo_log(const char *s)
Send a NUL-terminated ASCII line over SCI8 (best-effort).
NimBLE Native Porting Layer mapping onto Eclipse ThreadX.
void nimble_port_init(void)
Bring the NimBLE host port up.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
BLE HCI transport seam (host-side).
ra8_err_t ra8_ble_open(const ra8_ble_config_t *cfg)
Power up the BLE controller and open the HCI mailbox.
ra8_err_t ra8_ble_dispatch(void)
Pump the HCI receive path – call from ISR or main loop.
Board-support layer for the Renesas EK-RA8D2 v1 evaluation kit.
ra8_err_t ra8_board_led_toggle(ra8_board_led_id_t led)
Toggle led's output state.
ra8_err_t ra8_board_led_init(ra8_board_led_id_t led)
Configure led as a digital output, initial level low (off).
@ k_ra8_board_led1
LED1, BLUE, P600 (jumper E27).
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.
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.
size_t strlen(const char *s)
Calculate string length.
NVIC + ICU IELSR allocator.
void ra8_isr_globals_enable(void)
Globally enable maskable interrupts (PRIMASK = 0).
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.
unsigned int UINT
ThreadX-compatible unsigned int (host stub).
char CHAR
ThreadX-compatible CHAR (host stub).
unsigned long ULONG
ThreadX-compatible unsigned long (host stub).
Opaque thread stand-in for the host build.
Configuration passed to ra8_ble_open.