Gast
#4496968
Guten Abend! Ich habe folgenden herausforderndes Programm geschrieben, m
meinen ATxmega32e5 zu testen:
#include <avr/io.h>
#include <avr/interrupt.h>
#define F_CPU 16000000UL
int main(void)
{
PORTD.DIR |= PIN5_bm | PIN6_bm | PIN7_bm;
PORTD.OUT |= PIN5_bm | PIN6_bm | PIN7_bm;
PORTD.PIN4CTRL |= PORT_OPC_PULLUP_gc;
TCC4.CTRLA |= TC45_CLKSEL_DIV1024_gc;
TCC4.CTRLB |= TC45_WGMODE_NORMAL_gc;
TCC4.INTCTRLA |= TC45_OVFINTLVL_HI_gc;
TCC4.PER = 0x0D09;
ISR( TCC4_OVF_vect ) //Zeile 31!!
{
PORTD.OUT ^= PIN6_bm;
}
/* Replace with your application code */
while (1)
{
}
}
Als Antwort bekomme ich zwei Fehler und eine Meldung:
1. Info: previous declaration of 'vetor_12' was here , Zeile 31
2. Fehler: recipe for target 'mai.o' failed; im MakeFile
3. Fehler: static declaration of 'vector_12' follows non-static
declaration, Zeile 31
Was ist denn falsch?