X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/5e12d436fa31399ba6b5c8cab484d4a7b5adf7e7..aca7863350509a1f390eda93ac0150378d8cd16c:/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c index 85a750454..957084c0b 100644 --- a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c +++ b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c @@ -53,12 +53,13 @@ volatile uint16_t SoftUSART_Data; ISR(TIMER1_COMPA_vect, ISR_BLOCK) { /* Toggle CLOCK pin in a single cycle (see AVR datasheet) */ - BITBANG_PDICLOCK_PIN |= BITBANG_PDICLOCK_MASK; + BITBANG_PDICLOCK_PIN = BITBANG_PDICLOCK_MASK; /* If not sending or receiving, just exit */ if (!(SoftUSART_BitCount)) return; + /* Check to see if we are at a rising or falling edge of the clock */ if (BITBANG_PDICLOCK_PORT & BITBANG_PDICLOCK_MASK) { /* If at rising clock edge and we are in send mode, abort */ @@ -102,7 +103,7 @@ ISR(TIMER1_COMPA_vect, ISR_BLOCK) ISR(TIMER1_CAPT_vect, ISR_BLOCK) { /* Toggle CLOCK pin in a single cycle (see AVR datasheet) */ - BITBANG_TPICLOCK_PIN |= BITBANG_TPICLOCK_MASK; + BITBANG_TPICLOCK_PIN = BITBANG_TPICLOCK_MASK; /* If not sending or receiving, just exit */ if (!(SoftUSART_BitCount))