projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove the timeout period extension code from the AVRISP project, as no single comman...
[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
d6bb32a
..
9e210c2
100644
(file)
--- a/
Projects/AVRISP-MKII/Lib/V2Protocol.c
+++ b/
Projects/AVRISP-MKII/Lib/V2Protocol.c
@@
-46,8
+46,8
@@
bool MustLoadExtendedAddress;
/** ISR to manage timeouts whilst processing a V2Protocol command */
ISR(TIMER0_COMPA_vect, ISR_NOBLOCK)
{
/** ISR to manage timeouts whilst processing a V2Protocol command */
ISR(TIMER0_COMPA_vect, ISR_NOBLOCK)
{
- if (Timeout
MS
Remaining)
- Timeout
MS
Remaining--;
+ if (Timeout
Ticks
Remaining)
+ Timeout
Ticks
Remaining--;
}
/** Initializes the hardware and software associated with the V2 protocol command handling. */
}
/** Initializes the hardware and software associated with the V2 protocol command handling. */
@@
-60,8
+60,8
@@
void V2Protocol_Init(void)
ADC_StartReading(VTARGET_ADC_CHANNEL_MASK | ADC_RIGHT_ADJUSTED | ADC_REFERENCE_AVCC);
#endif
ADC_StartReading(VTARGET_ADC_CHANNEL_MASK | ADC_RIGHT_ADJUSTED | ADC_REFERENCE_AVCC);
#endif
- /*
Millisecond timer initialization for managing the command timeout counter
*/
- OCR0A = ((F_CPU /
64) / 10
00);
+ /*
Timeout timer initialization (10ms period)
*/
+ OCR0A = ((F_CPU /
1024) / 1
00);
TCCR0A = (1 << WGM01);
TIMSK0 = (1 << OCIE0A);
TCCR0A = (1 << WGM01);
TIMSK0 = (1 << OCIE0A);
@@
-77,8
+77,8
@@
void V2Protocol_ProcessCommand(void)
uint8_t V2Command = Endpoint_Read_Byte();
/* Start the timeout management timer */
uint8_t V2Command = Endpoint_Read_Byte();
/* Start the timeout management timer */
- Timeout
MSRemaining = COMMAND_TIMEOUT_M
S;
- TCCR0B = ((1 << CS0
1
) | (1 << CS00));
+ Timeout
TicksRemaining = COMMAND_TIMEOUT_TICK
S;
+ TCCR0B = ((1 << CS0
2
) | (1 << CS00));
switch (V2Command)
{
switch (V2Command)
{