For some simple applications, I’ve used a familiar construct, like what you see below:
I tried this, but on the first keystroke, it remains in the while (_kbhit() ), and never after runs the normal code path.
static BufferedSerial pc(USBTX, USBRX, 460800);
while (true) {
while (_kbhit()) {
int c = getc();
switch (c) {
case '?': EmitMenu(); break;
case 'P': PowerOn(); break;
}
}
// normal code path
// ... until the first keystroke, then never again...
}
What is the equivalent in OS6 that I’m missing here?
OS6 - Cloud Compiler, Target LPC1`768, USB Debug port …