Erase a specified portion of SPI Flash.
.
* #include "spi_flash.h"
*
* #define DATA_TO_REPLACE "THIS IS A NEW SECTOR IN FLASH"
*
* {
*
uint32 u32FlashTotalSize = 0;
*
* {
* printf("Unable to enter download mode\r\n");
* }
* else
* {
* }
*
*
while((u32FlashTotalSize > u32FlashOffset) && (
M2M_SUCCESS == ret))
* {
* {
* printf("Unable to read SPI sector\r\n");
* break;
* }
* memcpy(au8FlashContent, DATA_TO_REPLACE, strlen(DATA_TO_REPLACE));
*
* {
* printf("Unable to erase SPI sector\r\n");
* break;
* }
*
* {
* printf("Unable to write SPI sector\r\n");
* break;
* }
* }
*
* {
* printf("Successful operations\r\n");
* }
* else
* {
* printf("Failed operations\r\n");
* }
*
* while(1);
* }
*