Hello,
I have declared a Timer 0 ISR using Keil 4 as follows:
void timer0 (void) interrupt 1 {
// blank
// yet to add my ISR code
}
With this, I get the following two errors in Keil 4
timer.c(30): error C132: 'timer0': not in formal parameter list timer.c(30): error C141: syntax error near 'interrupt'
Kindly assist for resolving this issue.
P.S. When compiled in Keil 3, I get 0 Errors, 0 Warnings
Thanks, Dipen Shah
The error on line 30 of timer.c is indeed the first error encountered during compilation & there are no earlier errors.
timer.c(30) is void timer0 (void) interrupt 1
I'm need to simply generate a fixed duration pulse using Timer 0.
-- Dipen
... that is 'open ended' would cause this.
if you have CodeWright it is a breeze to insert // in front of the lines back to the top and if that removes the error, you know and can find the previous line causing the error.
anyhow, my guess is that the cause of the error is higher up.
Erik
The following line in "timer.h" file was generating the error
void timer0 (void) interrupt TF0_VECTOR
Compiling after commenting the same, resulted in "Project" - 0 Error(s), 0 Warning(s).
Agreed, the issue was somewhere above in the code.
Thank you. Dipen