sio_read() function
Reads from the serial device.
Arguments
data
pointer to data buffer for receiving
len
maximum length (in bytes) of data to receive
Return value
number of bytes actually received - may be 0 if aborted by sio_read_abort
Notes
This function will block until data can be received. The blocking can be cancelled by calling sio_read_abort().