Merge pull request #66 from epozzobon/master

Fixed receiving the NUL '\x00' character on Serial
This commit is contained in:
Bits
2019-11-20 21:35:18 +08:00
committed by GitHub

View File

@@ -187,8 +187,8 @@ uarths_rec_callback(void *ctx)
int data;
auto &driver = *reinterpret_cast<UARTHSClass *>(ctx);
data = uarths_getc();
if(data != 0){
if(data != EOF){
driver._buff->store_char((char)data);
}
return 0;
}
}