projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AVRISP programmer project now has a more robust timeout system, allowing for a doubli...
[pub/USBasp.git]
/
Projects
/
AVRISP-MKII
/
Lib
/
V2Protocol.c
diff --git
a/Projects/AVRISP-MKII/Lib/V2Protocol.c
b/Projects/AVRISP-MKII/Lib/V2Protocol.c
index
8d8f200
..
cea42ea
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/V2Protocol.c
+++ b/
Projects/AVRISP-MKII/Lib/V2Protocol.c
@@
-42,14
+42,6
@@
uint32_t CurrentAddress;
/** Flag to indicate that the next read/write operation must update the device's current address */
\r
bool MustSetAddress;
\r
\r
/** Flag to indicate that the next read/write operation must update the device's current address */
\r
bool MustSetAddress;
\r
\r
-
\r
-/** ISR for the management of the command execution timeout counter */
\r
-ISR(TIMER0_COMPA_vect, ISR_BLOCK)
\r
-{
\r
- if (TimeoutMSRemaining)
\r
- TimeoutMSRemaining--;
\r
-}
\r
-
\r
/** Initializes the hardware and software associated with the V2 protocol command handling. */
\r
void V2Protocol_Init(void)
\r
{
\r
/** Initializes the hardware and software associated with the V2 protocol command handling. */
\r
void V2Protocol_Init(void)
\r
{
\r
@@
-76,10
+68,6
@@
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
switch (V2Command)
\r
{
\r
case CMD_SIGN_ON:
\r
switch (V2Command)
\r
{
\r
case CMD_SIGN_ON:
\r
@@
-139,9
+127,6
@@
void V2Protocol_ProcessCommand(void)
V2Protocol_UnknownCommand(V2Command);
\r
break;
\r
}
\r
V2Protocol_UnknownCommand(V2Command);
\r
break;
\r
}
\r
-
\r
- /* Disable timeout management interrupt once processing has completed */
\r
- TIMSK0 &= ~(1 << OCIE0A);
\r
\r
Endpoint_WaitUntilReady();
\r
Endpoint_SetEndpointDirection(ENDPOINT_DIR_OUT);
\r
\r
Endpoint_WaitUntilReady();
\r
Endpoint_SetEndpointDirection(ENDPOINT_DIR_OUT);
\r