mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 20:54:32 +02:00
spi_flash: use same argument types in .h and .c files
Fixes compilations on targets where size_t != uint32_t
This commit is contained in:
@@ -208,7 +208,7 @@ esp_err_t IRAM_ATTR spi_flash_erase_sector(size_t sec)
|
|||||||
|
|
||||||
#ifdef CONFIG_SPI_FLASH_USE_LEGACY_IMPL
|
#ifdef CONFIG_SPI_FLASH_USE_LEGACY_IMPL
|
||||||
//deprecated, only used in compatible mode
|
//deprecated, only used in compatible mode
|
||||||
esp_err_t IRAM_ATTR spi_flash_erase_range(uint32_t start_addr, uint32_t size)
|
esp_err_t IRAM_ATTR spi_flash_erase_range(size_t start_addr, size_t size)
|
||||||
{
|
{
|
||||||
CHECK_WRITE_ADDRESS(start_addr, size);
|
CHECK_WRITE_ADDRESS(start_addr, size);
|
||||||
if (start_addr % SPI_FLASH_SEC_SIZE != 0) {
|
if (start_addr % SPI_FLASH_SEC_SIZE != 0) {
|
||||||
|
@@ -260,7 +260,7 @@ esp_err_t esp_partition_write(const esp_partition_t* partition,
|
|||||||
* or one of error codes from lower-level flash driver.
|
* or one of error codes from lower-level flash driver.
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_partition_erase_range(const esp_partition_t* partition,
|
esp_err_t esp_partition_erase_range(const esp_partition_t* partition,
|
||||||
uint32_t start_addr, uint32_t size);
|
size_t start_addr, size_t size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Configure MMU to map partition into data memory
|
* @brief Configure MMU to map partition into data memory
|
||||||
@@ -287,7 +287,7 @@ esp_err_t esp_partition_erase_range(const esp_partition_t* partition,
|
|||||||
*
|
*
|
||||||
* @return ESP_OK, if successful
|
* @return ESP_OK, if successful
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_partition_mmap(const esp_partition_t* partition, uint32_t offset, uint32_t size,
|
esp_err_t esp_partition_mmap(const esp_partition_t* partition, size_t offset, size_t size,
|
||||||
spi_flash_mmap_memory_t memory,
|
spi_flash_mmap_memory_t memory,
|
||||||
const void** out_ptr, spi_flash_mmap_handle_t* out_handle);
|
const void** out_ptr, spi_flash_mmap_handle_t* out_handle);
|
||||||
|
|
||||||
|
@@ -418,7 +418,7 @@ esp_err_t esp_partition_erase_range(const esp_partition_t* partition,
|
|||||||
* we can add esp_partition_mmapv which will accept an array of offsets and sizes, and return array of
|
* we can add esp_partition_mmapv which will accept an array of offsets and sizes, and return array of
|
||||||
* mmaped pointers, and a single handle for all these regions.
|
* mmaped pointers, and a single handle for all these regions.
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_partition_mmap(const esp_partition_t* partition, uint32_t offset, uint32_t size,
|
esp_err_t esp_partition_mmap(const esp_partition_t* partition, size_t offset, size_t size,
|
||||||
spi_flash_mmap_memory_t memory,
|
spi_flash_mmap_memory_t memory,
|
||||||
const void** out_ptr, spi_flash_mmap_handle_t* out_handle)
|
const void** out_ptr, spi_flash_mmap_handle_t* out_handle)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user