Write the contents of the internal buffer to the device
#include <qvm/cdev.h>
int cdev_write_buffer(struct cdev_state *cds)
The buffer is the one referenced by the cdev_state structure's out.buff member. You can use this function only if you passed in a non-zero size for the buffers you created 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.
If successful, the number of bytes written; otherwise, -1 (minus one).