avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] __disable_interrupt();


From: Salvador Castiella
Subject: [avr-gcc-list] __disable_interrupt();
Date: Tue, 20 Feb 2007 13:04:38 +0100

Hello, i try to compile this code in AVR Studio 4 (because I could not install AVR-GCC compiler for linux)

#include <avr/interrupt.h>

void main()
{
char cSREG;
cSREG = SREG; /* store SREG value */
/* disable interrupts during timed sequence */
__disable_interrupt();
EECR |= (1<<EEMWE); /* start EEPROM write */
EECR |= (1<<EEWE);
SREG = cSREG; /* restore SREG value (I-bit) */
}

and the compiler says

rm -rf Interrupciones1.o  Interrupciones1.elf dep/* Interrupciones1.hex Interrupciones1.eep
Build succeeded with 0 Warnings...
avr-gcc.exe  -mmcu=atmega128 -Wall -gdwarf-2 -O0 -MD -MP -MT Interrupciones1.o -MF dep/Interrupciones1.o.d  -c  ../Interrupciones1.c
../Interrupciones1.c:4: aviso: el tipo de devolución de 'main' no es `int'
../Interrupciones1.c: In function `main':
../Interrupciones1.c:8: aviso: declaración implícita de la función `__disable_interrupt'
avr-gcc.exe -mmcu=atmega128  Interrupciones1.o      -o Interrupciones1.elf
Interrupciones1.o: In function `main':
../Interrupciones1.c:8: undefined reference to `__disable_interrupt'
make: *** [Interrupciones1.elf] Error 1
Build failed with 1 errors and 0 warnings...


It supposed that the include <avr/interrupt.h> it had this function. I watch in the avr-libc Reference Manual,but this function is not.
I have copied the code of the manual ATMEL Atmega128. Somebody can say to me where I can find these functions? Many thanks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]