Fix the Benito project not pulsing the target's /RESET line when DTR is de-asserted.
[pub/lufa.git] / Projects / AVRISP-MKII / Lib / V2Protocol.c
index aee142b..976f24b 100644 (file)
@@ -1,13 +1,13 @@
 /*\r
              LUFA Library\r
 /*\r
              LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
+     Copyright (C) Dean Camera, 2010.\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
 \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
 \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
@@ -58,6 +58,7 @@ void V2Protocol_ProcessCommand(void)
 {\r
        uint8_t V2Command = Endpoint_Read_Byte();\r
        \r
 {\r
        uint8_t V2Command = Endpoint_Read_Byte();\r
        \r
+       /* Set total command processing timeout value, enable timeout management interrupt */\r
        TimeoutMSRemaining = COMMAND_TIMEOUT_MS;\r
        TIMSK0 |= (1 << OCIE0A);\r
 \r
        TimeoutMSRemaining = COMMAND_TIMEOUT_MS;\r
        TIMSK0 |= (1 << OCIE0A);\r
 \r
@@ -121,6 +122,7 @@ void V2Protocol_ProcessCommand(void)
                        break;\r
        }\r
                \r
                        break;\r
        }\r
                \r
+       /* Disable timeout management interrupt once processing has completed */\r
        TIMSK0 &= ~(1 << OCIE0A);\r
 \r
        Endpoint_WaitUntilReady();\r
        TIMSK0 &= ~(1 << OCIE0A);\r
 \r
        Endpoint_WaitUntilReady();\r
@@ -162,8 +164,8 @@ static void V2Protocol_SignOn(void)
        Endpoint_ClearIN();\r
 }\r
 \r
        Endpoint_ClearIN();\r
 }\r
 \r
-/** Handler for the CMD_RESET_PROTECTION command, currently implemented as a dummy ACK function\r
- *  as no ISP short-circuit protection is currently implemented.\r
+/** Handler for the CMD_RESET_PROTECTION command, implemented as a dummy ACK function as\r
+ *  no target short-circuit protection is currently implemented.\r
  */\r
 static void V2Protocol_ResetProtection(void)\r
 {\r
  */\r
 static void V2Protocol_ResetProtection(void)\r
 {\r