refactor(cache): abstract cache rom API in cache_ll.h

This commit is contained in:
gaoxu
2023-08-07 15:20:00 +08:00
committed by Gao Xu
parent db4308888d
commit fd759d65b0
9 changed files with 1331 additions and 172 deletions

View File

@@ -8,6 +8,12 @@
static uint32_t s_cache_status[2];
/**
* On ESP32, The cache_hal_suspend()/cache_hal_resume() are replacements
* for Cache_Read_Disable()/Cache_Read_Enable() in ROM.
* There's a bug that Cache_Read_Disable requires a call to Cache_Flush
* before Cache_Read_Enable, even if cached data was not modified.
*/
void cache_hal_suspend(cache_type_t type)
{
s_cache_status[0] = cache_ll_l1_get_enabled_bus(0);