Bsongis/horus flash external device (#4446)

* CMake options changed to UNEXPECTED_SHUTDOWN=YES/NO and  PWR_BUTTON=PRESS/SWITCH

* [X12S / X10] Flash an external device is now OK
This commit is contained in:
Bertrand Songis
2017-02-12 21:04:46 +01:00
committed by Andre Bernet
parent 808d7749c7
commit b9bb831b7f
25 changed files with 107 additions and 158 deletions
+1 -4
View File
@@ -41,9 +41,6 @@ void bootloaderFlash(const char * filename)
uint8_t buffer[1024];
UINT count;
lcdClear();
drawProgressBar(STR_WRITING);
static uint8_t unlocked = 0;
if (!unlocked) {
unlocked = 1;
@@ -63,7 +60,7 @@ void bootloaderFlash(const char * filename)
for (int j=0; j<1024; j+=FLASH_PAGESIZE) {
flashWrite(CONVERT_UINT_PTR(FIRMWARE_ADDRESS+i+j), (uint32_t *)(buffer+j));
}
updateProgressBar(i, BOOTLOADER_SIZE);
drawProgressBar(STR_WRITING, i, BOOTLOADER_SIZE);
SIMU_SLEEP(30/*ms*/);
}