Make sure standalone modes can be launched when connected on USB without client

This commit is contained in:
Philippe Teuwen
2019-06-02 23:20:02 +02:00
parent b7016e0bed
commit d7614684f8
6 changed files with 72 additions and 35 deletions

View File

@@ -8,6 +8,7 @@
//-----------------------------------------------------------------------------
// The main USART code, for serial communications over FPC connector
//-----------------------------------------------------------------------------
#include "cmd.h"
#include "usart.h"
#include "string.h"
#include "../armsrc/ticks.h" // startcountus
@@ -109,14 +110,6 @@ uint16_t usart_rxdata_available(void) {
return sizeof(us_rxfifo) - us_rxfifo_low + us_rxfifo_high;
}
extern bool reply_via_fpc;
extern void Dbprintf(const char *fmt, ...);
#define Dbprintf_usb(...) {\
bool tmp = reply_via_fpc;\
reply_via_fpc = false;\
Dbprintf(__VA_ARGS__);\
reply_via_fpc = tmp;}
uint32_t usart_read_ng(uint8_t *data, size_t len) {
if (len == 0) return 0;
uint32_t packetSize, nbBytesRcv = 0;