spi_flash: Standardise argument types & names used for flash offsets
Closes github #88: https://github.com/espressif/esp-idf/issues/88
This commit is contained in:
parent
2f9772860a
commit
ab5915ff8b
2 changed files with 14 additions and 14 deletions
|
@ -77,7 +77,7 @@ static void IRAM_ATTR spi_flash_mmap_init()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_err_t IRAM_ATTR spi_flash_mmap(uint32_t src_addr, size_t size, spi_flash_mmap_memory_t memory,
|
esp_err_t IRAM_ATTR spi_flash_mmap(size_t src_addr, size_t size, 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)
|
||||||
{
|
{
|
||||||
esp_err_t ret;
|
esp_err_t ret;
|
||||||
|
|
|
@ -78,13 +78,13 @@ esp_err_t spi_flash_erase_range(size_t start_address, size_t size);
|
||||||
* @note If source address is in DROM, this function will return
|
* @note If source address is in DROM, this function will return
|
||||||
* ESP_ERR_INVALID_ARG.
|
* ESP_ERR_INVALID_ARG.
|
||||||
*
|
*
|
||||||
* @param dest destination address in Flash. Must be a multiple of 4 bytes.
|
* @param dest_addr destination address in Flash. Must be a multiple of 4 bytes.
|
||||||
* @param src pointer to the source buffer.
|
* @param src pointer to the source buffer.
|
||||||
* @param size length of data, in bytes. Must be a multiple of 4 bytes.
|
* @param size length of data, in bytes. Must be a multiple of 4 bytes.
|
||||||
*
|
*
|
||||||
* @return esp_err_t
|
* @return esp_err_t
|
||||||
*/
|
*/
|
||||||
esp_err_t spi_flash_write(size_t dest, const void *src, size_t size);
|
esp_err_t spi_flash_write(size_t dest_addr, const void *src, size_t size);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -97,24 +97,24 @@ esp_err_t spi_flash_write(size_t dest, const void *src, size_t size);
|
||||||
* @note If source address is in DROM, this function will return
|
* @note If source address is in DROM, this function will return
|
||||||
* ESP_ERR_INVALID_ARG.
|
* ESP_ERR_INVALID_ARG.
|
||||||
*
|
*
|
||||||
* @param dest destination address in Flash. Must be a multiple of 32 bytes.
|
* @param dest_addr destination address in Flash. Must be a multiple of 32 bytes.
|
||||||
* @param src pointer to the source buffer.
|
* @param src pointer to the source buffer.
|
||||||
* @param size length of data, in bytes. Must be a multiple of 32 bytes.
|
* @param size length of data, in bytes. Must be a multiple of 32 bytes.
|
||||||
*
|
*
|
||||||
* @return esp_err_t
|
* @return esp_err_t
|
||||||
*/
|
*/
|
||||||
esp_err_t spi_flash_write_encrypted(size_t dest, const void *src, size_t size);
|
esp_err_t spi_flash_write_encrypted(size_t dest_addr, const void *src, size_t size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Read data from Flash.
|
* @brief Read data from Flash.
|
||||||
*
|
*
|
||||||
* @param src source address of the data in Flash.
|
* @param src_addr source address of the data in Flash.
|
||||||
* @param dest pointer to the destination buffer
|
* @param dest pointer to the destination buffer
|
||||||
* @param size length of data
|
* @param size length of data
|
||||||
*
|
*
|
||||||
* @return esp_err_t
|
* @return esp_err_t
|
||||||
*/
|
*/
|
||||||
esp_err_t spi_flash_read(size_t src, void *dest, size_t size);
|
esp_err_t spi_flash_read(size_t src_addr, void *dest, size_t size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enumeration which specifies memory space requested in an mmap call
|
* @brief Enumeration which specifies memory space requested in an mmap call
|
||||||
|
@ -149,7 +149,7 @@ typedef uint32_t spi_flash_mmap_handle_t;
|
||||||
*
|
*
|
||||||
* @return ESP_OK on success, ESP_ERR_NO_MEM if pages can not be allocated
|
* @return ESP_OK on success, ESP_ERR_NO_MEM if pages can not be allocated
|
||||||
*/
|
*/
|
||||||
esp_err_t spi_flash_mmap(uint32_t src_addr, size_t size, spi_flash_mmap_memory_t memory,
|
esp_err_t spi_flash_mmap(size_t src_addr, size_t size, 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);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue