From 70594a0e640bb4e85f35b479b5d983e8e7a15b65 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 8 Jan 2012 16:22:20 +0100 Subject: DFU: use g_dfu instead of dfu --- usb-dfu-experiment/main.c | 10 +++++----- 1 file 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; } /*---------------------------------------------------------------------------- -- cgit v1.2.3