mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
spi_flash: Expose an accessor the current SPI flash guard functions
Change places which uses g_flash_guard_default_ops to use this. Probably exact same data, but a bit cleaner.
This commit is contained in:
parent
6e9b9c95df
commit
7c74ed8638
@ -95,6 +95,11 @@ void IRAM_ATTR spi_flash_guard_set(const spi_flash_guard_funcs_t *funcs)
|
||||
s_flash_guard_ops = funcs;
|
||||
}
|
||||
|
||||
const spi_flash_guard_funcs_t *IRAM_ATTR spi_flash_guard_get()
|
||||
{
|
||||
return s_flash_guard_ops;
|
||||
}
|
||||
|
||||
size_t IRAM_ATTR spi_flash_get_chip_size()
|
||||
{
|
||||
return g_rom_flashchip.chip_size;
|
||||
|
@ -297,6 +297,15 @@ typedef struct {
|
||||
*/
|
||||
void spi_flash_guard_set(const spi_flash_guard_funcs_t* funcs);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get the guard functions used for flash access
|
||||
*
|
||||
* @return The guard functions that were set via spi_flash_guard_set(). These functions
|
||||
* can be called if implementing custom low-level SPI flash operations.
|
||||
*/
|
||||
const spi_flash_guard_funcs_t *spi_flash_guard_get();
|
||||
|
||||
/**
|
||||
* @brief Default OS-aware flash access guard functions
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user