int main(void)
{
SetupHardware();
+ V2Protocol_Init();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei();
for (;;)
{
- Process_AVRISP_Commands();
- V2Params_UpdateParamValues();
-
+ AVRISP_Task();
USB_USBTask();
}
}
/* Hardware Initialization */
LEDs_Init();
USB_Init();
- V2Protocol_Init();
}
/** Event handler for the library USB Connection event. */
}
/** Processes incoming V2 Protocol commands from the host, returning a response when required. */
-void Process_AVRISP_Commands(void)
+void AVRISP_Task(void)
{
/* Device must be connected and configured for the task to run */
if (USB_DeviceState != DEVICE_STATE_Configured)
return;
+ V2Params_UpdateParamValues();
+
Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPNUM);
/* Check to see if a V2 Protocol command has been received */