// stuff to do on idle void jshIdle() { if (init == 1) { jsiOneSecondAfterStartup(); // Do this the first time we enter jshIdle() after we have called jshInit() and never again. init = 0; } jshUSARTKick(EV_SERIAL1); }
void jshIdle() { // hack in order to get console device set correctly static bool inited = false; if (!inited) { inited = true; jsiOneSecondAfterStartup(); } while (Serial.available() > 0) { jshPushIOCharEvent(EV_SERIAL1, Serial.read()); } }
void jshIdle() { // hack in order to get console device set correctly static bool inited = false; if (!inited) { inited = true; jsiOneSecondAfterStartup(); } /*static bool foo = false; foo = !foo; jshPinSetValue(LED1_PININDEX, foo);*/ while (serial_readable(&mbedSerial[0])>0) jshPushIOCharEvent(EV_SERIAL1, serial_getc(&mbedSerial[0])); }