I am programming in C and do not understand why the following statements do not work:
WAIT (1); // Wait 1 millisec
WAIT (1.1); // Wait 1.1 millisec
WAIT (1.0); // Wait 1 millisec
WAIT (10); // Wait 10 millisec
but these ones work fine:
WAIT (0.001); // Wait 1 usec
WAIT (0.1); // Wait 100 usec
My code freezes when I do this and it only works if the function has a 0.xx value passed. I do not see WAIT in any of my include files. I looked in the ANSI C and GNU C library manuals and did not see it listed. I am using an NXP LPC1756 M3 Cortex uP if it matters (Super Pro).
WAIT(1) does not work, WAIT(0.1) does
-
- Posts: 4
- Joined: Wed Feb 06, 2013 5:29 pm
- Location: Atlanta GA, USA
- Contact:
Re: WAIT(1) does not work, WAIT(0.1) does
The parameter for WAIT is defined as an integer, so anything else is up to the conversion whims of the compiler.
You can always search for the definition in MakeItC
You can always search for the definition in MakeItC