I/O read interface.
int32_t io_read( struct io_descriptor *const io_descr, uint8_t *const buf, const uint16_t length )
This function reads up to length bytes from a given I/O descriptor, and stores it in the buffer pointed to by buf. It returns the number of bytes actually read.
An I/O descriptor to read
Type: uint8_t *const
The buffer pointer to story the read data
Type: const uint16_t
The number of bytes to read
Type: int32_t
The number of bytes actually read. This number can be less than the requested length. E.g., in a driver that uses ring buffer for reception, it may depend on the availability of data in the ring buffer.