Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Tying Everything Together > ulpt_start_write Function

ulpt_start_write Function

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).


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial