亚洲欧美第一页_禁久久精品乱码_粉嫩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.

    標(biāo)簽: 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+.

    標(biāo)簽: routines driver P90 301

    上傳時間: 2013-11-23

    上傳用戶:weixiao99

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

    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.

    標(biāo)簽: P90 301 IIC 90

    上傳時間: 2014-01-06

    上傳用戶:氣溫達(dá)上千萬的

  • 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.

    標(biāo)簽: software driver XA-S I2C

    上傳時間: 2013-11-02

    上傳用戶:zw380105939

  • XA-S3的IIC接口的驅(qū)動器軟件程序(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.

    標(biāo)簽: 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.

    標(biāo)簽: 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.

    標(biāo)簽: microcontro Using 76X LPC

    上傳時間: 2013-12-30

    上傳用戶:Artemis

  • 驅(qū)動程序與應(yīng)用程序的接口

    有兩種方式可以讓設(shè)備和應(yīng)用程序之間聯(lián)系:1. 通過為設(shè)備創(chuàng)建的一個符號鏈;2. 通過輸出到一個接口WDM驅(qū)動程序建議使用輸出到一個接口而不推薦使用創(chuàng)建符號鏈的方法。這個接口保證PDO的安全,也保證安全地創(chuàng)建一個惟一的、獨立于語言的訪問設(shè)備的方法。一個應(yīng)用程序使用Win32APIs來調(diào)用設(shè)備。在某個Win32 APIs和設(shè)備對象的分發(fā)函數(shù)之間存在一個映射關(guān)系。獲得對設(shè)備對象訪問的第一步就是打開一個設(shè)備對象的句柄。 用符號鏈打開一個設(shè)備的句柄為了打開一個設(shè)備,應(yīng)用程序需要使用CreateFile。如果該設(shè)備有一個符號鏈出口,應(yīng)用程序可以用下面這個例子的形式打開句柄:hDevice = CreateFile("\\\\.\\OMNIPORT3",  GENERIC_READ | GENERIC_WRITE,FILE_SHARE_READ,  NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL ,NULL);文件路徑名的前綴“\\.\”告訴系統(tǒng)本調(diào)用希望打開一個設(shè)備。這個設(shè)備必須有一個符號鏈,以便應(yīng)用程序能夠打開它。有關(guān)細(xì)節(jié)查看有關(guān)Kdevice和CreateLink的內(nèi)容。在上述調(diào)用中第一個參數(shù)中前綴后的部分就是這個符號鏈的名字。注意:CreatFile中的第一個參數(shù)不是Windows 98/2000中驅(qū)動程序(.sys文件)的路徑。是到設(shè)備對象的符號鏈。如果使用DriverWizard產(chǎn)生驅(qū)動程序,它通常使用類KunitizedName來構(gòu)成設(shè)備的符號鏈。這意味著符號鏈名有一個附加的數(shù)字,通常是0。例如:如果鏈接名稱的主干是L“TestDevice”那么在CreateFile中的串就該是“\\\\.\\TestDevice0”。如果應(yīng)用程序需要被覆蓋的I/O,第六個參數(shù)(Flags)必須或上FILE_FLAG_OVERLAPPED。 使用一個輸出接口打開句柄用這種方式打開一個句柄會稍微麻煩一些。DriverWorks庫提供兩個助手類來使獲得對該接口的訪問容易一些,這兩個類是CDeviceInterface, 和 CdeviceInterfaceClass。CdeviceInterfaceClass類封裝了一個設(shè)備信息集,該信息集包含了特殊類中的所有設(shè)備接口信息。應(yīng)用程序能有用CdeviceInterfaceClass類的一個實例來獲得一個或更多的CdeviceInterface類的實例。CdeviceInterface類是一個單一設(shè)備接口的抽象。它的成員函數(shù)DevicePath()返回一個路徑名的指針,該指針可以在CreateFile中使用來打開設(shè)備。下面用一個小例子來顯示這些類最基本的使用方法: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;} 在設(shè)備中執(zhí)行I/O操作一旦應(yīng)用程序獲得一個有效的設(shè)備句柄,它就能使用Win32 APIs來產(chǎn)生到設(shè)備對象的IRPs。下面的表顯示了這種對應(yīng)關(guān)系。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 需要解釋一下設(shè)備類成員的Close和CleanUp:CreateFile使內(nèi)核為設(shè)備創(chuàng)建一個新的文件對象。這使得多個句柄可以映射同一個文件對象。當(dāng)這個文件對象的最后一個用戶級句柄被撤銷后,I/O管理器調(diào)用CleanUp。當(dāng)沒有任何用戶級和核心級的對文件對象的訪問的時候,I/O管理器調(diào)用Close。如果被打開的設(shè)備不支持指定的功能,則調(diào)用相應(yīng)的Win32將引起錯誤(無效功能)。以前為Windows95編寫的VxD的應(yīng)用程序代碼中可能會在打開設(shè)備的時候使用FILE_FLAG_DELETE_ON_CLOSE屬性。在Windows NT/2000中,建議不要使用這個屬性,因為它將導(dǎo)致沒有特權(quán)的用戶企圖打開這個設(shè)備,這是不可能成功的。I/O管理器將ReadFile和WriteFile的buff參數(shù)轉(zhuǎn)換成IRP域的方法依賴于設(shè)備對象的屬性。當(dāng)設(shè)備設(shè)置DO_DIRECT_IO標(biāo)志,I/O管理器將buff鎖住在存儲器中,并且創(chuàng)建了一個存儲在IRP中的MDL域。一個設(shè)備可以通過調(diào)用Kirp::Mdl來存取MDL。當(dāng)設(shè)備設(shè)置DO_BUFFERED_IO標(biāo)志,設(shè)備對象分別通過KIrp::BufferedReadDest或 KIrp::BufferedWriteSource為讀或?qū)懖僮鳙@得buff地址。當(dāng)設(shè)備不設(shè)置DO_BUFFERED_IO標(biāo)志也不設(shè)置DO_DIRECT_IO,內(nèi)核設(shè)置IRP 的UserBuffer域來對應(yīng)ReadFile或WriteFile中的buff參數(shù)。然而,存儲區(qū)并沒有被鎖住而且地址只對調(diào)用進(jìn)程有效。驅(qū)動程序可以使用KIrp::UserBuffer來存取IRP域。對于DeviceIoControl調(diào)用,buffer參數(shù)的轉(zhuǎn)換依賴于特殊的I/O控制代碼,它不在設(shè)備對象的特性中。宏CTL_CODE(在winioctl.h中定義)用來構(gòu)造控制代碼。這個宏的其中一個參數(shù)指明緩沖方法是METHOD_BUFFERED, METHOD_IN_DIRECT, METHOD_OUT_DIRECT, 或METHOD_NEITHER。下面的表顯示了這些方法和與之對應(yīng)的能獲得輸入緩沖與輸出緩沖的KIrp中的成員函數(shù):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,系統(tǒng)分配一個單一的緩沖來作為輸入與輸出。驅(qū)動程序必須在向輸出緩沖放數(shù)據(jù)之前拷貝輸入數(shù)據(jù)。驅(qū)動程序通過調(diào)用KIrp::IoctlBuffer獲得緩沖地址。在完成時,I/O管理器從系統(tǒng)緩沖拷貝數(shù)據(jù)到提供給Ring 3級調(diào)用者使用的緩沖中。驅(qū)動程序必須在結(jié)束前存儲拷貝到IRP的Information成員中的數(shù)據(jù)個數(shù)。如果控制代碼不指明METHOD_IN_DIRECT或METHOD_OUT_DIRECT,則DeviceIoControl的參數(shù)呈現(xiàn)不同的含義。參數(shù)InputBuffer被拷貝到一個系統(tǒng)緩沖,這個緩沖驅(qū)動程序可以通過調(diào)用KIrp::IoctlBuffer。參數(shù)OutputBuffer被映射到KMemory對象,驅(qū)動程序?qū)@個對象的訪問通過調(diào)用KIrp::Mdl來實現(xiàn)。對于METHOD_OUT_DIRECT,調(diào)用者必須有對緩沖的寫訪問權(quán)限。注意,對METHOD_NEITHER,內(nèi)核只提供虛擬地址;它不會做映射來配置緩沖。虛擬地址只對調(diào)用進(jìn)程有效。這里是一個用METHOD_BUFFERED的例子:首先,使用宏CTL_CODE來定義一個IOCTL代碼:#define IOCTL_MYDEV_GET_FIRMWARE_REV \CTL_CODE (FILE_DEVICE_UNKNOWN,0,METHOD_BUFFERED,FILE_ANY_ACCESS)現(xiàn)在使用一個DeviceIoControl調(diào)用:BOOLEAN b;CHAR FirmwareRev[60];ULONG FirmwareRevSize;b = DeviceIoControl(hDevice, IOCTL_MYDEV_GET_VERSION_STRING,  NULL, // no input  注意,這里放的是包含有執(zhí)行操作命令的字符串指針  0, FirmwareRev,      //這里是output串指針,存放從驅(qū)動程序中返回的字符串。sizeof(FirmwareRev),& FirmwareRevSize,  NULL // not overlapped I/O );如果輸出緩沖足夠大,設(shè)備拷貝串到里面并將拷貝的資結(jié)束設(shè)置到FirmwareRevSize中。在驅(qū)動程序中,代碼看起來如下所示: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 . . .   } }

    標(biāo)簽: 驅(qū)動程序 應(yīng)用程序 接口

    上傳時間: 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.

    標(biāo)簽: Program Eacute MCS 51

    上傳時間: 2013-11-13

    上傳用戶:hj_18

  • The Hardware Book (WinHelp32)

    The Hardware Book (WinHelp32) Information from The Hardware Book

    標(biāo)簽: Hardware WinHelp Book The

    上傳時間: 2013-11-23

    上傳用戶:cepsypeng

主站蜘蛛池模板: 吴桥县| 仙游县| 泸州市| 三门峡市| 同仁县| 舒城县| 长子县| 玉树县| 垣曲县| 贵阳市| 泰兴市| 平泉县| 潜江市| 榆中县| 修水县| 梁山县| 团风县| 天镇县| 大厂| 河北区| 永靖县| 基隆市| 门头沟区| 双辽市| 拜泉县| 巍山| 夏河县| 柳林县| 图木舒克市| 靖边县| 二连浩特市| 宿迁市| 历史| 凤城市| 镇康县| 仁怀市| 施甸县| 广饶县| 邢台市| 山西省| 东阳市|