随笔分类 - USB
摘要:6.4 Device Error HandlingThe device may not be able to fully satisfy the host's request.At the point when the device discovers that itcannot fully satisfy the request,there may be a Data-In or Data-Out transfer in progress on the bus,and the hostmay have other pending requests.The device may cau
阅读全文
摘要:http://stackoverflow.com/questions/14363152/send-custom-commands-to-mass-storage-deviceI have developed a mass-storage device, and I'd a like a PC application to send/receive some custom commands to it. Normally one would create a composite USB device for this (MSC+HID) and send the commands ove
阅读全文
摘要:http://social.msdn.microsoft.com/Forums/windowsdesktop/zh-CN/35620a05-43be-46a8-8cbe-846bc8295d85/usb-mass-storage-cWe have an USB mass storage / Memory Stick device with an additional device on it. We communicate with PassThrough mechanism to the device.Normally USB spec says that on USB level not
阅读全文
摘要:http://arm-utilities.googlecode.com/svn-history/r47/trunk/stlink-download/stlink-download.c/* STLink download/debug interface for Linux. *//* This program interacts with the STMicro USB STLink programming/debug interface for STMicro microcontrollers. The STLink is found on STM8 and STM32VLDiscovery.
阅读全文
摘要:http://www.ezblog.idv.tw/Download/USBStorage.rar這是一個不透過檔案系統,去讀寫USB Mass Storage 任何位置(包含FAT)的方式首先需安裝微軟的DDK並include "usbioctl.h" , "usbdi.h" , "ntddscsi.h"有幾個資料結構要定義typedef struct _SCSI_Device_Info_{ SCSI_PASS_THROUGH Spt; BYTE Sense[ 18 ]; BYTE Data[ 36 ];} SCSI_Device_I
阅读全文
摘要:http://bbs3.driverdevelop.com/simple/?t84347.html{ BOOL status = 0; DWORD accessMode = 0, shareMode = 0; HANDLE fileHandle = NULL;//PUCHAR dataBuffer = NULL; SCSI_PASS_THROUGH_WITH_BUFFERS sptwb; SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER sptdwb; UCHAR buffer[ 2048 ]; UCHAR string[ 25 ]; ULONG len...
阅读全文
摘要:http://fx.damasgate.com/more-about-stall/In other USB classes, a sender can indicate the end of a transfer by transmitting a short packet, which is a data packet that contains zero data bytes or any quantity fewer than wMaxPacketSize.The mass-storage class is unique in its use of the STALL handshake
阅读全文
摘要:http://blog.csdn.net/xgbing/article/details/7002558USB Mass Storage 6.7 The Thirteen Class章节的理解Case(1), case(6), case(12)状态下是正常的数据传输,被称为“The thin diagonal”。其它的状态是协议外的内容,是一些判断。6.7.1 主机期望发起一次无数据传输的命令CBW包中的dCBWDataTransferLength字段=0,Direction位不考虑。主机做的工作:(1) 发送一个CBW(2) 偿试接收CSW(3) 如果在STALL状态下接收到CSW:先清空BU
阅读全文
摘要:a) USB transfer speed of MSC-BOT (Mass-Storage Class - Bulk-Only Transport)MSC-BOT protocol has overhead to transfer data on both direction.READ10/WRITE10 SCSI commands are carried by this BOT protocol.CBW - Data transport (IN/OUT) - CSWWhen Host runs OHCI or UHCI host controller (as usual on PCs),
阅读全文
摘要:http://www.crifan.com/files/doc/docbook/usb_disk_driver/release/htmls/ch02_msc_basic.htmlUSB Mass Storage FrameworkPC电脑和U盘之间的关系,以及物理上的组成,可以用下图表示更深入的剖析,对于普通U盘的内部结构,则是一个USB物理接口,加上对应的控制芯片(微控制器(含Nand Flash的控制器)+ USB设备控制器)和一个Nand Flash芯片:PC和U盘的内部逻辑框图PC和U盘的之间的抽象的逻辑关系,可用下图来表示:USB MSC设备中的固件(firmware)或者硬件(ha
阅读全文
摘要:http://msdn.microsoft.com/en-us/library/windows/hardware/hh920375(v=vs.85).aspxA Universal Serial Bus (USB) device defines its capabilities and features through configurations, interfaces, alternate settings, and endpoints. This topic provides a high-level overview of those concepts. For details, se
阅读全文
摘要:http://www.delphibasics.info/home/delphibasicssnippets/detectusbdeviceinsertandremoval-uusbbytestestunit uUsb;//Author: testestinterfaceuses Windows, Messages, Classes;type PDevBroadcastHdr = ^DEV_BROADCAST_HDR; DEV_BROADCAST_HDR = packed record dbch_size: DWORD; dbch_devicetype: DWORD; ...
阅读全文
摘要:/*************************************************************************** ftdi.c - description ------------------- begin : Fri Apr 4 2003 copyright : (C) 2003 by Intra2net AG email : opensource@intra2net.com Modified : April, 2007 : Craig Van...
阅读全文
摘要:/*************************************************************************** ftdi.c - description ------------------- begin : Fri Apr 4 2003 copyright : (C) 2003 by Intra2net AG email : opensource@intra2net.com **********************************************...
阅读全文
摘要:unit USBDeviceNotify;//USB Device arrival or removeinterfaceuses Windows, Messages, SysUtils, Classes, Forms;type PDevBroadcastHdr = ^DEV_BROADCAST_HDR; DEV_BROADCAST_HDR = packed record dbch_size: DWORD; dbch_devicetype: DWORD; dbch_reserved: DWORD; end; PDevBroadcastDev...
阅读全文
摘要:参见USB枚举过程USB枚举过程图示http://blogs.msdn.com/b/usbcoreblog/archive/2010/09/11/9915562.aspxDevice enumeration for a USB port begins when the hub indicate a ...
阅读全文
摘要:ClassUsageDescriptionExamples00hDeviceUnspecifiedclass 0(Device class is unspecified. Interface descriptors are used for determining the required drivers.)01hInterfaceAudioSpeaker,microphone,sound card02hBothCommunications and CDC ControlEthernet adapter,modem,serial port adapter03hInterfaceHuman In
阅读全文
摘要:简单讲,OHCI,UHCI都是USB1.1的接口标准,而EHCI是对应USB2.0接口标准,最新的XHCI是USB3.0的接口标准。1.OHCI(Open Host Controller Interface)是支持USB1.1标准,但不只是针对USB,还支持其他的一些接口,比如它还支持Apple的火线(Firewire,IEEE 1394)接口。与UHCI相比,OHCI的硬件复杂,硬件做的事情更多,所以实现对应的驱动的任务就相对简单。主要用于非X86的USB,如扩展卡,嵌入式开发板的USB主控。2.UHCI(Universal Host Controller Interface), 是Inte
阅读全文
摘要:USB Composite Class DevicesA USB Composite Device is any device which does more than one jobfor example a combined keyboard and mouse.A USB Composite device is the one with multiple interfaces controlled independently of each other. When using such device multiple functions are combined into a singl
阅读全文
摘要:Standard DescriptorsADevice Descriptordescribes general information about a USB device. It includes information that applies globally to the device and all of the device's configurations. A USB device has only one device descriptor.TheConfiguration Descriptorgives information about a specific de
阅读全文