From 6356b9f770676e60def8d47bf311d0419eb0929d Mon Sep 17 00:00:00 2001 From: Christian Kroll Date: Sun, 25 Oct 2015 20:43:02 +0100 Subject: [PATCH] acsess TIMSK instead of TIMSK0 on ATmega16/32 --- src/borg_hw/borg_hw_andreborg.c | 2 +- src/borg_hw/borg_hw_borg16.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/borg_hw/borg_hw_andreborg.c b/src/borg_hw/borg_hw_andreborg.c index da86ed5..de1a1b6 100644 --- a/src/borg_hw/borg_hw_andreborg.c +++ b/src/borg_hw/borg_hw_andreborg.c @@ -26,7 +26,7 @@ # define TIMER0_INT_ENABLE() TIMSK0 |= _BV(OCIE0A) # define TIMER0_ISR TIMER0_COMPA_vect #else // ATmega16/32 -# define TIMER0_OFF() TIMSK0 &= ~(OCIE0); TCCR0 = 0 +# define TIMER0_OFF() TIMSK &= ~(OCIE0); TCCR0 = 0 # define TIMER0_CTC_CS256() TCCR0 = _BV(WGM01) | _BV(CS02) # define TIMER0_RESET() TCNT0 = 0 # define TIMER0_COMPARE(t) OCR0 = t diff --git a/src/borg_hw/borg_hw_borg16.c b/src/borg_hw/borg_hw_borg16.c index 2870c14..8cf6c76 100644 --- a/src/borg_hw/borg_hw_borg16.c +++ b/src/borg_hw/borg_hw_borg16.c @@ -48,7 +48,7 @@ # define TIMER0_INT_ENABLE() TIMSK0 |= _BV(OCIE0A) # define TIMER0_ISR TIMER0_COMPA_vect #else // ATmega16/32 -# define TIMER0_OFF() TIMSK0 &= ~(OCIE0); TCCR0 = 0 +# define TIMER0_OFF() TIMSK &= ~(OCIE0); TCCR0 = 0 # define TIMER0_CTC_CS256() TCCR0 = _BV(WGM01) | _BV(CS02) # define TIMER0_RESET() TCNT0 = 0 # define TIMER0_COMPARE(t) OCR0 = t