mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-11-08 21:05:59 +03:00
DFU: Set 10ms bwPollTimeout (lowest possible as per spec)
This commit is contained in:
1 parent
91fc40240e
commit
ac4f66e5d1
2 files changed
+4
-2
No files matched your search
@@ -64,6 +64,7 @@ static __dfufunc void handle_getstatus(void)
|
||||
{
|
||||
/* has to be static as USBD_Write is async ? */
|
||||
static struct dfu_status dstat;
|
||||
static const uint8_t poll_timeout_10ms[] = { 10, 0, 0 };
|
||||
|
||||
dfu_drv_updstatus();
|
||||
|
||||
@@ -71,7 +72,7 @@ static __dfufunc void handle_getstatus(void)
|
||||
dstat.bStatus = g_dfu->status;
|
||||
dstat.bState = g_dfu->state;
|
||||
dstat.iString = 0;
|
||||
/* FIXME: set dstat.bwPollTimeout */
|
||||
memcpy(&dstat.bwPollTimeout, poll_timeout_10ms, sizeof(dstat.bwPollTimeout));
|
||||
|
||||
TRACE_DEBUG("handle_getstatus(%u, %u)\n\r", dstat.bStatus, dstat.bState);
|
||||
|
||||
|
||||
@@ -45,12 +45,13 @@ static __dfufunc void handle_getstatus(void)
|
||||
{
|
||||
/* has to be static as USBD_Write is async ? */
|
||||
static struct dfu_status dstat;
|
||||
static const uint8_t poll_timeout_10ms[] = { 10, 0, 0 };
|
||||
|
||||
/* send status response */
|
||||
dstat.bStatus = g_dfu->status;
|
||||
dstat.bState = g_dfu->state;
|
||||
dstat.iString = 0;
|
||||
/* FIXME: set dstat.bwPollTimeout */
|
||||
memcpy(&dstat.bwPollTimeout, poll_timeout_10ms, sizeof(dstat.bwPollTimeout));
|
||||
|
||||
TRACE_DEBUG("handle_getstatus(%u, %u)\n\r", dstat.bStatus, dstat.bState);
|
||||
|
||||
|
||||
Reference in new issue
Block a user