For the first time in many years I need to simulate I/O by using a signal function - specifically - toggle the T0 pin (P1.2 on a LPC915) as I am using Timer 0 as a counter. I have two problems, best described by a segment of code stripped down to try to find the fault.
SIGNAL void toggle_T0 (void) { while(1) { PORT1 |= 0x04; twatch (0.2); PORT1 &= ~0x04 twatch (0.2); } } void main (void) { }
Even with this "nothing program" I get : error C129: missing ';' before 'void' with a line number that points to the signal declaration. Also, what is the correct name for the VTREG that defines the pins of Port 1?
Before anyone picks up on it - the missing ; was a typo in the posting, NOT in my code.
Should you really have a main() This isn't a C program but a simulator script. It just happens to look a bit similar to C.
Next thing - name for VREG depends on processor. Each supported processor have a web page here with information about what is supported etc. There you can find information about VREG names.
was a typo in the posting, NOT in my code
DO NOT DO NOT DO NOT EVER type code into a post use cut-and-paste
the threads that went astray because of the 'code' in the post and the code referred to were different are legio.
Erik