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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cudal.h

?? reference about wireless design which is helpful to everyone
?? H
?? 第 1 頁 / 共 2 頁
字號:
/** \mainpage Chipcon USB Dongle Access Library
 *
 * \author j.langfeldt@ti.com
 * 
 * The following features are supported:
 * \li The GET_DESCRIPTOR, GET_STATUS, SET_CONFIGURATION, GET_CONFIGURATION, SET_INTERFACE and 
 *     GET_INTERFACE standard requests
 * \li All vendor requests
 * \li All class requests
 * \li BULK and INTERRUPT pipes, with asynchronous and synchronous read and write functions
 * 
 * The following features are not supported:
 * \li The SET_DESCRIPTOR, SET_FEATURE and CLEAR_FEATURE standard requests
 * \li Isochronous transfers
 */
#ifndef CUDAL_H
#define CUDAL_H
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <usbspec.h>
#include <usbio_i.h>


#ifdef CUDAL_DYNAMIC
    #ifdef CUDAL_EXPORTS
        #define CUDAL_API __declspec(dllexport)
    #else
        #define CUDAL_API __declspec(dllimport)
    #endif
#else
    #define CUDAL_API
#endif


class CudalPipe;
class CUsbIo;
class CUsbIoPipe;
class CUsbIoBuf;


/// USBIO error codes can be found "usbio_i.h"
typedef DWORD USBIOERR;


/// CUDAL error codes
typedef enum {
    CUDALERR_USB_COMM_FAILURE      = -1, ///< USB communication error (device malfunction or removal)
    CUDALERR_SUCCESS               = 0,  ///< Success
    CUDALERR_YES                   = 1,  ///< Success, the answer is yes
    CUDALERR_NO                    = 2,  ///< Success, the answer is no
} CUDALERR;


/// CUDAL dongle information
typedef struct {
    WORD vendorId;           ///< USB vendor ID
    WORD productId;          ///< USB product ID
    WORD productVersion;     ///< Product version number
    char pManufacturer[129]; ///< Manufacturer (USB string descriptor number 1, ANSI format)
    char pProduct[129];      ///< Product (USB string descriptor number 2, ANSI format)
    char pSerialNumber[129]; ///< Serial number (USB string descriptor number 3, ANSI format)
} CUDAL_DONGLE_INFO;




