Transfer available data from the internal input buffer to a user-provided buffer
#include <qvm/cdev.h>
int cdev_read(struct cdev_state *cds, uint8_t *data, unsigned len)
Use this function to read data from an internal buffer and put it in your own buffer.
If successful, the number of bytes actually read; otherwise, a negative errno value.