diff options
author | Dean Camera <[email protected]> | 2010-07-13 11:26:03 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2010-07-13 11:26:03 +0000 |
commit | 666c0fa4c31b2c9f7f02f6d0e09551e24dc4680c (patch) | |
tree | 6fd57a5b9cd741895fbaf55f6c56708d521d7748 /Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c | |
parent | 03130342451003093e654edc5b031718d544e9ba (diff) | |
download | qmk_firmware-666c0fa4c31b2c9f7f02f6d0e09551e24dc4680c.tar.gz qmk_firmware-666c0fa4c31b2c9f7f02f6d0e09551e24dc4680c.zip |
Remove the timeout period extension code from the AVRISP project, as no single command should ever exceed the maximum timeout period. Extend timeout period to 1 second per command, so that an accidental timeout will never occur.
Diffstat (limited to 'Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c')
-rw-r--r-- | Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c index 07efbb1da5..2e52005619 100644 --- a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c +++ b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c @@ -138,9 +138,6 @@ void XPROGTarget_SendByte(const uint8_t Byte) while (!(UCSR1A & (1 << UDRE1))); UCSR1A |= (1 << TXC1); UDR1 = Byte; - - if (TimeoutMSRemaining) - TimeoutMSRemaining = COMMAND_TIMEOUT_MS; } /** Receives a byte via the software USART, blocking until data is received. @@ -154,10 +151,7 @@ uint8_t XPROGTarget_ReceiveByte(void) XPROGTarget_SetRxMode(); /* Wait until a byte has been received before reading */ - while (!(UCSR1A & (1 << RXC1)) && TimeoutMSRemaining); - - if (TimeoutMSRemaining) - TimeoutMSRemaining = COMMAND_TIMEOUT_MS; + while (!(UCSR1A & (1 << RXC1)) && TimeoutTicksRemaining); return UDR1; } @@ -176,9 +170,6 @@ void XPROGTarget_SendBreak(void) while (PIND & (1 << 5)); while (!(PIND & (1 << 5))); } - - if (TimeoutMSRemaining) - TimeoutMSRemaining = COMMAND_TIMEOUT_MS; } static void XPROGTarget_SetTxMode(void) @@ -193,9 +184,6 @@ static void XPROGTarget_SetTxMode(void) UCSR1B &= ~(1 << RXEN1); UCSR1B |= (1 << TXEN1); - if (TimeoutMSRemaining) - TimeoutMSRemaining = COMMAND_TIMEOUT_MS; - IsSending = true; } @@ -210,9 +198,6 @@ static void XPROGTarget_SetRxMode(void) DDRD &= ~(1 << 3); PORTD &= ~(1 << 3); - if (TimeoutMSRemaining) - TimeoutMSRemaining = COMMAND_TIMEOUT_MS; - IsSending = false; } |