/** \brief The CudalDongle class that encapsulates a physical Chipcon USB dongle
 *
 * The class provides easy-to-use functions for enumerating and creating \ref CudalDongle objects, and 
 * for performing the most commonly used operations on endpoint 0. It can also create one or more 
 * \ref CudalPipe objects, which support BULK and INTERRUPT transfers at data rates up to 12 
 * Mbits/second.
 *
 * A built-in mutual exclusion mechanism (mutex) ensures that only one \ref CudalDongle object can exist 
 * for each physical USB dongle. In practice this means that:
 * - If multiple applications can access the USB dongles, each dongle is protected from being opened and 
 *   accessed by more than one application at any time. 
 * - If two USB dongles contain the same identification, only one will be recognized. The information 
 *   that uniquely identifies each dongle, consists of the "Manufacturer", "Product" and "Serial number" 
 *   string descriptors, indexed 1, 2 and 3, respectively. Cudal makes this information available through
 *   a structure called \ref CUDAL_DONGLE_INFO.
 *
 * For a USB dongle to be included in the device enumeration, it's VID/PID pair must be registered with a 
 * Globally Unique Identifier (GUID). This is done in the .inf file that is used when installing the
 * hardware (the USB dongle). The default GUID provided with the library is used with the application 
 * examples, and can also be used during prototype development. Use Guidgen.exe provided with Visual
 * Studio or a web-based generator to create your own GUID.
 * 
 * \section section_dongle_const_destr Construction and Destruction
 * A \ref CudalDongle object is constructed in two steps:
 * - First the application builds a table of connected USB dongles by calling the static class function
 *   \ref CudalDongle::EnumDongles(). The resulting table contains a number of valid 
 *   \ref CUDAL_DONGLE_INFO structures, which should uniquely identify all connected dongles. If two or 
 *   more dongles provide the same identification, there will be duplicates in the table, and only the
 *   first entry will be considered in the next step.
 *     \code
 *     // Note that the following example uses the default GUID provided with the library
 *     CUDAL_DONGLE_INFO pDongleInfo[MAX_DONGLE_COUNT];
 *     int dongleCount = CudalDongle::EnumDongles(pDongleInfo, MAX_DONGLE_COUNT);
 *     \endcode
 *
 * - Then the application decides which dongle it desires to connect to, and passes the corresponding 
 *   \ref CUDAL_DONGLE_INFO structure on to another static class function, 
 *   \ref CudalDongle::CreateDongle(). If the dongle object was created, a pointer to it will be 
 *   returned. If the application tries to make a duplicate object, \ref CudalDongle::CreateDongle() will 
 *   return a NULL-pointer instead.
 *     \code
 *     // Open the first available dongle
 *     CudalDongle *pDongle = NULL;
 *     for (int n = 0; n < dongleCount; n++) {
 *         pDongle = CudalDongle::CreateDongle(&pDongleInfo[n]);
 *         if (pDongle) break;
 *     }
 *     // No object was created if pDongle still is NULL :(
 *     \endcode
 *
 * Since the physical USB dongle is "locked" for as long as the \ref CudalDongle object exists, it must 
 * be destroyed properly. To do this, simply delete the object. Note that if this part is skipped, the 
 * dongle will be unavailable until the process creating the object has been terminated - even if it is 
 * physically unplugged from the computer and re-attached.
 *
 * \section section_dongle_usage Usage
 * The class supports the following operations on endpoint 0:
 * - Standard requests:
 *     - GET_STATUS (see \ref GetStatus())
 *     - GET_DESCRIPTOR (see \ref GetDeviceDescriptor(), \ref GetConfigurationDescriptor() and 
 *       \ref GetStringDescriptor())
 *     - GET_CONFIGURATION (see \ref GetConfiguration())
 *     - SET_CONFIGURATION (see \ref SetConfiguration() and \ref Unconfigure())
 *     - GET_INTERFACE (see \ref GetInterface())
 *     - SET_INTERFACE (see \ref SetInterface())
 * - Vendor requests (see \ref VendorRequestIn() and \ref VendorRequestOut())
 * - Class requests (see \ref ClassRequestIn() and \ref ClassRequestOut())
 *
 * To transfer BULK and INTERRUPT data on other endpoints, one or more \ref CudalPipe objects need to be
 * created. This is done using the \ref CreatePipe() function.
 *
 * \section section_dongle_example Example of Usage
 * The following enumerates available dongles, creates a \ref CudalDongle object, sends a vendor request, 
 * and then destroys the object.
 *
 * \code
 * ...
 * #define MAX_DONGLE_COUNT 16
 * CUDAL_DONGLE_INFO pDongleInfo[MAX_DONGLE_COUNT];
 * GUID guid = { 0xF363FDD8, 0xD316, 0x4B3A, { 0xAE, 0xF8, 0x73, 0x70, 0x81, 0x68, 0xAB, 0x1F } };
 *
 * // Enumerate all connected dongles
 * int dongleCount = CudalDongle::EnumDongles(pDongleInfo, MAX_DONGLE_COUNT, &guid);
 * 
 * // Find the correct device by looking for a specific product ID and serial number...
 * CudalDongle *pDongle = NULL;
 * for (int n = 0; n < dongleCount; n++) {
 *     if ((pDongleInfo[n].productId == 0x1234) &&
 *         (strcmp(pDongleInfo[n].pSerialNumber, "123456789") == 0)) {
 *         
 *         // ... and create the dongle object
 *         pDongle = CudalDongle::CreateDongle(&pDongleInfo[n]);
 *         break;
 *     }
 * }
 * 
 * // Perform the vendor request...
 * if (pDongle) {
 *     char pText[] = "Be quiet, Brain, or I'll stab you with a Q-tip";
 *     if (pDongle->VendorRequestOut(VR_SET_LCD_TEXT, 1, 2, sizeof(pText), NULL, pText) == USBIO_ERR_SUCCESS) {
 *         ...
 *     }
 * 
 *     // ... and delete the dongle object (we're done)
 *     delete pDongle;
 * }
 * ...
 * \endcode
 */
class CUDAL_API CudalDongle {
public:
    // Destroys the dongle object, and makes the dongle hardware availble for other applications
	virtual ~CudalDongle();

    // Enumerates available USB dongles
    static int EnumDongles(CUDAL_DONGLE_INFO *pDongleInfo, int maxCount, const GUID *pGuid = NULL);
    // Creates a dongle object
    static CudalDongle* CreateDongle(CUDAL_DONGLE_INFO *pDongleInfo, BYTE configurationIndex = 0, const GUID *pGuid = NULL);

    /// Returns a pointer to the dongle info structure
    CUDAL_DONGLE_INFO* GetDongleInfo() { return &m_dongleInfo; }
    
