aboutsummaryrefslogtreecommitdiff
path: root/Projects/AVRISP-MKII/Lib/V2Protocol.c
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-01-17 04:39:33 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-01-17 04:39:33 +0000
commit10cc18262b7965e1c571179f708412b9f778e146 (patch)
tree8e6b6a3842e05e78d7bb51a38975ff09286558c0 /Projects/AVRISP-MKII/Lib/V2Protocol.c
parentfe1688fe68af4800d317750083b59279fbdd54f6 (diff)
Clean up and add more comments to the AVRISP-MKII project. Make sure the SPI_MULTI command handler supports multiple packet responses. Use slightly smaller/faster repeated indirect-load commands when retrieving the PDI target's memory CRCs.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1046 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Projects/AVRISP-MKII/Lib/V2Protocol.c')
-rw-r--r--Projects/AVRISP-MKII/Lib/V2Protocol.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Projects/AVRISP-MKII/Lib/V2Protocol.c b/Projects/AVRISP-MKII/Lib/V2Protocol.c
index 093c0786..976f24b9 100644
--- a/Projects/AVRISP-MKII/Lib/V2Protocol.c
+++ b/Projects/AVRISP-MKII/Lib/V2Protocol.c
@@ -58,6 +58,7 @@ void V2Protocol_ProcessCommand(void)
{
uint8_t V2Command = Endpoint_Read_Byte();
+ /* Set total command processing timeout value, enable timeout management interrupt */
TimeoutMSRemaining = COMMAND_TIMEOUT_MS;
TIMSK0 |= (1 << OCIE0A);
@@ -121,6 +122,7 @@ void V2Protocol_ProcessCommand(void)
break;
}
+ /* Disable timeout management interrupt once processing has completed */
TIMSK0 &= ~(1 << OCIE0A);
Endpoint_WaitUntilReady();
@@ -162,8 +164,8 @@ static void V2Protocol_SignOn(void)
Endpoint_ClearIN();
}
-/** Handler for the CMD_RESET_PROTECTION command, currently implemented as a dummy ACK function
- * as no ISP short-circuit protection is currently implemented.
+/** Handler for the CMD_RESET_PROTECTION command, implemented as a dummy ACK function as
+ * no target short-circuit protection is currently implemented.
*/
static void V2Protocol_ResetProtection(void)
{