I try to setup a code for the ATTINY 85 within the lily twinkle (LilyTwinkle - DEV-11364 - SparkFun Electronics), but as it has limitation on debug, I try to have the same code usable with my arduino uno ...
so I do a :
#define TARGET_ARDUINO
//#define TARGET_LILY
#if defined TARGET_LILY
blablabla ...
#endif
#if defined TARGET_ARDUINO
blablable ....
#endif
but when I try to setup the interruptions, I got an error depending on the board I select in arduino IDE :
#if defined TARGET_ARDUINO
GIMSK = 0b00100000; // PCIE on
PCMSK = 0b00000011; // mask pour le pcint0 et pcint1
#endif
#if defined TARGET_ARDUINO
PCICR = 0x02; // Enable PCINT1 interrupt
PCMSK1 = 0b00000111;
#endif
with the uno selected :
test_pression_2.ino: In function 'void InitialiseInterrupt()':
test_pression_2:120: error: 'GIMSK' was not declared in this scope
test_pression_2:121: error: 'PCMSK' was not declared in this scope
with the attiny 85 :
test_pression_2.ino: In function 'void InitialiseInterrupt()':
test_pression_2:124: error: 'PCICR' was not declared in this scope
test_pression_2:125: error: 'PCMSK1' was not declared in this scope
no way to see that page, I got an Access denied and subscription is not working (never received the confirmation email and the login pass doesn't get through ..)
Also this may help your board selection. ( replace CHIPSET macro with whatever you like ).
Thanks, just need to add the lily with it's attiny85 ...
but still If the compiler or arduino ide check the interrupt register from the chipset selected within the IDE over the non selected #if part ... I am screwed ...