mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 09:09:10 -04:00
In non blocking mode, the read function is expected to return weather data is available for reading or not. In case data are available but the size does not match the expected size, the function read should return whatever data is available. Previously, the function was returning -1 with errno set to EWOULDBLOCK even if the size of data in the buffer was less than the requested size. It would only return the available data if the size in the buffer was greater or equal to the requested size. The implementation of cdcacm_read is modified to return the avilable data from the buffer even is the size is lesser than the requested size.