diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-03-18 16:51:52 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-03-18 16:51:52 +0000 |
commit | e58915344d934395463d69876ab43bef0d93034a (patch) | |
tree | ae8049886729111c9c6aa1740b97c80ff91f0685 /Projects | |
parent | 01d5af3d6c17f052314c9e739a40b284ed645101 (diff) | |
download | lufa-e58915344d934395463d69876ab43bef0d93034a.tar.gz lufa-e58915344d934395463d69876ab43bef0d93034a.tar.bz2 lufa-e58915344d934395463d69876ab43bef0d93034a.zip |
Fixed error in the AVRISP-MKII programmer when ISP mode is used at 64KHz (thanks to Ben R. Porter).
Diffstat (limited to 'Projects')
-rw-r--r-- | Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c index ac6831611..e2b230166 100644 --- a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c +++ b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c @@ -129,9 +129,12 @@ ISR(TIMER1_COMPA_vect, ISR_BLOCK) { SoftSPI_Data <<= 1; - if (!(SoftSPI_BitsRemaining--)) - TCCR1B = 0; - + if (!(--SoftSPI_BitsRemaining)) + { + TCCR1B = 0; + TIFR1 = (1 << OCF1A); + } + if (PINB & (1 << 3)) SoftSPI_Data |= (1 << 0); } |