Hallo!
In Atmel Studio 6, nachdem ich ein V-USB Projekt von Attiny85 auf
Attiny84a, aus dem Grund, des fehlenden Pins, portiere/umschreibe, habe
ich ziemlich viele Compiler fehler:
TIFR, TCCR1 undeclared
1 | void timerInit(void)
|
2 | {
|
3 | TCCR1 = 0x0b; /* select clock: 16.5M/1k -> overflow rate = 16.5M/256k = 62.94 Hz */
|
4 | }
|
5 |
|
6 | void timerPoll(void)
|
7 | {
|
8 | static unsigned int timerCnt;
|
9 |
|
10 | if(TIFR & (1 << TOV1)){
|
11 | TIFR = (1 << TOV1); /* clear overflow */
|
12 | if(++timerCnt >= 5){ // 5/63 sec delay for switch debouncing
|
13 | timerCnt = 0;
|
14 | debounceTimeIsOver = 1;
|
15 | }
|
16 | }
|
17 | }
|
Habt ihr eine Idee, wie TIFR nicht deklariert sein kann?!
________________
Error 8,9,10... expected declaration or statement at end of input
Diese Fehler zeigen auf die letzte Zeile des Projects, wo die "}" steht,
mehr nicht!
________________
Warning 4 'main' is normally a non-static function [-Wmain]
Vielen Dank im Voraus!