Boo0ns / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

init() function (timer 1 configuration) fails on ATtiny45 / 85. #496

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create a ATtiny45/85 version of the pins_arduino.h file.
2.Try to compile a program.

What is the expected output? What do you see instead?

You get "wiring.c:215: error: 'TCCR1B' undeclared".  

Basically, the timer initialization in the init() function isn't modular / 
portable enough.  We'll probably need to move something into pins_arduino.h, or 
add more #ifdefs in init().

Original issue reported on code.google.com by dmel...@gmail.com on 5 Mar 2011 at 6:11

Attachments:

GoogleCodeExporter commented 9 years ago
The init() appears to be portable enough, but has a simple mistake.

The assignment to TCCR1B on line 215 belongs inside the #ifdef check section at 
line 219, but it's mistakenly placed a few lines above the #ifdef that checks 
if it exists.

Original comment by paul.sto...@gmail.com on 5 Mar 2011 at 11:52

GoogleCodeExporter commented 9 years ago
This was fixed sometime before the Arduino 1.0 release.

Original comment by dmel...@gmail.com on 21 Dec 2011 at 9:20