Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The ulpt_start_write function is executed when a process writes to ulpt%d or unlpt%d. Here is its function definition:
static void
ulpt_start_write(struct usb_fifo *fifo)
{
struct ulpt_softc *sc = usb_fifo_softc(fifo);
usbd_transfer_start(sc->sc_transfer[
ULPT_BULK_DT_WR]);
}
This function simply starts a transaction with the printer’s
bulk OUT endpoint. Note that the callback for a bulk OUT endpoint is
ulpt_write_callback (for confirmation, see the first usb_config structure in Example 15-1).