From b9f8e8a648bd37a3685720f03e339a1384dc107d Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 10 Mar 2016 15:59:36 +1100 Subject: [PATCH] spi_flash.h: Add note that pointers need to be word-aligned --- include/espressif/spi_flash.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/espressif/spi_flash.h b/include/espressif/spi_flash.h index df21f34..44c8677 100644 --- a/include/espressif/spi_flash.h +++ b/include/espressif/spi_flash.h @@ -31,7 +31,7 @@ sdk_SpiFlashOpResult sdk_spi_flash_erase_sector(uint16_t sec); /* Write data to flash. des_addr is byte offset to write to. Should be 4-byte aligned. - src is pointer to a buffer to read bytes from. + src is pointer to a buffer to read bytes from. Should be 4-byte aligned. size is length of buffer in bytes. Should be a multiple of 4. */ sdk_SpiFlashOpResult sdk_spi_flash_write(uint32_t des_addr, const void *src, uint32_t size); @@ -39,7 +39,7 @@ sdk_SpiFlashOpResult sdk_spi_flash_write(uint32_t des_addr, const void *src, uin /* Read data from flash. src_addr is byte offset to read from. Should be 4-byte aligned. - des is pointer to a buffer to read bytes into. + des is pointer to a buffer to read bytes into. Should be 4-byte aligned. size is number of bytes to read. Should be a multiple of 4. */ sdk_SpiFlashOpResult sdk_spi_flash_read(uint32_t src_addr, void *des, uint32_t size);