31static const char*
s_tag =
"OTACMT";
ra8_err_t ra8_ota_commit_set_bank_config(uint32_t raw_value)
Implementation of ra8_ota_commit_set_bank_config() – masks reserved bits, then host shadow under RA8_...
ra8_err_t ra8_ota_commit_pending(ra8_ota_bank_t *out_target)
Read back the pending swap target (for tests + diagnostics).
static ra8_ota_bank_t s_pending_target
Bank that will be active after the next reset, when s_pending.
ra8_err_t ra8_ota_commit_get_bank_config(uint32_t *out_value)
Read back the bank-config shadow (for tests).
static bool s_pending
Whether a swap-bank request is currently armed.
ra8_err_t ra8_ota_commit_swap_bank(ra8_ota_bank_t target)
Implementation of ra8_ota_commit_swap_bank() – host shadow under RA8_OFF_TARGET; fail-closed on silic...
static uint32_t s_bank_config
Shadow of the masked bank-config register.
ra8_err_t ra8_ota_commit_reset(void)
Reset the OTA commit shadow registers to power-on defaults.
Secure-side OTA bank commit + flash-bank-config write.
@ k_ra8_ota_bank_config_allowed
Only the 2-bit BANK_SEL field.
ra8_ota_bank_t
Bank selector used by ra8_ota_commit_swap_bank.
@ k_ra8_ota_bank_b
Bank B is the next-boot target.
@ k_ra8_ota_bank_a
Bank A is the next-boot target.
static const char * s_tag
Logging / check tag.
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_not_supported
Requested feature not compiled in, not wired, or not supported by this MCU variant.
@ k_ra8_err_no_data
No application data available (e.g.
@ k_ra8_err_invalid_arg
Invalid function argument.
@ k_ra8_err_invalid_state
Module in wrong state for requested operation.
@ 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.