C language: what does pause(0) do?
John Kauffman
Posts: 653
For following I expected "hello" repeated on screen. I get one "hello" only.
What does arg of zero do with pause()? Web search talks about handing execution off to another thread but that doesn't seem to apply to Prop C.
#include "simpletools.h"
int main(void){
while(1){
print("hello");
pause(0);
}//while
}
What does arg of zero do with pause()? Web search talks about handing execution off to another thread but that doesn't seem to apply to Prop C.
#include "simpletools.h"
int main(void){
while(1){
print("hello");
pause(0);
}//while
}
Comments
Maybe deep below that getting ticks operation there is a division which makes /0. Go figure.
Sorry, couldn't resist: "Give me a 'Hello', Vasili. One 'Hello' only, please."
Of course one could say "they should just learn what waitcnt does and how the propeller works" but then... I think that ruins the point of calling a standard function called "pause".
Andy
Andy
Ah! You're right! brilliant.