Add comment for the procedure of downloading device controller.
This commit is contained in:
parent
61afdfc325
commit
c7acc2a99b
32
update.cpp
32
update.cpp
@ -376,6 +376,38 @@ bool Update::downloadBinaryToDC(QString const &bFile) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
Using the DC bootloader:
|
||||
1 : bl_reboot() // send to application, want DC2 to reset (in order to start
|
||||
// the bootloader)
|
||||
2 : bl_startBL(): // send within 4s after DC poewer-on, otherwise bl is left
|
||||
3 : bl_check(): // send command to verify if bl is up
|
||||
4 : bl_isUp(): // returns true if bl is up and running
|
||||
|
||||
5 : bl_sendAddress(blockNumber)
|
||||
// send start address, nr of 64-byte block, start with 0
|
||||
// will be sent only for following block-numbers:
|
||||
// 0, 1024, 2048, 3072 and 4096, so basically every 64kByte
|
||||
// for other addresses nothing happens
|
||||
|
||||
6 : bl_wasSendingAddOK()
|
||||
// return val: 0: no response by now
|
||||
// 1: error
|
||||
// 10: OK
|
||||
|
||||
7 : bl_sendDataBlock()
|
||||
// send 64 byte from bin file
|
||||
|
||||
8 : bl_sendLastBlock()
|
||||
// send this command after all data are transferred
|
||||
|
||||
9 : bl_wasSendingDataOK()
|
||||
// return val: 0: no response by now
|
||||
// 1: error
|
||||
// 10: OK
|
||||
|
||||
10 : bl_stopBL() // leave bl and start (the new) application
|
||||
*/
|
||||
bool Update::updateBinary(char const *fileToSendToDC) {
|
||||
qInfo() << "updating device controller binary" << fileToSendToDC;
|
||||
QFile fn(fileToSendToDC);
|
||||
|
Loading…
Reference in New Issue
Block a user