您好,欢迎访问三七文档
324USBUSBUSB1USBPCUSB480MbpsUSBhubUSBhostcontrollerUSBUSBUSBUSBI/OUSB2USBclass1LinuxUSBUSBGPL2325USBUSBUSBLinuxUSBhostdeviceUSBUSBUSBUSBUSBUSBUSBdevicedriversUSBUSBUSBgadgetdriversLinuxUSBUSBUSB13-1USBUSBUSBUSBUSBUSBUSBUSBUSBVFSTTY...13-1USB326USBUSBUSB*altsettingstructusb_host_interfacestructusb_host_endpointunsignednum_altsettingaltsettingstructusb_host_interface*cur_altsettingaltsetting329USBintminorUSBUSBUSBusb_register_devstructusb_interfaceUSBUSBUSBLinuxUSBLinuxstructusb_host_configUSBstructusb_deviceUSBUSBinclude/linux/usb.hUSBstructusb_interfacestructusb_deviceUSBinterface_to_usbdevstructusb_deviceUSBstructusb_interfaceUSB••••USBSysfsUSBsysfsUSB330structusb_deviceUSBstructusb_interfacesysfsstructdeviceUSBUSBsysfs/sys/devices/pci0000:00/0000:00:09.0/usb2/2-1|--2-1:1.0||--bAlternateSetting||--bInterfaceClass||--bInterfaceNumber||--bInterfaceProtocol||--bInterfaceSubClass||--bNumEndpoints||--detach_state||--iInterface|`--power|`--state|--bConfigurationValue|--bDeviceClass|--bDeviceProtocol|--bDeviceSubClass|--bMaxPower|--bNumConfigurations|--bNumInterfaces|--bcdDevice|--bmAttributes|--detach_state|--devnum|--idProduct|--idVendor|--maxchild|--power|`--state|--speed`--versionstructusb_device/sys/devices/pci0000:00/0000:00:09.0/usb2/2-1USBUSB/sys/devices/pci0000:00/0000:00:09.0/usb2/2-1/2-1:1.0USBUSBroothubUSBPCIUSBPCIUSBUSB331USBUSBusb2USBUSB1USB2-1USBsysfsUSB2-1USB2-1:1.0USBsysfs-:.USBUSB--:.USBUSBsysfsidVendoridProductbMaxPowerbConfigurationValueUSBUSBUSBsysfsUSBusbfs/proc/bus/usb//proc/bus/usb/devicessysfsUSBusbfsUSBUSBSANEUSBurbLinuxUSBurbUSBUSBstructurbinclude/linux/usb.h332urb/USBUSB/I/OkiocbstructskbuffUSBurburburburburb•USB•USB•USBUSB•USBUSB•USBUSB•urbUSBUSBurburbUSBurburburbUSBstructurbstructurbUSBstructusb_device*devurbstructusb_deviceurbUSBUSBunsignedintpipeurbstructusb_deviceurbUSBUSB333USBunsignedintusb_sndctrlpipe(structusb_device*dev,unsignedintendpoint)USBOUTunsignedintusb_rcvctrlpipe(structusb_device*dev,unsignedintendpoint)USBINunsignedintusb_sndbulkpipe(structusb_device*dev,unsignedintendpoint)USBOUTunsignedintusb_rcvbulkpipe(structusb_device*dev,unsignedintendpoint)USBINunsignedintusb_sndintpipe(structusb_device*dev,unsignedintendpoint)USBOUTunsignedintusb_rcvintpipe(structusb_device*dev,unsignedintendpoint)USBINunsignedintusb_sndisocpipe(structusb_device*dev,unsignedintendpoint)USBOUTunsignedintusb_rcvisocpipe(structusb_device*dev,unsignedintendpoint)USBINunsignedinttransfer_flagsUSBurbURB_SHORT_NOT_OKINUSBUSBurburbURB_ISO_ASAPurburb334urbstart_frameurbstart_frameurbURB_NO_TRANSFER_DMA_MAPurbDMAUSBtransfer_dmatransfer_bufferURB_NO_SETUP_DMA_MAPURB_NO_TRANSFER_DMA_MAPDMAurbUSBsetup_dmasetup_packetURB_ASYNC_UNLINKurbusb_unlink_urburburbURB_NO_FSBRUHCIUSBFrontSideBusReclamationUHCICPUPCIurbURB_ZERO_PACKETurbUSBUSBIRURB_NO_INTERRUPTurburbUSBDMAvoid*transfer_bufferOUTurbINurbkmallocdma_addr_ttransfer_dmaDMAUSB335USBinttransfer_buffer_lengthtransfer_buffertransfer_dmaurb0USBOUTUSBUSBurbUSBunsignedchar*setup_packeturburbdma_addr_tsetup_dmaurbDMAurbusb_complete_tcompleteurbUSBUSBurburbusb_complete_ttypedefvoid(*usb_complete_t)(structurb*,structpt_regs*);void*contextUSBurbintactual_lengthurburbOUTurburbINurbINurbtransfer_buffer_lengthintstatusurbUSBurbUSBurburburbUSBurb0urburbiso_frame_desc3360urb-ENOENTurbusb_kill_urb-ECONNRESETurbusb_unlink_urburbtransfer_flagsURB_ASYNC_UNLINK-EINPROGRESSurbUSB-EPROTOurb•bitstuff•-EILSEQurbCRC-EPIPEusb_clear_halt-ECOMMINurb-ENOSRUSBOUTurb-EOVERFLOWurbbabble-EREMOTEIOurbtransfer_flagsURB_SHORT_NOT_OKurb337USB-ENODEVUSB-EXDEVurb-EINVALurbUSBurbusb_submit_urburbUSB-ESHUTDOWNUSBurburb-EPROTO-EILSEQ-EOVERFLOWintstart_frameintintervalurburbmicroframe1/8urburbUSBUSBintnumber_of_packetsurburburburbUSBUSBinterror_countUSBurbstructusb_iso_packet_descriptoriso_frame_desc[0]urbstructusb_iso_packet_descriptorurb338structusb_iso_packet_descriptorunsignedintoffset0unsignedintlengthunsignedintactual_lengthunsignedintstatusstructurburbstructurbUSBurbusb_alloc_urbstructurb*usb_alloc_urb(intiso_packets,intmem_flags);iso_packetsurburb0mem_flagskmallocurburbNULLUSBurbUSBurbusb_free_urbUSBurbvoidusb_free_urb(structurb*urb);structurburb339USBurbusb_fill_int_urbUSBurbvoidusb_fill_int_urb(structurb*urb,structusb_device*dev,unsignedintpipe,void*transfer_buffer,intbuffer_length,usb_complete_tcomplete,void*context,intinterval);structurb*urburbstructusb_device*devurbUSBunsignedintpipeurbUSBusb_sndintpipeusb_rcvintpipe
本文标题:USB驱动程序编写
链接地址:https://www.777doc.com/doc-6438962 .html