Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
const char * g_bkup_tag
Log tag used for this driver's diagnostics.
Battery Backup Function (VBATT) HAL driver – public API.
Cross-TU shared surface for the ra8_bkup driver split.
Battery Backup Function (VBATT / BAT*) register layout for the RA8D2.
@ k_ra8_bkup_saba_align_mask
Lower-5-bits-must-be-zero mask.
@ k_ra8_bkup_saba_max
Maximum boundary address (last 32-byte slot).
static volatile uint32_t * ra8_bkup_bbfsar(void)
Pointer to 32-bit BBFSAR (HUM Ch 12.2.1 p 500).
static volatile uint16_t * ra8_bkup_vbrsabar(void)
Pointer to 16-bit VBRSABAR (HUM Ch 12.2.2 p 502).
@ k_ra8_bkup_bbfsar_mask_all
All NONSEC bits.
static volatile uint16_t * ra8_bkup_vbrpabars(void)
Pointer to 16-bit VBRPABARS (HUM Ch 12.2.3 p 502).
static volatile uint16_t * ra8_bkup_vbrpabarns(void)
Pointer to 16-bit VBRPABARNS (HUM Ch 12.2.4 p 503).
ra8_err_t ra8_bkup_security_get(ra8_bkup_security_config_t *cfg)
Read back the four security partition registers.
static ra8_err_t internal_validate_security_cfg(const ra8_bkup_security_config_t *cfg)
Validate every field of an ra8_bkup_security_config_t.
static ra8_err_t internal_validate_boundary(uint16_t addr)
Validate one boundary-address register value.
ra8_err_t ra8_bkup_security_apply(const ra8_bkup_security_config_t *cfg)
Apply BBFSAR + VBRSABAR + VBRPABAR{S,NS} from one descriptor.
Validation and Error-Checking Macros for ra8-firmware.
#define RA8_RETURN_ON_ERROR(err, tag, message)
Early return on error, propagating the code upward.
#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_invalid_arg
Invalid function argument.
@ 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.
Scoped PRCR unlock helper.
#define RA8_PROTECTED_WRITE(unlock_val)
Scoped PRCR unlock block.
@ k_ra8_prcr_unlock_sar
RA8 prcr unlock sar.
BBFSAR + backup-register boundary descriptor.
uint16_t pabans
VBRPABARNS.PABANS (32-byte aligned).
uint16_t saba
VBRSABAR.SABA (32-byte aligned).
uint32_t bbfsar
OR of k_ra8_bkup_bbfsar_mask_* bits.
uint16_t pabas
VBRPABARS.PABAS (32-byte aligned).