picking atomic piece of #4358

This commit is contained in:
rusefillc 2022-07-20 17:06:34 -04:00
parent adc11fcc1f
commit 70d0351f9c
1 changed files with 4 additions and 1 deletions

View File

@ -100,6 +100,8 @@ static void printErrorCounters() {
/* 1S */ /* 1S */
#define TS_COMMUNICATION_TIMEOUT TIME_MS2I(1000) #define TS_COMMUNICATION_TIMEOUT TIME_MS2I(1000)
/* 10mS when receiving byte by byte */
#define TS_COMMUNICATION_TIMEOUT_SHORT TIME_MS2I(10)
static efitimems_t previousWriteReportMs = 0; static efitimems_t previousWriteReportMs = 0;
@ -424,7 +426,8 @@ static int tsProcessOne(TsChannelBase* tsChannel) {
} }
uint8_t secondByte; uint8_t secondByte;
received = tsChannel->readTimeout(&secondByte, 1, TS_COMMUNICATION_TIMEOUT); /* second byte should be received within minimal delay */
received = tsChannel->readTimeout(&secondByte, 1, TS_COMMUNICATION_TIMEOUT_SHORT);
if (received != 1) { if (received != 1) {
tunerStudioError(tsChannel, "TS: ERROR: no second byte"); tunerStudioError(tsChannel, "TS: ERROR: no second byte");
return -1; return -1;