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_PICO_SUPPORT_MULTICORE_LOCKOUT
113#if LIB_PICO_MULTICORE
114#define PICO_FLASH_SAFE_EXECUTE_PICO_SUPPORT_MULTICORE_LOCKOUT 1
119 bool (*core_init_deinit)(
bool init);
120 int (*enter_safe_zone_timeout_ms)(uint32_t timeout_ms);
121 int (*exit_safe_zone_timeout_ms)(uint32_t timeout_ms);
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:64
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:74
bool flash_safe_execute_core_deinit(void)
De-initialize work done by flash_safe_execute_core_init.
Definition: flash.c:69
flash_safety_helper_t * get_flash_safety_helper(void)
Internal method to return the flash safety helper implementation.
Definition: flash.c:60