esp_flash: fix the write performance regression

Also changed internal delay unit into microsecond.
This commit is contained in:
Michael (XIAO Xufeng)
2020-05-08 17:35:22 +08:00
parent f67044c822
commit 651eb1a694
5 changed files with 53 additions and 43 deletions

View File

@@ -48,8 +48,8 @@ typedef struct {
/** Called before any erase/write operations to check whether the region is limited by the OS */
esp_err_t (*region_protected)(void* arg, size_t start_addr, size_t size);
/** Delay for at least 'ms' milliseconds. Called in between 'start' and 'end'. */
esp_err_t (*delay_ms)(void *arg, unsigned ms);
/** Delay for at least 'us' microseconds. Called in between 'start' and 'end'. */
esp_err_t (*delay_us)(void *arg, unsigned us);
} esp_flash_os_functions_t;
/** @brief Structure to describe a SPI flash chip connected to the system.