文档详情

什么usbusb driver stackUSB驱动程序堆栈.pdf

发布:2025-05-31约5.48千字共6页下载文档
文本预览下载声明

WhatisUSB

Thatisaconnectionbetweenahostcomputerandanumber

ofperipheraldevices.

USBBus

Topologically,aUSBsubsystemisnotlaidoutasabus;it

isratheratreebuiltoutofseveralpoint-to-pointlinks.

Thelinksarefour-wirecables(ground,power,andtwo

signalwires)thatconnectadeviceandahub,justlike

twisted-pairEthernet.

WorkMode

TheUSBhostcontrollerisinchargeofaskingeveryUSB

deviceifithasanydatatosend.

Becauseofthistopology,aUSBdevicecanneverstart

sendingdatawithoutfirstbeingaskedtobythehost

controller.

DriverLinuxdriversupport

TheLinuxkernelsupportstwomaintypesofUSBdrivers:

driversonahostsystemanddriversonadevice.

Fromthehost’spointofview,TheUSBdriversforahost

systemcontroltheUSBdevicesthatarepluggedintoit.

TheUSBdriversinadevice,controlhowthatsingledevice

lookstothehostcomputerasaUSBdevice.

USBdriverslivweenthedifferentkernelsubsytems

(block,net,char,etc.)andtheUSBhardwarecontrollers.

TheUSBcoreprovidesaninterfaceforUSBdriverstouseto

accessandcontroltheUSBhardware,withouthavingtoworry

aboutthedifferenttypesofUSBhardwarecontrollersthat

arepresentonthesystem.

Note:usbcoreimplementtheUSBbusspecification

TheFigureaboveshowshowUSBdevicesconsistof

configurations,interfaces,andendpointsandhowUSBdrivers

bindtoUSBinterfaces,nottheentireUSBdevice.

Endpoints

ThemostbasicformofUSBcommunicationisthroughsomething

calledanendpoint.AUSBendpointcancarrydatainonlyone

direction,eitherfromthehostcomputertothedevice

(calledanOUTendpoint)orfromthedevicetothehost

computer(calledanIN

显示全部
相似文档