    // Creates a pipe object to be used for BULK/INTERRUPT IN/OUT data transfers
    CudalPipe* CreatePipe(BYTE endpointIndex, BOOL isDirectionIn);

    // Sends a vendor request with an IN data phase (from the device to the host) 
    USBIOERR VendorRequestIn(BYTE request, WORD index, WORD value, DWORD maxLength, DWORD *pActualLength, BYTE *pData, USBIO_REQUEST_RECIPIENT recepient = RecipientDevice);
    // Sends a vendor request with an OUT data phase (from the host to the device) 
    USBIOERR VendorRequestOut(BYTE request, WORD index, WORD value, DWORD length, DWORD *pActualLength, BYTE *pData, USBIO_REQUEST_RECIPIENT recepient = RecipientDevice);

    // Sends a class request with an IN data phase (from the device to the host) 
    USBIOERR ClassRequestIn(BYTE request, WORD index, WORD value, DWORD maxLength, DWORD *pActualLength, BYTE *pData, USBIO_REQUEST_RECIPIENT recepient = RecipientDevice);
    // Sends a class request with an OUT data phase (from the host to the device) 
    USBIOERR ClassRequestOut(BYTE request, WORD index, WORD value, DWORD length, DWORD *pActualLength, BYTE *pData, USBIO_REQUEST_RECIPIENT recepient = RecipientDevice);

    // Gets the device descriptor from the device
    USBIOERR GetDeviceDescriptor(USB_DEVICE_DESCRIPTOR *pDesc);
    // Gets a configuration descriptor from the device
    USBIOERR GetConfigurationDescriptor(USB_CONFIGURATION_DESCRIPTOR *pDesc, DWORD maxLength, DWORD *pActualLength, BYTE index);
    // Gets a string descriptor from the device
    USBIOERR GetStringDescriptor(char *pAnsiString, DWORD maxLength, DWORD *pActualLength, BYTE index);
    // Sends a get status request to the device
    USBIOERR GetStatus(WORD *pStatusValue, USBIO_REQUEST_RECIPIENT recipient, BYTE index);

    // Sets the device to the configured state
    USBIOERR SetConfiguration(BYTE configurationIndex, BYTE *pAlternateSettingIndexes = NULL);
    // Gets the current configuration value
    USBIOERR GetConfiguration(BYTE *pConfigurationValue);
    // Sets the device to the unconfigured state
    USBIOERR Unconfigure();

