亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

蟲蟲首頁| 資源下載| 資源專輯| 精品軟件
登錄| 注冊

GCC-the-Complete-Reference

  • 對帶有uPSD3234A的DK3200的USB演示

    The μPSD32xx family, from ST, consists of Flash programmable system devices with a 8032 Microcontroller Core. Of these, the μPSD3234A and μPSD3254A are notable for having a complete implementation of the USB hardware directly on the chip, complying with the Universal Serial Bus Specification, Revision 1.1.This application note describes a demonstration program that has been written for the DK3200 hardware demonstration kit (incorporating a μPSD3234A device). It gives the user an idea of how simple it is to work with the device, using the HID class as a ready-made device driver for the USB connection.

    標簽: 3234A uPSD 3234 3200

    上傳時間: 2014-04-03

    上傳用戶:lizhizheng88

  • P90CL301 I2C driver routines

    This application note shows how to write an Inter Integrated Circuit bus driver (I²C) for the Philips P90CL301micro-controller.It is not only an example of writing a driver, but it also includes a set of application interface software routines toquickly implement a complete I²C multi-master system application.For specific applications the user will have to make minimal changes in the driver program. Using the drivermeans linking modules to your application software and including a header-file into the application sourceprograms. A small example program of how to use the driver is listed.The driver supports i.a. polled or interrupt driven message handling, slave message transfers and multi-mastersystem applications. Furthermore, it is made suitable for use in conjunction with real time operating systems, likepSOS+.

    標簽: routines driver P90 301

    上傳時間: 2013-11-23

    上傳用戶:weixiao99

  • P90CL301 IIC驅動電路的例行測試及其程序

    The P90CL301 is a highly integrated 16/32 bit micro-controller especially suitable for applications requiring lowvoltage and low power consumption. It is fully software compatible with the 68000. Furthermore, it provides bothstandard as well as advanced peripheral functions on-chip.One of these peripheral functions is the I2C bus. This report describes worked-out driver software (written in C) toprogram the P90CL301 I2C interface. It also contains interface software routines offering the user a quick start inwriting a complete I2C system application.

    標簽: P90 301 IIC 90

    上傳時間: 2014-01-06

    上傳用戶:氣溫達上千萬的

  • XA-S3 I2C driver software

    This application note demonstrates how to write an Inter Integrated Circuit bus driver (I2C) for the XA-S3 16-bitMicrocontroller from Philips Semiconductors.Not only the driver software is given. This note also contains a set of (example) interface routines and a smalldemo application program. All together it offers the user a quick start in writing a complete I2C system applicationwith the PXAS3x.The driver routines support interrupt driven single master transfers. Furthermore, the routines are suitable foruse in conjunction with real time operating systems.

    標簽: software driver XA-S I2C

    上傳時間: 2013-11-02

    上傳用戶:zw380105939

  • XA-S3的IIC接口的驅動器軟件程序(C語言)

    The XA-S3 is a member of Philips Semiconductors’ XA (eXtended Architecture) family of high performance 16-bit single-chip Microcontrollers. The XA-S3 combines many powerful peripherals on one chip. Therefore, it is suited for general multipurpose high performance embedded control functions.One of the on-chip peripherals is the I2C bus interface. This report describes worked-out driver software (written in C) to program / use the I2C interface of the XA-S3. The driver software, together with a demo program and interface software routines offer the user a quick start in writing a complete I2C - XAS3 system application.

    標簽: XA-S IIC C語言 接口

    上傳時間: 2013-11-10

    上傳用戶:liaofamous

  • I2C slave routines for the 87L

    The 87LPC76X Microcontroller combines in a small package thebenefits of a high-performance microcontroller with on-boardhardware supporting the Inter-Integrated Circuit (I2C) bus interface.The 87LPC76X can be programmed both as an I2C bus master, aslave, or both. An overview of the I2C bus and description of the bussupport hardware in the 87LPC76X microcontrollers appears inapplication note AN464, Using the 87LPC76X Microcontroller as anI2C Bus Master. That application note includes a programmingexample, demonstrating a bus-master code. Here we show anexample of programming the microcontroller as an I2C slave.The code listing demonstrates communications routines for the87LPC76X as a slave on the I2C bus. It compliments the program inAN464 which demonstrates the 87LPC76X as an I2C bus master.One may demonstrate two 87LPC76X devices communicating witheach other on the I2C bus, using the AN464 code in one, and theprogram presented here in the other. The examples presented hereand in AN464 allow the 87LPC76X to be either a master or a slave,but not both. Switching between master and slave roles in amultimaster environment is described in application note AN435.The software for a slave on the bus is relatively simple, as theprocessor plays a relatively passive role. It does not initiate bustransfers on its own, but responds to a master initiating thecommunications. This is true whether the slave receives or transmitsdata—transmission takes place only as a response to a busmaster’s request. The slave does not have to worry about arbitrationor about devices which do not acknowledge their address. As theslave is not supposed to take control of the bus, we do not demandit to resolve bus exceptions or “hangups”. If the bus becomesinactive the processor simply withdraws, not interfering with themaster (or masters) on the bus which should (hopefully) try toresolve the situation.

    標簽: routines slave I2C 87L

    上傳時間: 2013-11-19

    上傳用戶:shirleyYim

  • Using the 87LPC76X microcontro

    I2C interface, is a very powerful tool for system designers. Theintegrated protocols allow systems to be completely software defined.Software development time of different products can be reduced byassembling a library of reusable software modules. In addition, themultimaster capability allows rapid testing and alignment ofend-products via external connections to an assembly-line computer.The mask programmable 87LPC76X and its EPROM version, the87LPC76X, can operate as a master or a slave device on the I2Csmall area network. In addition to the efficient interface to thededicated function ICs in the I2C family, the on-board interfacefacilities I/O and RAM expansion, access to EEPROM andprocessor-to-processor communications.

    標簽: microcontro Using 76X LPC

    上傳時間: 2013-12-30

    上傳用戶:Artemis

  • 驅動程序與應用程序的接口

    有兩種方式可以讓設備和應用程序之間聯系:1. 通過為設備創建的一個符號鏈;2. 通過輸出到一個接口WDM驅動程序建議使用輸出到一個接口而不推薦使用創建符號鏈的方法。這個接口保證PDO的安全,也保證安全地創建一個惟一的、獨立于語言的訪問設備的方法。一個應用程序使用Win32APIs來調用設備。在某個Win32 APIs和設備對象的分發函數之間存在一個映射關系。獲得對設備對象訪問的第一步就是打開一個設備對象的句柄。 用符號鏈打開一個設備的句柄為了打開一個設備,應用程序需要使用CreateFile。如果該設備有一個符號鏈出口,應用程序可以用下面這個例子的形式打開句柄:hDevice = CreateFile("\\\\.\\OMNIPORT3",  GENERIC_READ | GENERIC_WRITE,FILE_SHARE_READ,  NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL ,NULL);文件路徑名的前綴“\\.\”告訴系統本調用希望打開一個設備。這個設備必須有一個符號鏈,以便應用程序能夠打開它。有關細節查看有關Kdevice和CreateLink的內容。在上述調用中第一個參數中前綴后的部分就是這個符號鏈的名字。注意:CreatFile中的第一個參數不是Windows 98/2000中驅動程序(.sys文件)的路徑。是到設備對象的符號鏈。如果使用DriverWizard產生驅動程序,它通常使用類KunitizedName來構成設備的符號鏈。這意味著符號鏈名有一個附加的數字,通常是0。例如:如果鏈接名稱的主干是L“TestDevice”那么在CreateFile中的串就該是“\\\\.\\TestDevice0”。如果應用程序需要被覆蓋的I/O,第六個參數(Flags)必須或上FILE_FLAG_OVERLAPPED。 使用一個輸出接口打開句柄用這種方式打開一個句柄會稍微麻煩一些。DriverWorks庫提供兩個助手類來使獲得對該接口的訪問容易一些,這兩個類是CDeviceInterface, 和 CdeviceInterfaceClass。CdeviceInterfaceClass類封裝了一個設備信息集,該信息集包含了特殊類中的所有設備接口信息。應用程序能有用CdeviceInterfaceClass類的一個實例來獲得一個或更多的CdeviceInterface類的實例。CdeviceInterface類是一個單一設備接口的抽象。它的成員函數DevicePath()返回一個路徑名的指針,該指針可以在CreateFile中使用來打開設備。下面用一個小例子來顯示這些類最基本的使用方法:extern GUID TestGuid;HANDLE OpenByInterface(  GUID* pClassGuid,  DWORD instance,  PDWORD pError){  CDeviceInterfaceClass DevClass(pClassGuid, pError);  if (*pError != ERROR_SUCCESS)    return INVALID_HANDLE_VALUE;  CDeviceInterface DevInterface(&DevClass, instance, pError);  if (*pError != ERROR_SUCCESS)    return INVALID_HANDLE_VALUE;  cout << "The device path is "    << DevInterface.DevicePath()    << endl;   HANDLE hDev;  hDev = CreateFile(   DevInterface.DevicePath(),    GENERIC_READ | GENERIC_WRITE,    FILE_SHARE_READ | FILE_SHARE_WRITE,    NULL,    OPEN_EXISTING,    FILE_ATTRIBUTE_NORMAL,    NULL  );  if (hDev == INVALID_HANDLE_VALUE)    *pError = GetLastError();  return hDev;} 在設備中執行I/O操作一旦應用程序獲得一個有效的設備句柄,它就能使用Win32 APIs來產生到設備對象的IRPs。下面的表顯示了這種對應關系。Win32 API  DRIVER_FUNCTION_xxxIRP_MJ_xxx  KDevice subclass member function CreateFile  CREATE  Create ReadFile  READ  Read WriteFile  WRITE  Write DeviceIoControl  DEVICE_CONTROL  DeviceControl CloseHandle  CLOSECLEANUP  CloseCleanUp 需要解釋一下設備類成員的Close和CleanUp:CreateFile使內核為設備創建一個新的文件對象。這使得多個句柄可以映射同一個文件對象。當這個文件對象的最后一個用戶級句柄被撤銷后,I/O管理器調用CleanUp。當沒有任何用戶級和核心級的對文件對象的訪問的時候,I/O管理器調用Close。如果被打開的設備不支持指定的功能,則調用相應的Win32將引起錯誤(無效功能)。以前為Windows95編寫的VxD的應用程序代碼中可能會在打開設備的時候使用FILE_FLAG_DELETE_ON_CLOSE屬性。在Windows NT/2000中,建議不要使用這個屬性,因為它將導致沒有特權的用戶企圖打開這個設備,這是不可能成功的。I/O管理器將ReadFile和WriteFile的buff參數轉換成IRP域的方法依賴于設備對象的屬性。當設備設置DO_DIRECT_IO標志,I/O管理器將buff鎖住在存儲器中,并且創建了一個存儲在IRP中的MDL域。一個設備可以通過調用Kirp::Mdl來存取MDL。當設備設置DO_BUFFERED_IO標志,設備對象分別通過KIrp::BufferedReadDest或 KIrp::BufferedWriteSource為讀或寫操作獲得buff地址。當設備不設置DO_BUFFERED_IO標志也不設置DO_DIRECT_IO,內核設置IRP 的UserBuffer域來對應ReadFile或WriteFile中的buff參數。然而,存儲區并沒有被鎖住而且地址只對調用進程有效。驅動程序可以使用KIrp::UserBuffer來存取IRP域。對于DeviceIoControl調用,buffer參數的轉換依賴于特殊的I/O控制代碼,它不在設備對象的特性中。宏CTL_CODE(在winioctl.h中定義)用來構造控制代碼。這個宏的其中一個參數指明緩沖方法是METHOD_BUFFERED, METHOD_IN_DIRECT, METHOD_OUT_DIRECT, 或METHOD_NEITHER。下面的表顯示了這些方法和與之對應的能獲得輸入緩沖與輸出緩沖的KIrp中的成員函數:Method  Input Buffer Parameter  Output Buffer Parameter METHOD_BUFFERED  KIrp::IoctlBuffer KIrp::IoctlBuffer METHOD_IN_DIRECT  KIrp::IoctlBuffer KIrp::Mdl METHOD_OUT_DIRECT  KIrp::IoctlBuffer KIrp::Mdl METHOD_NEITHER  KIrp::IoctlType3InputBuffer KIrp::UserBuffer 如果控制代碼指明METHOD_BUFFERED,系統分配一個單一的緩沖來作為輸入與輸出。驅動程序必須在向輸出緩沖放數據之前拷貝輸入數據。驅動程序通過調用KIrp::IoctlBuffer獲得緩沖地址。在完成時,I/O管理器從系統緩沖拷貝數據到提供給Ring 3級調用者使用的緩沖中。驅動程序必須在結束前存儲拷貝到IRP的Information成員中的數據個數。如果控制代碼不指明METHOD_IN_DIRECT或METHOD_OUT_DIRECT,則DeviceIoControl的參數呈現不同的含義。參數InputBuffer被拷貝到一個系統緩沖,這個緩沖驅動程序可以通過調用KIrp::IoctlBuffer。參數OutputBuffer被映射到KMemory對象,驅動程序對這個對象的訪問通過調用KIrp::Mdl來實現。對于METHOD_OUT_DIRECT,調用者必須有對緩沖的寫訪問權限。注意,對METHOD_NEITHER,內核只提供虛擬地址;它不會做映射來配置緩沖。虛擬地址只對調用進程有效。這里是一個用METHOD_BUFFERED的例子:首先,使用宏CTL_CODE來定義一個IOCTL代碼:#define IOCTL_MYDEV_GET_FIRMWARE_REV \CTL_CODE (FILE_DEVICE_UNKNOWN,0,METHOD_BUFFERED,FILE_ANY_ACCESS)現在使用一個DeviceIoControl調用:BOOLEAN b;CHAR FirmwareRev[60];ULONG FirmwareRevSize;b = DeviceIoControl(hDevice, IOCTL_MYDEV_GET_VERSION_STRING,  NULL, // no input  注意,這里放的是包含有執行操作命令的字符串指針  0, FirmwareRev,      //這里是output串指針,存放從驅動程序中返回的字符串。sizeof(FirmwareRev),& FirmwareRevSize,  NULL // not overlapped I/O );如果輸出緩沖足夠大,設備拷貝串到里面并將拷貝的資結束設置到FirmwareRevSize中。在驅動程序中,代碼看起來如下所示:const char* FIRMWARE_REV = "FW 16.33 v5";NTSTATUS MyDevice::DeviceControl( KIrp I ){  ULONG fwLength=0;  switch ( I.IoctlCode() )  {    case IOCTL_MYDEV_GET_FIRMWARE_REV:      fwLength = strlen(FIRMWARE_REV)+1;      if (I.IoctlOutputBufferSize() >= fwLength)      {        strcpy((PCHAR)I.IoctlBuffer(),FIRMWARE_REV);        I.Information() = fwLength;         return I.Complete(STATUS_SUCCESS);      }      else      {              }    case . . .   } }

    標簽: 驅動程序 應用程序 接口

    上傳時間: 2013-10-17

    上傳用戶:gai928943

  • 51編程指南--MCSÉ-51 Program

    MCSÉ-51 Programmer's Guide and Instruction Set The information presented in this chapter is collected from the MCSÉ-51 Architectural Overview and the HardwareDescription of the 8051, 8052 and 80C51 chapters of this book. The material has been selected and rearranged toform a quick and convenient reference for the programmers of the MCS-51. This guide pertains specifically to the8051, 8052 and 80C51.

    標簽: Program Eacute MCS 51

    上傳時間: 2013-11-13

    上傳用戶:hj_18

  • The Hardware Book (WinHelp32)

    The Hardware Book (WinHelp32) Information from The Hardware Book

    標簽: Hardware WinHelp Book The

    上傳時間: 2013-11-23

    上傳用戶:cepsypeng

主站蜘蛛池模板: 清苑县| 留坝县| 福清市| 肇庆市| 麟游县| 滦平县| 恩施市| 西安市| 磐石市| 大港区| 蒲城县| 上高县| 定陶县| 古交市| 仪陇县| 龙胜| 高阳县| 东山县| SHOW| 康乐县| 德格县| 漾濞| 阿尔山市| 德庆县| 遂昌县| 汽车| 翁牛特旗| 讷河市| 马边| 斗六市| 普格县| 朝阳区| 宝清县| 盐山县| 商河县| 城步| 富宁县| 林甸县| 金沙县| 德惠市| 库尔勒市|