This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

problem with signal function

Hi, I am working with uvision4 for c167 and the problem i face with is that I dont know how to define and use signal function utility to assign a pulse input to my program.This is my code and following is the syntax error i confronted:any one can help me?
Regards

#include<stdio.h> #include<reg167.h>

signal void int0_signal (void) { while (1) { PORT3 |= 0x04; /* pull PORT 3.2 high */ swatch (0.05); /* wait 50 milliseconds */ PORT3 &= ~0x04; /* pull PORT 3.2 low */ swatch (0.05); /* wait 50 milliseconds */ }
} void main (void) { int0_signal(); }

Build target 'Target 1'
compiling wave.c...
wave.c(6): error C42: 'int0_signal': not in formal parameter list
wave.c(6): error C25: syntax error near '{'
wave.c(18): error C7: compilation aborted
Target not created

0