Fixed AVRISP project timeouts not checking for the correct timeout period (thanks to Carl Ott).
This commit is contained in:
parent
8b75659563
commit
37c9ba7fa9
6 changed files with 59 additions and 13 deletions
|
@ -70,7 +70,16 @@
|
|||
static inline void V2Protocol_DelayMS(uint8_t DelayMS)
|
||||
{
|
||||
TCNT0 = 0;
|
||||
while (TCNT0 < DelayMS);
|
||||
TIFR0 = (1 << OCF1A);
|
||||
|
||||
while (DelayMS)
|
||||
{
|
||||
if (TIFR0 & (1 << OCF1A))
|
||||
{
|
||||
TIFR0 = (1 << OCF1A);
|
||||
DelayMS--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* External Variables: */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue