spi_flash_guard_funcs_t struct
Structure holding SPI flash access critical sections management functions. Flash API uses two types of flash access management functions: 1) Functions which prepare/restore flash cache and interrupts before calling appropriate ROM functions (SPIWrite, SPIRead and SPIEraseBlock): - 'start' function should disables flash cache and non-IRAM interrupts and is invoked before the call to one of ROM function above. - 'end' function should restore state of flash cache and non-IRAM interrupts and is invoked after the call to one of ROM function above. These two functions are not recursive. Different versions of the guarding functions should be used depending on the context of execution (with or without functional OS). In normal conditions when flash API is called from task the functions use OS primitives. When there is no OS at all or when it is not guaranteed that OS is functional (accessing flash from exception handler) these functions cannot use OS primitives or even does not need them (multithreaded access is not possible).
Fields
critical section start function.
critical section end function.
![]()
typedef struct {