bianchi77
Advanced Member level 4
- Joined
- Jun 11, 2009
- Messages
- 1,313
- Helped
- 21
- Reputation
- 44
- Reaction score
- 20
- Trophy points
- 1,318
- Location
- California
- Activity points
- 9,442
Guys,
How can I define time integer constan ?
I define my function :
when I call :
I got :
Error 7 __builtin_avr_delay_cycles expects a compile time integer constant c:\program files (x86)\atmel\atmel toolchain\avr8 gcc\native\3.4.2.939\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h 164 28 main_buzzer
Any ideas on how to rectify it ?
thanks
How can I define time integer constan ?
I define my function :
Code:
void tone(int freq,int wait)
{
OCR1A=freq;
_delay_ms(wait);
}
Code:
tone(0,1000);
I got :
Error 7 __builtin_avr_delay_cycles expects a compile time integer constant c:\program files (x86)\atmel\atmel toolchain\avr8 gcc\native\3.4.2.939\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h 164 28 main_buzzer
Any ideas on how to rectify it ?
thanks