cdev_read()
Read device data from the device's internal input buffer into a supplied buffer
Synopsis:
#include <qvm/cdev.h>int cdev_read(struct cdev_state *cds,
uint8_t *data,
unsigned len)Arguments:
- cds
- A pointer to a structure with the character device state (see cdev_state).
- data
- A pointer to your buffer, which will receive the data.
- len
- The number of bytes available in your buffer.
Description:
Use this function to read data from a device's internal input buffer into your own buffer.
Returns:
If successful, the number of bytes actually written into your buffer; otherwise, a negative errno value.
Page updated:
