87int flash_safe_execute(
void (*func)(
void *),
void *param, uint32_t enter_exit_timeout_ms);
90#ifndef PICO_FLASH_ASSERT_ON_UNSAFE
91#define PICO_FLASH_ASSERT_ON_UNSAFE 1
95#ifndef PICO_FLASH_ASSUME_CORE0_SAFE
96#define PICO_FLASH_ASSUME_CORE0_SAFE 0
100#ifndef PICO_FLASH_ASSUME_CORE1_SAFE
101#define PICO_FLASH_ASSUME_CORE1_SAFE 0
105#ifndef PICO_FLASH_SAFE_EXECUTE_SUPPORT_FREERTOS_SMP
106#if LIB_FREERTOS_KERNEL && FREE_RTOS_KERNEL_SMP
107#define PICO_FLASH_SAFE_EXECUTE_SUPPORT_FREERTOS_SMP 1
112#ifndef PICO_FLASH_SAFE_EXECUTE_SUPPORT_MULTICORE_LOCKOUT
113#ifdef PICO_FLASH_SAFE_EXECUTE_PICO_SUPPORT_MULTICORE_LOCKOUT
115#define PICO_FLASH_SAFE_EXECUTE_SUPPORT_MULTICORE_LOCKOUT PICO_FLASH_SAFE_EXECUTE_PICO_SUPPORT_MULTICORE_LOCKOUT
116#elif LIB_PICO_MULTICORE
117#define PICO_FLASH_SAFE_EXECUTE_SUPPORT_MULTICORE_LOCKOUT 1
bool flash_safe_execute_core_init(void)
Initialize a core such that the other core can lock it out during flash_safe_execute.
Definition flash.c:65
int flash_safe_execute(void(*func)(void *), void *param, uint32_t enter_exit_timeout_ms)
Execute a function with IRQs disabled and with the other core also not executing/reading flash.
Definition flash.c:75
bool flash_safe_execute_core_deinit(void)
De-initialize work done by flash_safe_execute_core_init.
Definition flash.c:70
flash_safety_helper_t * get_flash_safety_helper(void)
Internal method to return the flash safety helper implementation.
Definition flash.c:61
Helper interface for coordinating safe flash access across cores.
Definition flash.h:127
bool(* core_init_deinit)(bool init)
Initialize (init=true) or de-initialise (init=false) this core's participation in flash safety.
Definition flash.h:128
int(* exit_safe_zone_timeout_ms)(uint32_t timeout_ms)
Exit the safe zone, unblocking the other core, waiting up to timeout_ms milliseconds.
Definition flash.h:130
int(* enter_safe_zone_timeout_ms)(uint32_t timeout_ms)
Enter the safe zone, blocking until safe or until timeout_ms milliseconds elapse.
Definition flash.h:129