Belkin F8E211 Guía de usuario Pagina 22

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 114
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 21
How a class driver works 2006, QNX Software Systems GmbH & Co. KG.
USB enumerator
With the QNX Neutrino OS, the USB enumerator attaches to the USB
stack and waits for device insertions. When a device insertion is
detected, the enumerator looks in the configuration manager’s
database to see which class driver it should start. It then starts the
appropriate driver, which provides for that class of device. For
example, a USB Ethernet class driver would register with
io-net
and bring the interface up.
For small, deeply embedded systems, the enumerator isn’t required.
The class drivers can be started individually — they’ll wait around for
their particular devices to be detected by the stack. At that point,
they’ll provide the appropriate services for that 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.
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.).
10 Chapter 2 Overview November 2, 2006
Vista de pagina 21
1 2 ... 17 18 19 20 21 22 23 24 25 26 27 ... 113 114

Comentarios a estos manuales

Sin comentarios