上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 34 下一页
摘要: 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 阅读全文
posted @ 2013-06-23 16:42 IAmAProgrammer 阅读(805) 评论(0) 推荐(0) 编辑
摘要: http://www.allapplabs.com/eclipse/eclipse_shortcuts.htmEclipse ShortcutsNavigational ShortcutsF10Main menuShift F10Context menuCtrl F10View menuWorkspace navigationF12Activate editorCtrl+Shift+WSwitch editorCtrl F6Next editorCtrl Shift F6Prev editorCtrl F7Next workspaceCtrl Shift F7Prev workspaceCtr 阅读全文
posted @ 2013-06-23 16:35 IAmAProgrammer 阅读(417) 评论(0) 推荐(0) 编辑
摘要: How do I make a lower case string in Eclipse to be upper case?Using Eclipse, I want to select a string and either uppercase it or lower case it.How?By default, the hotkey :changes to lower case : CTRL + SHIFT + Ychanges to upper case : CTRL + SHIFT + Xdo you know if this can be added to the Eclipse 阅读全文
posted @ 2013-06-23 16:32 IAmAProgrammer 阅读(974) 评论(0) 推荐(0) 编辑
摘要: http://bbs.csdn.net/topics/380028485整型常量的类型是下列相应表中第一个能表示其值的类型:int --> longint-->longlongint无后缀的十进制整数常量:int,longint,longlongint以字母u或U为后缀的十进制整型常量:unsignedint,unsignedlongint,unsignedlonglongint以字母l或L为后缀的十进制整型常量:longint,longlongint同时以字母u或U和字母l或L为后缀的十进制整型常量:unsignedlongint,unsignedlonglongint以字母ll 阅读全文
posted @ 2013-06-23 01:13 IAmAProgrammer 阅读(481) 评论(0) 推荐(0) 编辑
摘要: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0499b/BEHEIHCE.htmlhe ARM JTAG 20 connector is a 20-way 2.54mm pitch connector. It can be used in either standard JTAG (IEEE 1149.1) mode orSerial Wire Debug(SWD) mode.The following figure shows the ARM JTAG 20 connector pinout:The follo 阅读全文
posted @ 2013-06-22 12:00 IAmAProgrammer 阅读(2384) 评论(0) 推荐(0) 编辑
摘要: TL431作为一个高性价比的常用分流式电压基准,有很广泛的用途。图(1)是TL431的典型接法,输出一个固定电压值,计算公式是:Vout = ( (R1+R2) / R2 ) * 2.5 V同时R3的数值应该满足1mA < (Vcc-Vout)/R3 < 500mA当R1取值为0的时候,R2可以省略,这时候电路变成图(2)的形式TL431在这里相当于一个2.5V稳压管。MC1403是2.5V输出电压基准源,初始电压误差+-25mV,输入电压范围很宽,4.5V-40V的电压输入范围内都可以正常工作,工作电流1.2mA,输出驱动能力是10mA,典型温漂是10ppm/℃,8个引脚中1脚接 阅读全文
posted @ 2013-06-20 22:43 IAmAProgrammer 阅读(13187) 评论(0) 推荐(0) 编辑
摘要: This circuit is much simpler than it sounded like it was going to need to be, due to the revelation that the USB power feed could easily accomodate a ... 阅读全文
posted @ 2013-06-20 22:33 IAmAProgrammer 阅读(2638) 评论(0) 推荐(0) 编辑
摘要: IDA supports more than 50 families of processors. The source code of some of the processor modules is available in our free SDK.IDA Starter EditionIDA Starter Edition supports the following families (64-bit analysis is possible only with IDA Professional Edition)AMD K6-2 3D-Now! extensionsARM Archit 阅读全文
posted @ 2013-06-20 11:12 IAmAProgrammer 阅读(1665) 评论(0) 推荐(0) 编辑
摘要: https://www.hex-rays.com/products/decompiler/We are pleased to present our flagship product, the Hex-Rays Decompiler, which brings binary software analysis within reach of millions of programmers. It converts executable programs into a human readable C-like pseudocode text.In comparison to low level 阅读全文
posted @ 2013-06-20 10:55 IAmAProgrammer 阅读(2127) 评论(0) 推荐(0) 编辑
摘要: http://sourceforge.net/projects/openprogrammer/?source=navbarOpen Programmerhttp://openprog.altervista.org/OP_eng.html#QuickOpen Programmer v0.8.xQuic... 阅读全文
posted @ 2013-06-20 01:44 IAmAProgrammer 阅读(3372) 评论(0) 推荐(0) 编辑
摘要: SIMPLIFIED DIRECT-ACCESS DEVICE (RBC)------------------------------------------OP B Description------------------------------------------00 M TEST UNIT READY12 M INQUIRY1B M START STOP UNIT25 M READ CAPACITY(10)28 M READ(10)2A M WRITE(10)2E M WRITE AND VERIFY(... 阅读全文
posted @ 2013-06-16 16:16 IAmAProgrammer 阅读(566) 评论(0) 推荐(0) 编辑
摘要: struct tagDrives{ WCHAR letter; WCHAR volume[ BUFFER_SIZE ];} g_drives[ 26 ];//WCHAR GetUSBDrive( ){ LPTSTR lpDevID; WCHAR cDrive; DWORD dwSize = BUFFER_SIZE; // Get all removable disks on user laptop. if ( !GetAllRemovableDisks( ) ) { WRITELOG( "Error - GetAllRemovableDisks failed\n" ); . 阅读全文
posted @ 2013-06-16 16:08 IAmAProgrammer 阅读(1697) 评论(0) 推荐(0) 编辑
摘要: http://www.tldp.org/HOWTO/archived/SCSI-Programming-HOWTO/SCSI-Programming-HOWTO-23.html23. A SCSI command code quick referenceTable 365 is a numerical order listing of the command operation codes. Table 365: SCSI-2 Operation Codes+=============================================... 阅读全文
posted @ 2013-06-16 15:37 IAmAProgrammer 阅读(2208) 评论(0) 推荐(0) 编辑
摘要: 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), 阅读全文
posted @ 2013-06-16 12:38 IAmAProgrammer 阅读(856) 评论(0) 推荐(0) 编辑
摘要: http://denniskubes.com/2012/08/14/do-you-know-what-p-does-in-c/Update 1: There were some errors in the first version of this post. Thanks to lmm from hacker news for catching them. Code has been updated.Update 2: Thanks to memorylane from reddit for bugfixes with the last example and suggestions abo 阅读全文
posted @ 2013-06-15 19:57 IAmAProgrammer 阅读(284) 评论(0) 推荐(0) 编辑
摘要: http://en.cppreference.com/w/cpp/language/operator_precedenceThe following table lists the precedence and associativity of C++ operators. Operators are listed top to bottom, in descending precedence.PrecedenceOperatorDescriptionAssociativity1::Scope resolutionLeft-to-right2++--Suffix/postfix increme 阅读全文
posted @ 2013-06-15 19:24 IAmAProgrammer 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2013-06-13 09:50 IAmAProgrammer 阅读(21168) 评论(0) 推荐(3) 编辑
摘要: 苏教版国标本小学语文第一册汉字笔画 阅读全文
posted @ 2013-06-09 15:14 IAmAProgrammer 阅读(2356) 评论(0) 推荐(0) 编辑
摘要: #define PP_ARG_N( \ _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, \ _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, \ _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, \ _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, \ _41, _42, _43, _44, _45, _46, _4... 阅读全文
posted @ 2013-06-09 15:12 IAmAProgrammer 阅读(1233) 评论(0) 推荐(0) 编辑
摘要: http://delphi.about.com/od/objectpascalide/ss/debug-vs-release-in-delphi-build-configurations.htmThe Project Manager window in your Delphi (RAD Studio) IDE displays and organizes the contents of your current project group and any projects it contains. It will list all the units that are part of your 阅读全文
posted @ 2013-06-09 10:09 IAmAProgrammer 阅读(4060) 评论(0) 推荐(0) 编辑
摘要: http://sourceforge.net/projects/dxgettext/DescriptionGNU GetText translation tools for Borland Delphi and Borland C++ Builderhttp://downloads.sourceforge.net/project/dxgettext/For%20Delphi%20and%20C%2B%2B%20Builder/1.2.2/dxgettext-1.2.2.exeBugfixes and improvements to gnugettext.pasThese changes are 阅读全文
posted @ 2013-06-08 23:02 IAmAProgrammer 阅读(1211) 评论(0) 推荐(0) 编辑
摘要: http://blog.dummzeuch.de/category/delphi/Samstag, Dezember 29th, 2012Some might know that I have been using and contributing to theGnuGetText for Delphi and C++ Builderproject. I just had another look into the gnugettext unit and found that it was rather difficult to understand the logic behind all 阅读全文
posted @ 2013-06-08 22:53 IAmAProgrammer 阅读(561) 评论(0) 推荐(0) 编辑
摘要: {$R filename}{$RESOURCE filename}{$R *.xxx}{$R 'My file'}.{$R filename.res filename.rc} The $R directive specifies the name of a resource file to be included in an application or library. The named file must be a Windows resource file and the default extension for filenames is .res. To speci 阅读全文
posted @ 2013-06-08 22:29 IAmAProgrammer 阅读(956) 评论(0) 推荐(0) 编辑
摘要: http://www.beck-ipc.com/files/api/scxxx/rtxover.htmSemaphores are used to guarantee a task mutually exclusive access to a critical resource. Semaphores synchronize asynchronous occurring activities. They are an essential part of a multitasking system. A good description of multitasking systems and.. 阅读全文
posted @ 2013-06-07 23:17 IAmAProgrammer 阅读(540) 评论(0) 推荐(0) 编辑
摘要: The#pragma packdirective modifies the current alignment rule for members of structures following the directive.The#pragma packdirective modifies the current alignment rule for only the members of structures whose declarations follow the directive.It does not affect the alignment of the structure dir 阅读全文
posted @ 2013-06-05 13:22 IAmAProgrammer 阅读(816) 评论(0) 推荐(0) 编辑
摘要: #pragmadirective :Specifies implementation-defined instructions to the compiler.C90 does not permit a#pragmadirective to be produced as the result of a macro expansion. However, the C99_Pragmaoperator enables you to embed a preprocessor macro in a pragma directive, and_Pragmais permitted in C90 if-- 阅读全文
posted @ 2013-06-05 13:14 IAmAProgrammer 阅读(845) 评论(0) 推荐(0) 编辑
摘要: 在做同步时经常会用到 pend, post, accept;现在做下简单的记录:accept: 是去取某个信号量,如果无效则立即返回; Requestpend: 是去取某个信号量, 如果无效则进入休眠; Wait ( P )post: 释放一个信号量; Signal ( V ) 阅读全文
posted @ 2013-06-04 08:49 IAmAProgrammer 阅读(1921) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2013-06-03 00:35 IAmAProgrammer 阅读(2538) 评论(0) 推荐(0) 编辑
摘要: 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; ... 阅读全文
posted @ 2013-05-31 23:12 IAmAProgrammer 阅读(744) 评论(0) 推荐(0) 编辑
摘要: WaitForSingleObject Function ***************************************************Waits until the specified object is in the signaled state or the time-out interval elapses.To enter an alertable wait state, use the WaitForSingleObjectEx function.To wait for multiple objects, use the WaitForMultipleObj 阅读全文
posted @ 2013-05-30 21:20 IAmAProgrammer 阅读(2339) 评论(0) 推荐(0) 编辑
摘要: http://bbs.pediy.com/showthread.php?p=446641http://book.51cto.com/art/201107/275240.htm驱动程序和客户应用程序经常需要进行数据交换,但我们知道驱动程序和客户应用程序可能不在同一个地址空间,因此操作系统必须解决两者之间的数据交换。驱动层和应用层通信,主要是靠DeviceIoControl函数,下面是该函数的原型:BOOL DeviceIoControl ( HANDLE hDevice, // 设备句柄 DWORD dwIoControlCode, // IOCTL请求操作代码 LPVOID lpI... 阅读全文
posted @ 2013-05-30 14:13 IAmAProgrammer 阅读(1553) 评论(0) 推荐(0) 编辑
摘要: Cloak --https://github.com/pfultz2/CloakA mini-preprocessor library to demostrate the recursive capabilites of the preprocessor#define CAT(a, ...) PRIMITIVE_CAT(a, __VA_ARGS__)#define PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__#define INC(x) PRIMITIVE_CAT(... 阅读全文
posted @ 2013-05-28 22:30 IAmAProgrammer 阅读(357) 评论(0) 推荐(0) 编辑
摘要: workaround虽不能根本解决, 但能避开问题的替代方法。避免问题或困难而旁道而行达到目的。权宜之计; 应急之策。原本是电脑术语, 相对于「Fix」而言. 当一个程式有了问题, 找出问题所在然后直接解决它叫做「Fix」; 当问题始终无法解决, 于是想个方法忽略这个问题并使这个问题不致于影响你要用... 阅读全文
posted @ 2013-05-28 10:14 IAmAProgrammer 阅读(366) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <string.h>#include <stdarg.h>#define NUMARGS(...) (sizeof((int[]){__VA_ARGS__})/sizeof(int))#define SUM(...) (sum(NUMARGS(__VA_ARGS__), __VA_ARGS__))void sum( int numargs, ... );int main( int argc, char *argv[ ] ){ SUM( 1 ); SUM( 1, 2 ); SUM( 1, 2, 3 ); S 阅读全文
posted @ 2013-05-28 08:28 IAmAProgrammer 阅读(533) 评论(0) 推荐(0) 编辑
摘要: https://zh.wikipedia.org/wiki/%E9%80%92%E5%BD%92递归(英语:Recursion),又译为递回,在数学与计算机科学中,是指在函数的定义中使用函数自身的方法。递归一词还较常用于描述以自相似方法重复事物的过程。例如,当两面镜子相互之间近似平行时,镜中嵌套的图像是以无限递归的形式出现的。语言例子从前有座山,山里有座庙,庙里有个老和尚,正在给小和尚讲故事呢!故事是什么呢?“从前有座山,山里有座庙,庙里有个老和尚,正在给小和尚讲故事呢!故事是什么呢?‘从前有座山,山里有座庙,庙里有个老和尚,正在给小和尚讲故事呢!故事是什么呢?……’”以下是另一个可能更有利于 阅读全文
posted @ 2013-05-27 20:13 IAmAProgrammer 阅读(1189) 评论(0) 推荐(1) 编辑
摘要: http://c2.com/cgi/wiki?TailRecursionRecursive procedures call themselves to work towards a solution to a problem. In simple implementations this balloons the stack as the nesting gets deeper and deeper, reaches the solution, then returns through all of the stack frames. This waste is a common compla 阅读全文
posted @ 2013-05-27 19:06 IAmAProgrammer 阅读(481) 评论(0) 推荐(0) 编辑
摘要: loop [lu:p]、iterate ['itəreit]、traversal [træ'vɜ:sl]和recursion [rɪˈkɜ:ʃn]分别翻译为:循环、迭代、遍历和递归。循环是计算机科学运算领域的用语,也是一种常见的控制流程。循环是一段在程序中只出现一次,但可能会连续运行多次的代码。循环中的代码会运行特定的次数,或者是运行到特定条件成立时退出循环,或者是针对某一集合中的所有项目都运行一次。在计算机科学中,For循环(英语:For loop)是一种编程语言的迭代陈述,能够让程式码反复的执行。它跟其他的循环,如while循环,最大的不同,是它拥有一个循环计数器 阅读全文
posted @ 2013-05-27 17:19 IAmAProgrammer 阅读(2696) 评论(0) 推荐(0) 编辑
摘要: http://stackoverflow.com/questions/6707148/foreach-macro-on-macros-arguments/13459454#13459454recursive macros are possible in C using a fancy workaround. The end goal is to create aMAPmacro which works like this:#define PRINT(a) printf(#a": %d", a)MAP(PRINT, a, b, c) /* Apply PRINT to a, 阅读全文
posted @ 2013-05-27 02:57 IAmAProgrammer 阅读(511) 评论(0) 推荐(0) 编辑
摘要: http://aggregate.org/MAGIC/The Aggregate Magic AlgorithmsThere are lots of people and places that create and collect algorithms of all types (hereare a few WWW sites). Unfortunately, in building systems hardware and software, we inThe Aggregateoften have found it necessary to do relatively obscure l 阅读全文
posted @ 2013-05-27 00:36 IAmAProgrammer 阅读(174) 评论(0) 推荐(0) 编辑
摘要: http://www.hackersdelight.org/hdcodetxt/nlz.c.txt// This has the programs for computing the number of leading zeros// in a word.// Max line length is 57, to fit in hacker.book.// Compile with g++, not gcc.#include <stdio.h>#include <stdlib.h> // To define "exit", req'd by X 阅读全文
posted @ 2013-05-27 00:30 IAmAProgrammer 阅读(313) 评论(0) 推荐(0) 编辑
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 34 下一页