for (;;)
{
- Process_AVRISP_Commands();
- V2Params_UpdateParamValues();
-
+ AVRISP_Task();
USB_USBTask();
}
}
}
/** 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 */
/* Function Prototypes: */
void SetupHardware(void);
- void Process_AVRISP_Commands(void);
+ void AVRISP_Task(void);
void EVENT_USB_Device_Connect(void);
void EVENT_USB_Device_Disconnect(void);
* - Minimum ISP target clock speed of 500KHz due to hardware SPI module prescaler limitations
* - No reversed/shorted target connector detection and notification
* - A seperate header is required for each of the ISP, PDI and TPI programming protocols that the user wishes to use
- * - XMEGA EEPROM erase section command does not work (but EEPROM read/write and chip erase does)
*
* On AVR models with an ADC converter, AVCC should be tied to 5V (e.g. VBUS) and the VTARGET_ADC_CHANNEL token should be
* set to an appropriate ADC channel number in the project makefile for VTARGET detection to operate correctly. On models
for (;;)
{
if (CurrentFirmwareMode == MODE_USART_BRIDGE)
- {
- USARTBridge_Task();
- }
+ UARTBridge_Task();
else
- {
- AVRISP_Task();
- V2Params_UpdateParamValues();
- }
+ AVRISP_Task();
USB_USBTask();
}
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 */
}
}
-void USARTBridge_Task(void)
+void UARTBridge_Task(void)
{
/* Must be in the configured state for the USART Bridge code to process data */
if (USB_DeviceState != DEVICE_STATE_Configured)
/* Function Prototypes: */
void SetupHardware(void);
void AVRISP_Task(void);
- void USARTBridge_Task(void);
+ void UARTBridge_Task(void);
void EVENT_USB_Device_ConfigurationChanged(void);
void EVENT_USB_Device_UnhandledControlRequest(void);