cdev_input_receive()
Read available data from a host device into a provided buffer
Note:
The cdev_input_receive() function is deprecated and will be
removed in a future release. When writing new character devices or updating existing
ones, use the internal buffers.
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 buffer for storing the data.
- len
- The length of the buffer, in bytes.
Description:
Use this function to read available input data from the specified host device if you are managing your own buffers and hence, 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:
