52static const char*
const s_tag =
"DEVCFG_XM";
61typedef enum : uint32_t {
72typedef enum : uint8_t {
73 k_ra8_devcfg_xm_blank = 0xFFU,
74} ra8_devcfg_xm_shadow_t;
94static bool s_shadow_ready =
false;
115static uint8_t* internal_devcfg_xm_shadow(
void)
117 if (!s_shadow_ready) {
118 (void)
memset(s_shadow, (
int)k_ra8_devcfg_xm_blank,
sizeof s_shadow);
119 s_shadow_ready =
true;
157 (void)
memcpy(dst, &internal_devcfg_xm_shadow()[offset], (
size_t)len);
162 const volatile uint8_t* src =
164 for (uint32_t i = 0U; i < len; i++) {
205 (void)
memcpy(&internal_devcfg_xm_shadow()[offset], src, (
size_t)len);
212 uint32_t chunk = len - done;
static const char * s_tag
Logging / check tag.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
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.
Per-device (per-unit) configuration record – schema, storage seam, two-copy resolution.
@ k_ra8_devcfg_page_bytes
Extra-MRAM program page.
@ k_ra8_devcfg_slot_bytes
Reserved slot pitch per copy.
@ k_ra8_devcfg_copy1_off
Copy 1 offset in extra-MRAM.
Error Code Definitions for ra8-firmware.
@ k_ra8_err_out_of_range
Sensor or peripheral output out of valid range.
@ 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.
Code MRAM + Extra MRAM + Option-Setting driver – core API.
ra8_err_t ra8_flash_extra_mram_write(uint32_t mram_addr, const uint8_t *src, uint32_t len)
Program 1..32 contiguous bytes into the general-purpose extra-MRAM window.
Flash / MRAM controller register layout for the Renesas RA8D2.
@ k_ra8_flash_extra_start
First legal Program target (FSBL setting).
void * memset(void *dst, int value, size_t n)
Fill memory with a constant byte value.
void * memcpy(void *dst, const void *src, size_t n)
Copy memory area between non-overlapping regions.
Dependency-injection vtable for the record backing store.