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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cudal.h

?? ti-Chipcon CC251x 2.4G Soc應(yīng)用開發(fā)源碼實例。包括rf,powermodes,clockmodes,flashRW,interrupts,timer,pwm,uart...所有
?? 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 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩专区一卡二卡| 欧美精品一级二级| 久久综合九色综合欧美98| 欧美日韩美少妇| 欧美大白屁股肥臀xxxxxx| 91麻豆精品国产91久久久资源速度 | 91麻豆精品国产自产在线| 一区二区三区四区激情 | 色999日韩国产欧美一区二区| 成人白浆超碰人人人人| 精品福利一二区| 夜夜嗨av一区二区三区四季av| 国产综合久久久久久久久久久久| 日韩精品一区二区三区在线观看 | 亚洲视频一区二区在线| 亚洲一二三四在线| 在线中文字幕一区二区| 日韩一区二区在线观看视频播放| 精品动漫一区二区三区在线观看| 看电视剧不卡顿的网站| 日韩一级高清毛片| 国产精品美女视频| 波多野结衣精品在线| 国产精品乱人伦中文| 成人免费观看av| 亚洲天堂中文字幕| 一区二区高清在线| 另类小说图片综合网| 久久亚洲精品小早川怜子| 国产一二三精品| 国产欧美日本一区视频| caoporn国产精品| 亚洲在线视频免费观看| 欧美日韩精品一区视频| 蜜臀久久久99精品久久久久久| 日韩亚洲欧美一区| 高清av一区二区| 亚洲欧美另类在线| 6080国产精品一区二区| 国产精品一二三区| 91精品在线观看入口| 激情五月播播久久久精品| 欧美亚洲动漫精品| 老司机精品视频在线| 欧美精彩视频一区二区三区| 一本到高清视频免费精品| 日韩不卡免费视频| 国产欧美日韩卡一| 另类中文字幕网| 日韩一区二区免费在线电影| 丁香五精品蜜臀久久久久99网站| 亚洲乱码日产精品bd| 91麻豆精品国产| 成人一级片在线观看| 日韩视频国产视频| 亚洲成人自拍偷拍| 在线欧美小视频| 亚洲精品视频免费看| 日韩亚洲欧美中文三级| 色综合婷婷久久| 亚洲国产精品成人久久综合一区 | 懂色av中文字幕一区二区三区| 亚洲精品国产一区二区精华液| 欧美一区二区久久| 成人黄色免费短视频| 日韩av电影免费观看高清完整版| 欧美伊人久久大香线蕉综合69| 亚洲欧美偷拍另类a∨色屁股| 欧美一区三区四区| 日韩精品一卡二卡三卡四卡无卡| 国产精品久久福利| 波波电影院一区二区三区| 国产精品理论在线观看| 懂色av中文一区二区三区| 日韩精品一级中文字幕精品视频免费观看 | 国产精品电影一区二区| 日韩欧美卡一卡二| 99麻豆久久久国产精品免费优播| 性做久久久久久免费观看 | 欧美午夜电影网| 亚洲欧美在线视频观看| 欧美xxxx老人做受| 国产综合色视频| 热久久免费视频| 午夜不卡在线视频| 亚洲国产乱码最新视频| 欧美高清精品3d| 极品少妇一区二区三区精品视频| 精品国偷自产国产一区| 欧美日韩第一区日日骚| 欧美中文字幕一区| 欧美性受xxxx| 大胆欧美人体老妇| 国产成人在线观看| 国产精品88888| 亚洲激情在线激情| 亚洲精品高清在线| 亚洲黄一区二区三区| 日韩女优制服丝袜电影| 国产成人综合亚洲网站| 韩国av一区二区三区| 自拍偷拍欧美激情| 亚洲人xxxx| 欧美一级淫片007| 欧美成人video| av一二三不卡影片| 99re这里都是精品| 色噜噜狠狠成人中文综合| 美女视频黄频大全不卡视频在线播放| 欧美激情在线一区二区三区| 欧美性极品少妇| 欧美精品在线视频| 日韩精品一区二区三区三区免费| 欧美调教femdomvk| 国产成人超碰人人澡人人澡| 亚洲高清视频在线| 一区二区三区美女视频| 视频在线观看一区| 另类小说综合欧美亚洲| 国产精品亚洲第一区在线暖暖韩国| 中文幕一区二区三区久久蜜桃| 亚洲欧美在线视频观看| 久久婷婷久久一区二区三区| 日本一区二区三区dvd视频在线| 欧美日韩在线直播| 欧美成人在线直播| 国产精品久久久久久久久免费桃花| 精品福利一区二区三区| 欧美亚洲尤物久久| aaa欧美色吧激情视频| 美女国产一区二区| 丁香婷婷综合激情五月色| 国产一区二区三区观看| 91影院在线免费观看| 欧美偷拍一区二区| 色综合久久综合网97色综合| 777a∨成人精品桃花网| 久久精品一区二区三区av| 亚洲女同一区二区| 午夜精品123| 国产成人高清视频| 国产一区福利在线| 免费不卡在线观看| 成人网在线免费视频| 国内成+人亚洲+欧美+综合在线| 五月天网站亚洲| 成人小视频在线| 777色狠狠一区二区三区| 欧美激情一区二区三区蜜桃视频| 亚洲午夜羞羞片| 精品一区免费av| 在线欧美日韩精品| 欧洲av一区二区嗯嗯嗯啊| 久久亚洲一级片| 久久蜜桃av一区精品变态类天堂| 国产成人午夜精品影院观看视频| 18欧美亚洲精品| 欧美久久一区二区| 3d成人h动漫网站入口| 欧美激情一区二区在线| 欧美韩国日本不卡| 久久se精品一区精品二区| 欧美色男人天堂| 精品乱码亚洲一区二区不卡| 欧美成人精品高清在线播放| 午夜不卡在线视频| 国产精品一区二区三区四区| 欧美电视剧在线看免费| 日韩电影在线观看一区| 欧美日韩小视频| 午夜久久久久久久久久一区二区| 精品一二线国产| 99久久国产综合精品女不卡 | 91精品久久久久久蜜臀| 亚洲国产三级在线| 在线观看视频一区二区欧美日韩| 国产精品九色蝌蚪自拍| 日本亚洲电影天堂| 国产不卡在线一区| 欧美性大战久久久久久久蜜臀| 欧美v日韩v国产v| 久久成人免费网| 精品国产乱码久久久久久影片| 亚洲男人天堂av网| 91国在线观看| 国产日韩精品视频一区| 亚洲电影第三页| 在线播放亚洲一区| 捆绑调教一区二区三区| 欧美激情在线免费观看| 人人爽香蕉精品| 91成人国产精品| 欧美高清在线精品一区| 99re66热这里只有精品3直播 | 午夜精品在线视频一区| 日韩天堂在线观看| 国产成人在线色| 亚洲狠狠丁香婷婷综合久久久| 欧美日韩一级二级| 国产精品久久毛片a|