cdev_write_buffer()

Write the contents of the internal buffer to a host device

Synopsis:

#include <qvm/cdev.h>
int cdev_write_buffer(struct cdev_state *cds)

Arguments:

cds
A pointer to a structure with the character device state (see cdev_state).

Description:

Use this function to write the data from the internal buffer to the specified host device. The buffer is referenced by the cds->out.buff member. Use this function only if you passed in a non-zero buffer size when you called cdev_setup(). In this case, when you aren't providing your own buffer, you must call this function when handling the CDEV_OUTPUT_AVAILABLE_PULSE_CODE pulse.

Returns:

If successful, the number of bytes actually written to the device; otherwise, minus one (-1).

Page updated: