=================================================================================================================== readSerialLine() - reads a line feed (\n) terminated line from the serial stream returns # of bytes read, up to 254 timeout in ms, will timeout and return after so long this is called at the OTA programmer side =========================================================================
| 271 | // this is called at the OTA programmer side |
| 272 | //=================================================================================================================== |
| 273 | uint8_t readSerialLine(char* input, char endOfLineChar, uint8_t maxLength, uint16_t timeout) |
| 274 | { |
| 275 | uint8_t inputLen = 0; |
| 276 | Serial.setTimeout(timeout); |
| 277 | inputLen = Serial.readBytesUntil(endOfLineChar, input, maxLength); |
| 278 | input[inputLen]=0;//null-terminate it |
| 279 | Serial.setTimeout(0); |
| 280 | return inputLen; |
| 281 | } |
| 282 | |
| 283 | |
| 284 | //=================================================================================================================== |
no outgoing calls
no test coverage detected