diff --git a/components/spi_flash/include/esp_flash.h b/components/spi_flash/include/esp_flash.h index d100c57ffe..1f64347c3c 100644 --- a/components/spi_flash/include/esp_flash.h +++ b/components/spi_flash/include/esp_flash.h @@ -57,7 +57,7 @@ typedef struct { esp_err_t (*region_protected)(void* arg, size_t start_addr, size_t size); /** Delay for at least 'us' microseconds. Called in between 'start' and 'end'. */ - esp_err_t (*delay_us)(void *arg, unsigned us); + esp_err_t (*delay_us)(void *arg, uint32_t us); /** Called for get temp buffer when buffer from application cannot be directly read into/write from. */ void *(*get_temp_buffer)(void* arg, size_t reqest_size, size_t* out_size); diff --git a/components/spi_flash/include/spi_flash_chip_driver.h b/components/spi_flash/include/spi_flash_chip_driver.h index c0b19badf4..7d875b4c10 100644 --- a/components/spi_flash/include/spi_flash_chip_driver.h +++ b/components/spi_flash/include/spi_flash_chip_driver.h @@ -152,7 +152,7 @@ struct spi_flash_chip_t { timeout_ms should be a timeout (in milliseconds) before the function returns ESP_ERR_TIMEOUT. This is useful to avoid hanging if the chip is otherwise unresponsive (ie returns all 0xFF or similar.) */ - esp_err_t (*wait_idle)(esp_flash_t *chip, unsigned timeout_ms); + esp_err_t (*wait_idle)(esp_flash_t *chip, uint32_t timeout_us); /* Configure both the SPI host and the chip for the read mode specified in chip->read_mode. * diff --git a/components/spi_flash/spi_flash_os_func_app.c b/components/spi_flash/spi_flash_os_func_app.c index 8cd343731d..833d778067 100644 --- a/components/spi_flash/spi_flash_os_func_app.c +++ b/components/spi_flash/spi_flash_os_func_app.c @@ -96,7 +96,7 @@ static IRAM_ATTR esp_err_t spi1_end(void *arg) #endif } -static IRAM_ATTR esp_err_t delay_us(void *arg, unsigned us) +static IRAM_ATTR esp_err_t delay_us(void *arg, uint32_t us) { esp_rom_delay_us(us); return ESP_OK; diff --git a/components/spi_flash/spi_flash_os_func_noos.c b/components/spi_flash/spi_flash_os_func_noos.c index 28b4195eca..b36ff345f1 100644 --- a/components/spi_flash/spi_flash_os_func_noos.c +++ b/components/spi_flash/spi_flash_os_func_noos.c @@ -64,7 +64,7 @@ static IRAM_ATTR esp_err_t end(void *arg) return ESP_OK; } -static IRAM_ATTR esp_err_t delay_us(void *arg, unsigned us) +static IRAM_ATTR esp_err_t delay_us(void *arg, uint32_t us) { esp_rom_delay_us(us); return ESP_OK;