diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-01-08 16:22:20 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-01-08 16:22:20 +0100 |
commit | 70594a0e640bb4e85f35b479b5d983e8e7a15b65 (patch) | |
tree | 56a227a63957d7b9f9bb31e914b0d42e197955b2 /usb-dfu-experiment | |
parent | 6d19c32cb0bc311838a580d3ec07036ce492d843 (diff) |
DFU: use g_dfu instead of dfu
Diffstat (limited to 'usb-dfu-experiment')
-rw-r--r-- | usb-dfu-experiment/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usb-dfu-experiment/main.c b/usb-dfu-experiment/main.c index d630494..b7e47de 100644 --- a/usb-dfu-experiment/main.c +++ b/usb-dfu-experiment/main.c @@ -287,7 +287,7 @@ int USBDFU_handle_dnload(uint8_t altif, unsigned int offset, if (addr + len > end) { TRACE_ERROR("Cannot write beyond end of DFU partition %u\n\r", altif); - dfu.status = DFU_STATUS_errADDRESS; + g_dfu.status = DFU_STATUS_errADDRESS; return DFU_RET_STALL; } @@ -303,13 +303,13 @@ int USBDFU_handle_dnload(uint8_t altif, unsigned int offset, SetFlashWaitState(2); if (rc != 0) { TRACE_ERROR("Error during write of DFU partition %u\n\r", altif); - dfu.status = DFU_STATUS_errPROG; + g_dfu.status = DFU_STATUS_errPROG; return DFU_RET_STALL; } break; default: TRACE_WARNING("Write to DFU partition %u not implemented\n\r", altif); - dfu.status = DFU_STATUS_errTARGET; + g_dfu.status = DFU_STATUS_errTARGET; break; } @@ -321,8 +321,8 @@ void dfu_drv_updstatus(void) { TRACE_INFO("DFU: updstatus()\n\r"); - if (dfu.state == DFU_STATE_dfuMANIFEST_SYNC) - dfu.state = DFU_STATE_dfuMANIFEST; + if (g_dfu.state == DFU_STATE_dfuMANIFEST_SYNC) + g_dfu.state = DFU_STATE_dfuMANIFEST; } /*---------------------------------------------------------------------------- |