摘要: 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 阅读全文
posted @ 2013-06-30 23:49 IAmAProgrammer 阅读(1004) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2013-06-30 23:20 IAmAProgrammer 阅读(3180) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2013-06-30 23:04 IAmAProgrammer 阅读(1565) 评论(0) 推荐(0) 编辑
摘要: 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. 阅读全文
posted @ 2013-06-30 22:56 IAmAProgrammer 阅读(2993) 评论(0) 推荐(0) 编辑
摘要: http://code.msdn.microsoft.com/SCSI-Pass-Through-a906ceef/sourcecode?fileId=59048&pathId=1919073465http://code.msdn.microsoft.com/SCSI-Pass-Through-a906ceef/file/59048/13/SCSI%20Pass-Through%20Interface%20Tool.zip/*++ Copyright (c) 1992 Microsoft Corporation Module Name: spti.h Abstract: ... 阅读全文
posted @ 2013-06-30 22:49 IAmAProgrammer 阅读(3528) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2013-06-30 22:44 IAmAProgrammer 阅读(2075) 评论(0) 推荐(0) 编辑
摘要: http://cutebunny.blog.51cto.com/301216/674443最近碰到了个新问题,记录下来作为windows的磁盘操作那个系列的续篇吧。一些时候我们的程序需要区分本地存储设备和USB存储设备。在网上搜一搜一般会找到一个最直接的API,GetDriveType,其原型为UINT GetDriveType(LPCTSTR lpRootPathName)参数lpRootPathName是存储设备的根目录,例如C:\,返回值即为设备类型。Return codeDescriptionDRIVE_REMOVABLEThe drive has removable media; f 阅读全文
posted @ 2013-06-30 22:27 IAmAProgrammer 阅读(3081) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2013-06-30 22:21 IAmAProgrammer 阅读(4811) 评论(0) 推荐(0) 编辑
摘要: http://flyxxtt.blogbus.com/logs/43181576.html函数原型:UINTGetDriveType(LPCTSTR lpRootPathName)参数lpRootPathName是根目录,如"C:\",一定要加上反斜杠。如果给此参数传入NULL将返回程序当前目录的驱动器类型。返回值所代表的类型请看下面的例子。使用例子:wstring getDriveType( LPCTSTR lpRootPathName ){ wstring typename; unsigned int type = GetDriveType( _T( "C:\ 阅读全文
posted @ 2013-06-30 22:19 IAmAProgrammer 阅读(2554) 评论(0) 推荐(0) 编辑
摘要: http://banderlogi.blogspot.com/2011/06/enum-drive-letters-attached-for-usb.htmltypedef enum _STORAGE_BUS_TYPE { BusTypeUnknown = 0x00, BusTypeScsi = 0x01, BusTypeAtapi = 0x02, BusTypeAta = 0x03, BusType1394 = 0x04, BusTypeSsa = 0x05, BusTypeFibre... 阅读全文
posted @ 2013-06-30 22:15 IAmAProgrammer 阅读(1823) 评论(0) 推荐(0) 编辑
摘要: http://www.jubao163.com/it/bianchengwendang/2007-06-17/14948.shtmltypedef struct _SCSI_PASS_THROUGH{ USHORT Length; UCHAR ScsiStatus; UCHAR PathId; UCHAR TargetId; UCHAR Lun; UCHAR CdbLength; UCHAR SenseInfoLength; UCHAR DataIn; ULONG DataTransferLength; ULONG TimeOutValue; ULONG_PTR Data... 阅读全文
posted @ 2013-06-30 22:12 IAmAProgrammer 阅读(777) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2013-06-30 11:33 IAmAProgrammer 阅读(457) 评论(0) 推荐(0) 编辑
摘要: http://210.240.55.2/~t311/moe/engb5/b5grammar/b5tooeither.htm本单元中所谈论的是「也」在英文中的讲法:英文中的「也」共有五种说法,分别是too/either 、 so/neither,及also:(一)too/either:肯定的用too;否定的用either;两者均是放在句尾,且其前加逗号。eg1. He is a student,andI am (a student),too.2. Susan collected stamps,andher sister did/collected stamps,too.3. John doesn 阅读全文
posted @ 2013-06-30 00:06 IAmAProgrammer 阅读(2693) 评论(0) 推荐(0) 编辑