Belkin F8E211 Guida Utente Pagina 22

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 107
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 21
How a class dr iver works © 2007, QNX Software Systems GmbH & Co. KG.
class of device, just as if they’d been started by the enumerator. When a device is
removed, the enumerator will shut down the class driver.
For more information about device enumeration, see the Controlling How Neutrino
Starts chapter of the Neutrino User’s Guide.
How a class driver works
A class driver typically performs the following operations:
1 Connect to the USB stack (usbd
_
connect()) and provide two callbacks: one for
insertion and one for removal.
2 In the insertion callback:
2a Connect to the USB device (usbd
_
attach()).
2b Get descriptors (usbd
_
descriptor()).
2c Select the configuration (usbd
_
select
_
config()) and interface
(usbd
_
select
_
interface()).
2d Set up communications pipes to the appropriate endpoint
(usbd
_
open
_
pipe()).
3 In the removal callback, detach from the USB device (usbd
_
detach()).
4 Set up all data communications (e.g. reading and writing data, sending and
receiving control information, etc.) via the usbd
_
setup
_
*() functions
(usbd
_
setup
_
bulk(), usbd
_
setup
_
interrupt(), etc.).
5 Initiate data transfer using the usbd
_
io() function (with completion callbacks if
required).
In this context, the term “pipe” is a USB-specific term that has nothing to do with
standard POSIX “pipes” (as used, for example, in the command line
ls | more). In
USB terminology, a “pipe” is simply a handle; something that identifies a connection
to an endpoint.
8 Chapter 2 Overview September 10, 2007
Vedere la pagina 21
1 2 ... 17 18 19 20 21 22 23 24 25 26 27 ... 106 107

Commenti su questo manuale

Nessun commento