diff options
-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; } /*---------------------------------------------------------------------------- |