亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
精品久久五月天| 日韩欧美一级精品久久| 亚洲男人电影天堂| 欧美三级电影精品| 奇米777欧美一区二区| 欧美高清视频www夜色资源网| 亚洲成人动漫一区| 精品国产一二三| 不卡电影一区二区三区| 午夜影视日本亚洲欧洲精品| 337p亚洲精品色噜噜| 国产福利精品导航| 亚洲欧美国产77777| 欧美成人在线直播| 91老师国产黑色丝袜在线| 亚洲va中文字幕| 2017欧美狠狠色| 欧美巨大另类极品videosbest| 国产另类ts人妖一区二区| 亚洲一区二区三区国产| 久久久久国产一区二区三区四区| 一本大道久久精品懂色aⅴ| 精品一区二区在线观看| 亚洲蜜桃精久久久久久久| 久久九九国产精品| 欧美亚洲愉拍一区二区| 成人黄色av电影| 久久狠狠亚洲综合| 三级欧美在线一区| 中文字幕视频一区二区三区久| 欧美极品美女视频| 日韩久久久精品| 欧美刺激午夜性久久久久久久 | 欧美一区二区在线免费播放| 色老综合老女人久久久| 成人午夜电影小说| 国产高清久久久久| 国产一区二区久久| 国内精品伊人久久久久av影院| 性久久久久久久久久久久| 亚洲精品第1页| 亚洲综合色在线| 视频一区二区三区中文字幕| 亚洲女与黑人做爰| 亚洲日本青草视频在线怡红院| 国产精品亲子乱子伦xxxx裸| 中文字幕在线观看不卡| 最新国产成人在线观看| 亚洲欧美中日韩| 亚洲天堂免费看| 亚洲日本在线看| 亚洲丝袜另类动漫二区| 亚洲精品国产无套在线观| 亚洲一区二区免费视频| 免费一区二区视频| 国产精品中文有码| av中文字幕不卡| 欧美专区亚洲专区| 欧美日韩美少妇| 91黄色免费观看| 欧美精品电影在线播放| 日韩色在线观看| 国产片一区二区| 亚洲激情图片一区| 亚洲成av人影院| 久久福利视频一区二区| 国产精品99久久久| 色屁屁一区二区| 久久品道一品道久久精品| 18欧美亚洲精品| 日韩精品国产欧美| 国产成人在线免费| 91麻豆成人久久精品二区三区| 欧美一区二区啪啪| 国产精品天天看| 国产欧美视频一区二区| 亚洲品质自拍视频网站| 国产一区二区主播在线| 欧美三级日韩三级| 26uuu成人网一区二区三区| 亚洲国产综合色| 国产成人丝袜美腿| 26uuu亚洲| 日韩和欧美一区二区| 一本大道久久a久久综合婷婷| 精品免费一区二区三区| 一区2区3区在线看| av一二三不卡影片| 91麻豆精品国产| 久久先锋影音av| 美腿丝袜亚洲色图| 欧美日韩亚洲综合一区| 亚洲天堂网中文字| 国产精品一区二区久激情瑜伽| 欧美精品久久久久久久多人混战| 国产免费成人在线视频| 久久99精品一区二区三区 | 色天使久久综合网天天| 中文字幕人成不卡一区| 国产不卡在线一区| 久久精品在线免费观看| 福利一区二区在线观看| 国产清纯白嫩初高生在线观看91| 国产精品一色哟哟哟| 日本中文字幕一区二区视频| 欧美吻胸吃奶大尺度电影| 亚洲国产精品久久久久婷婷884| 成人av片在线观看| 欧美国产综合一区二区| 国产成人自拍网| 国产丝袜在线精品| 成人激情小说网站| 亚洲天堂av一区| 在线观看国产一区二区| 免费国产亚洲视频| 精品福利在线导航| 99精品久久久久久| 亚洲午夜精品网| 欧美一区二区三区四区高清| 蜜桃av一区二区| 精品福利一二区| 国产一区二区三区免费观看| 精品三级av在线| 国产成人精品影视| 亚洲另类在线一区| 欧美精品一卡两卡| 国产美女一区二区| 欧美激情一区在线观看| 99国产麻豆精品| 亚洲成人av资源| 欧美成人精品高清在线播放| 99久久精品一区| 日本亚洲三级在线| 一区二区三区精品视频| 久久久久国色av免费看影院| 欧美精品久久久久久久久老牛影院| 韩国精品久久久| 亚洲高清久久久| 久久精品亚洲麻豆av一区二区| 不卡一区二区三区四区| 日韩高清在线一区| 综合久久综合久久| 久久先锋影音av鲁色资源网| 欧美一区二区精品| 日本二三区不卡| 99精品欧美一区二区三区综合在线| 看片网站欧美日韩| 午夜精品久久久久久久| 亚洲女同女同女同女同女同69| 国产三级精品在线| 久久人人爽爽爽人久久久| 91麻豆精品国产91久久久久| 欧美伊人久久大香线蕉综合69| 成人爱爱电影网址| 国产精品系列在线观看| 国产精品综合在线视频| 蜜臀av在线播放一区二区三区| 亚洲国产三级在线| 日本亚洲三级在线| 日韩极品在线观看| 亚洲电影欧美电影有声小说| 亚洲激情六月丁香| 亚洲三级久久久| 亚洲日本va午夜在线影院| 亚洲女与黑人做爰| 国产三级精品视频| 久久亚洲一区二区三区四区| 日韩免费电影一区| 欧美一区二区久久久| 精品成a人在线观看| 国产区在线观看成人精品| 亚洲免费av在线| 亚洲午夜视频在线| 五月天国产精品| 国产最新精品免费| 国产成人免费网站| 不卡高清视频专区| 欧美日韩国产在线观看| 在线播放日韩导航| 久久精品夜夜夜夜久久| 亚洲欧美激情小说另类| 亚洲国产另类av| 麻豆91在线播放| 成人免费视频app| 欧美性色aⅴ视频一区日韩精品| 91精品一区二区三区在线观看| 久久综合国产精品| 一区在线播放视频| 天天影视网天天综合色在线播放| 免费在线成人网| 99久久精品国产导航| 日韩视频一区二区| 亚洲美女精品一区| 国产一区二区三区香蕉| 欧美美女喷水视频| 综合电影一区二区三区| 麻豆免费看一区二区三区| 成人av电影免费在线播放| 欧美日韩激情一区| 欧美激情综合五月色丁香小说|