    // Changes the alternate setting of an interface 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲日本一区| 一区二区在线观看不卡| 亚洲一区二区三区四区在线观看| 精品一区二区在线免费观看| 91精品福利在线| 国产日韩精品视频一区| 日本不卡一二三| 欧美日韩国产另类一区| 中文字幕中文乱码欧美一区二区| 久久国产视频网| 欧美日韩国产系列| 亚洲国产裸拍裸体视频在线观看乱了 | 欧美综合欧美视频| 国产精品麻豆视频| 国产91色综合久久免费分享| 欧美成人午夜电影| 日韩高清在线观看| 777奇米成人网| 爽爽淫人综合网网站| 欧美日本视频在线| 亚洲另类一区二区| 色综合久久88色综合天天6| 亚洲欧美综合另类在线卡通| 国产成人av影院| 国产精品进线69影院| 成人黄色国产精品网站大全在线免费观看| 2017欧美狠狠色| 国产精品一区二区久久不卡| 欧美精品一区二区不卡| 麻豆精品久久精品色综合| 日韩一区二区电影在线| 久久国产精品露脸对白| 久久综合九色综合97婷婷| 国产一区二区三区四| 久久精品欧美日韩精品 | 国产欧美一区二区在线观看| 国产精品自拍毛片| 中文一区二区完整视频在线观看| www.66久久| 一区二区三国产精华液| 欧美亚洲禁片免费| 免费看日韩a级影片| 欧美成人一区二区三区在线观看| 久久国产福利国产秒拍| 国产日韩精品一区| 91搞黄在线观看| 日本午夜精品视频在线观看| 精品久久久久一区二区国产| 国产盗摄精品一区二区三区在线| 国产精品久久毛片av大全日韩| 91小视频免费观看| 日韩主播视频在线| 精品国产露脸精彩对白| 国产激情精品久久久第一区二区| 国产精品久久久久三级| 欧美区在线观看| 极品销魂美女一区二区三区| 亚洲人成小说网站色在线 | 国产综合色精品一区二区三区| 国产亚洲视频系列| 在线观看成人小视频| 久久99精品国产麻豆不卡| 国产精品看片你懂得| 欧美丰满少妇xxxbbb| 国产99一区视频免费| 亚洲成人av在线电影| 亚洲欧美日韩系列| 欧美一区二区精品在线| 99久久综合99久久综合网站| 三级在线观看一区二区| 欧美激情一区二区| 91精品国产综合久久久久久| 成人性色生活片免费看爆迷你毛片| 亚洲国产成人av| 国产精品嫩草99a| 日韩三级在线观看| 在线观看91精品国产入口| 国内精品伊人久久久久av影院 | 欧美日韩国产经典色站一区二区三区| 麻豆精品一区二区av白丝在线| 国产精品另类一区| 欧美一区二区三区日韩视频| 一本一道久久a久久精品 | 国模套图日韩精品一区二区| 一区二区国产视频| 中文字幕成人网| 欧美成人精品福利| 国产精品免费人成网站| 久久99久久99小草精品免视看| 亚洲欧美影音先锋| 日韩欧美一级精品久久| 欧洲一区二区三区在线| 国产成人精品影视| 奇米色一区二区| 亚洲第一久久影院| 一区二区三区在线观看视频 | 精久久久久久久久久久| 欧美日韩在线精品一区二区三区激情| 亚洲国产你懂的| 亚洲精品国产精华液| 国产精品久久久久久久久免费樱桃| 久久久久高清精品| 2017欧美狠狠色| 26uuu国产日韩综合| 精品久久免费看| 欧美xxxxxxxxx| 精品对白一区国产伦| 日韩精品最新网址| 日韩欧美一级片| 精品国产91九色蝌蚪| 欧美精品一区二区三区四区 | 国产伦精一区二区三区| 免费在线看一区| 日本sm残虐另类| 另类专区欧美蜜桃臀第一页| 裸体一区二区三区| 国产剧情一区在线| 99国产欧美久久久精品| 91视视频在线观看入口直接观看www | 欧美mv日韩mv亚洲| 久久久噜噜噜久久人人看| 国产午夜精品久久久久久免费视 | 色婷婷精品久久二区二区蜜臂av| 成人激情开心网| 色综合av在线| 在线播放91灌醉迷j高跟美女 | 欧美三级视频在线| 制服丝袜成人动漫| 欧美精品一区二区在线播放| 欧美国产精品专区| 一区二区三区日本| 蜜臀av一区二区在线观看| 国产成人精品网址| 欧美丝袜丝交足nylons图片| 欧美日韩国产美| 久久综合给合久久狠狠狠97色69| 久久久久99精品一区| 亚洲精品国产无套在线观| 日本va欧美va瓶| 国产成人午夜99999| 91看片淫黄大片一级| 欧美顶级少妇做爰| 国产丝袜欧美中文另类| 亚洲精品成人在线| 极品少妇xxxx精品少妇| 色av一区二区| 精品国产一区二区三区av性色| 国产精品三级视频| 日日摸夜夜添夜夜添亚洲女人| 国产一区二区三区免费| 欧美专区日韩专区| 国产无一区二区| 亚洲成人av电影在线| 粉嫩绯色av一区二区在线观看| 欧美性一二三区| 中文在线一区二区| 奇米影视7777精品一区二区| 97超碰欧美中文字幕| 日韩精品一区二区三区老鸭窝| 亚洲婷婷在线视频| 精品一区二区影视| 欧美色视频一区| 综合精品久久久| 国产成人亚洲综合色影视| 678五月天丁香亚洲综合网| 1000部国产精品成人观看| 久久91精品久久久久久秒播| 欧美三级欧美一级| 亚洲色图欧美偷拍| 丰满岳乱妇一区二区三区| 日韩一区二区在线观看| 一区二区在线观看av| 成人av资源下载| 国产偷国产偷精品高清尤物 | 欧美国产97人人爽人人喊| 日韩和欧美一区二区三区| 色婷婷综合五月| 欧美国产欧美综合| 国产精品正在播放| 久久噜噜亚洲综合| 精品无码三级在线观看视频| 欧美一级黄色录像| 亚洲va欧美va人人爽| 欧美做爰猛烈大尺度电影无法无天| 亚洲同性gay激情无套| 成人美女视频在线看| 欧美国产1区2区| 成人黄色一级视频| 欧美国产精品中文字幕| 国产91高潮流白浆在线麻豆| 久久久久久99久久久精品网站| 久久爱www久久做| 亚洲精品一区在线观看| 久久精品国产免费看久久精品| 欧美精品第1页| 奇米色777欧美一区二区| 日韩精品一区二区三区三区免费 | 久久精品99国产国产精| 欧美一区二区在线播放| 美女视频黄免费的久久 |