mrrwa / LocoNet

An embedded Loconet interface library for Arduino family microcontrollers
Other
68 stars 32 forks source link

TIMER1 ISR name for attiny84 is wrong #5

Closed dirkjankrijnders closed 7 years ago

dirkjankrijnders commented 7 years ago

The attiny84 is supported via #define's in other places, but the timer name is not correct. With the attached diff the code compiles for attiny84 within the arduino environment.

Cannot attach a patch, so here it is:

diff --git a/utility/ln_config.h b/utility/ln_config.h index 2953683..5a3e3b1 100755 --- a/utility/ln_config.h +++ b/utility/ln_config.h @@ -130,7 +130,11 @@

define LN_SB_INT_ENABLE_BIT ICIE1

define LN_SB_INT_STATUS_REG TIFR1

define LN_SB_INT_STATUS_BIT ICF1

+#if defined (AVR_ATtiny84) || defined (AVR_ATtiny84A) || defined (__AVR_ATtiny841__) +#define LN_TMR_SIGNAL TIM1_COMPA_vect +#else

define LN_TMR_SIGNAL TIMER1_COMPA_vect

+#endif

define LN_TMR_INT_ENABLE_REG TIMSK1

define LN_TMR_INT_STATUS_REG TIFR1

define LN_TMR_INT_ENABLE_BIT OCIE1A

kiwi64ajs commented 7 years ago

I've applied the patch - thanks