Altera_Forum
Honored Contributor
20 years agobreak loop with 'q'
Hello,
this may be a very beginner question, but I cannot get ahead. I have a loop wich should be performed until the user presses 'q'. I tried with getchar() but it seems that getchar() waits for a return and my loop is not performed anymore. So I'm looking for a command which is not waiting for a return, or maybe a command who tells me if the uart buffer is empty or not. Thank you for each suggestion, Ralfdo
{
printf( "do something" );
} while( getchar() != 'q' );