Здравствуйте.
Atmel studio выдаёт такую ошибку
Warning 1 '__interrupt' attribute directive ignored [-Wattributes] C:\Users\Tekri\Documents\Atmel Studio\6.1\GccApplication4\GccApplication4\GccApplication4.c 23 1 GccApplication4
Контроллер Atmega16
Исходный код:
#include <avr/io.h>
#include <stdint.h>
#include <avr/interrupt.h>
#define LED 1
float timer;
int main (void) {
TCCR0 = 0;
TCCR0 = (0<<COM01)|(0<<COM00)|(1<<WGM01)|(0<<WGM00);
TCNT0= 0;
OCR0 = 1;
TIFR = (1<<OCIE0);
TIMSK = (1<<OCIE0);
TCCR0 |= (0<<CS02)|(0<<CS01)|(1<<CS00);
DDRC |= (1<<LED);
sei();
while(1);
return 0;
}
void TIM0_CTC(void) __attribute__ ((__interrupt (TIMER0_COMP_vect)));
void TIM0_CTC(void)
{
timer = timer+0.0625;
if (timer>10000) PORTC |=(1<<LED);
if (timer >20000) PORTC |= (0<<LED);
if (timer >30000) timer =0;
}