cdev_input_receive()
Read available data from a host device into a user-provided buffer
Synopsis:
#include <qvm/cdev.h>int cdev_input_receive(struct cdev_state *cds,
void *dst,
unsigned len)Arguments:
- cds
- A pointer to a structure with the character device state (see cdev_state).
- dst
- A pointer to the user-provided destination buffer.
- len
- The length of the buffer, in bytes.
Description:
Use this function if you are managing your own input and output buffers (see cdev_setup()). Calling this function makes sense only if you are NOT using the internal buffers (i.e., you specified a zero buffer size when calling cdev_setup()).
Returns:
If successful, the number of characters read; otherwise, a negative errno value.
Page updated:
