Moved calls to V2Params_UpdateParamValues() out of the main AVRISP-MKII and XPLAINBri...
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 21 Jun 2010 13:39:56 +0000 (13:39 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 21 Jun 2010 13:39:56 +0000 (13:39 +0000)
Projects/AVRISP-MKII/AVRISP.c
Projects/AVRISP-MKII/AVRISP.h
Projects/AVRISP-MKII/AVRISP.txt
Projects/XPLAINBridge/XPLAINBridge.c
Projects/XPLAINBridge/XPLAINBridge.h

index 0766025..7b2429c 100644 (file)
@@ -48,9 +48,7 @@ int main(void)
 
        for (;;)
        {
-               Process_AVRISP_Commands();
-               V2Params_UpdateParamValues();
-               
+               AVRISP_Task();
                USB_USBTask();
        }
 }
@@ -108,12 +106,14 @@ void EVENT_USB_Device_ConfigurationChanged(void)
 }
 
 /** 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 */
index 409b147..1018ebc 100644 (file)
@@ -72,7 +72,7 @@
 
        /* 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);
index de08d5f..c4ba43c 100644 (file)
@@ -57,7 +57,6 @@
  *    - 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
index ad3fc6c..2a71c56 100644 (file)
@@ -86,14 +86,9 @@ int main(void)
        for (;;)
        {
                if (CurrentFirmwareMode == MODE_USART_BRIDGE)
-               {
-                       USARTBridge_Task();
-               }
+                 UARTBridge_Task();
                else
-               {
-                       AVRISP_Task();
-                       V2Params_UpdateParamValues();
-               }
+                 AVRISP_Task();
 
                USB_USBTask();
        }
@@ -105,6 +100,8 @@ void AVRISP_Task(void)
        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 */
@@ -119,7 +116,7 @@ void AVRISP_Task(void)
        }
 }
 
-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)
index 72e9046..3d257e5 100644 (file)
@@ -84,7 +84,7 @@
        /* 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);