replace usb_poll_validate_length() by data_available() that supports USART too

This commit is contained in:
Philippe Teuwen 2019-06-03 00:01:08 +02:00
commit 3b12ba2e93
21 changed files with 50 additions and 41 deletions

View file

@ -39,7 +39,7 @@ void RunMod() {
for (;;) {
WDT_HIT();
// exit from Standalone Mode, send a usbcommand.
if (usb_poll_validate_length()) return;
if (data_available()) return;
SpinDelay(300);
@ -57,7 +57,7 @@ void RunMod() {
for (;;) {
// exit from Standalone Mode, send a usbcommand.
if (usb_poll_validate_length()) return;
if (data_available()) return;
if (BUTTON_PRESS()) {
if (cardRead[selected]) {
@ -204,7 +204,7 @@ void RunMod() {
DbpString("Playing");
for (; ;) {
// exit from Standalone Mode, send a usbcommand.
if (usb_poll_validate_length()) return;
if (data_available()) return;
int button_action = BUTTON_HELD(1000);
if (button_action == 0) { // No button action, proceed with sim