DFU now uses absolute address for DFU persistent flag (similar to role-change) to try and improve resilience to code/tools changes.

This commit is contained in:
Ross Owen
2015-06-26 11:28:34 +01:00
parent d43c17a5c8
commit 90a91d5da4
4 changed files with 40 additions and 21 deletions

View File

@@ -575,14 +575,11 @@ void Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl,
/* This will return 1 if reset requested */
result = DFUDeviceRequests(ep0_out, &ep0_in, &sp, null, g_interfaceAlt[sp.wIndex], dfuInterface, &reset);
if(reset && result == XUD_RES_OKAY)
if(reset)
{
DFUDelay(50000000);
device_reboot(c_audioControl);
}
/* TODO we should not make the assumption that all DFU requests are handled */
//result = 0;
}
#endif
/* Check for: - Audio CONTROL interface request - always 0, note we check for DFU first