mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-23 03:39:33 +00: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:
committed by
Angus Gratton
parent
e72e5a9706
commit
7a924bd85a
@@ -105,7 +105,7 @@ TEST_CASE("heap_caps metadata test", "[heap]")
|
||||
*/
|
||||
static IRAM_ATTR __attribute__((noinline)) bool iram_malloc_test()
|
||||
{
|
||||
g_flash_guard_default_ops.start(); // Disables flash cache
|
||||
spi_flash_guard_get()->start(); // Disables flash cache
|
||||
|
||||
bool result = true;
|
||||
void *x = heap_caps_malloc(64, MALLOC_CAP_32BIT);
|
||||
@@ -114,7 +114,7 @@ static IRAM_ATTR __attribute__((noinline)) bool iram_malloc_test()
|
||||
result = result && (y != NULL);
|
||||
heap_caps_free(y);
|
||||
|
||||
g_flash_guard_default_ops.end(); // Re-enables flash cache
|
||||
spi_flash_guard_get()->end(); // Re-enables flash cache
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user