DFU: use g_dfu instead of dfu

This commit is contained in:
Harald Welte 2012-01-08 16:22:20 +01:00
parent 6d19c32cb0
commit 70594a0e64
1 changed files with 5 additions and 5 deletions

View File

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