111#define RA8_PROTECTED_WRITE(unlock_val) \
112 for (uint32_t ra8_prot_once_ = ra8_prot_scope_begin((uint16_t)(unlock_val)); \
113 ra8_prot_once_ != 0U; \
114 ra8_prot_once_ = ra8_prot_scope_end())
static uint32_t ra8_prot_scope_begin(uint16_t unlock_val)
Open a scoped PRCR unlock: write unlock_val, return the loop flag.
static uint32_t ra8_prot_scope_end(void)
Close a scoped PRCR unlock: re-lock every group, return the exit flag.
System Control (SYSC) register layout for the Renesas RA8D2.
static void ra8_sys_prcr_lock_all(void)
Re-lock every protection group (write password with all group bits clear).
static volatile uint16_t * ra8_sys_prcr(void)
Get pointer to the 16-bit PRCR register.