diff options
Diffstat (limited to 'src')
| -rw-r--r--[-rwxr-xr-x] | src/userial_vendor.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/userial_vendor.c b/src/userial_vendor.c index b9c5f69..0f3f527 100755..100644 --- a/src/userial_vendor.c +++ b/src/userial_vendor.c @@ -294,7 +294,8 @@ void userial_vendor_close(void) #endif ALOGI("device fd = %d close", vnd_userial.fd); - + // flush Tx before close to make sure no chars in buffer + tcflush(vnd_userial.fd, TCIOFLUSH); if ((result = close(vnd_userial.fd)) < 0) ALOGE( "close(fd:%d) FAILED result:%d", vnd_userial.fd, result); |
