diff options
author | Dean Camera <[email protected]> | 2009-12-20 22:33:48 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2009-12-20 22:33:48 +0000 |
commit | 37c9ba7fa980472406625973f0ee32719b5a8997 (patch) | |
tree | 0db6f97496255b576cb150068f904b23b4554cb5 /Projects/AVRISP/Lib/V2Protocol.h | |
parent | 8b7565956380c558bb309732c1d7d2cb58b193ea (diff) | |
download | qmk_firmware-37c9ba7fa980472406625973f0ee32719b5a8997.tar.gz qmk_firmware-37c9ba7fa980472406625973f0ee32719b5a8997.zip |
Fixed AVRISP project timeouts not checking for the correct timeout period (thanks to Carl Ott).
Diffstat (limited to 'Projects/AVRISP/Lib/V2Protocol.h')
-rw-r--r-- | Projects/AVRISP/Lib/V2Protocol.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Projects/AVRISP/Lib/V2Protocol.h b/Projects/AVRISP/Lib/V2Protocol.h index 5f996eaddc..1777e0fe13 100644 --- a/Projects/AVRISP/Lib/V2Protocol.h +++ b/Projects/AVRISP/Lib/V2Protocol.h @@ -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: */
|