本文整理汇总了C++中USBShort函数的典型用法代码示例。如果您正苦于以下问题:C++ USBShort函数的具体用法?C++ USBShort怎么用?C++ USBShort使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了USBShort函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: USBShort
//! \addtogroup dfu_device_class_api
//! @{
//
//*****************************************************************************
//*****************************************************************************
//
// DFU Device Descriptor. This is a dummy structure since runtime DFU must be
// a part of a composite device and cannot be instantiated on its own.
//
//*****************************************************************************
const uint8_t g_pui8DFUDeviceDescriptor[] =
{
18, // Size of this structure.
USB_DTYPE_DEVICE, // Type of this structure.
USBShort(0x110), // USB version 1.1 (if we say 2.0, hosts
// assume
// high-speed - see USB 2.0 spec 9.2.6.6)
USB_CLASS_VEND_SPECIFIC, // USB Device Class
0, // USB Device Sub-class
0, // USB Device protocol
64, // Maximum packet size for default pipe.
USBShort(0), // Vendor ID (VID).
USBShort(0), // Product ID (PID).
USBShort(0), // Device Release Number BCD.
0, // Manufacturer string identifier.
0, // Product string identifier.
0, // Product serial number.
1 // Number of configurations.
};
示例2: USBShort
#include "usblib/usb-ids.h"
#include "usblib/device/usbdevice.h"
#include "usblib/device/usbdhid.h"
#include "usblib/device/usbdhidkeyb.h"
#include "usb_keyb_structs.h"
//****************************************************************************
//
// The languages supported by this device.
//
//****************************************************************************
const unsigned char g_pLangDescriptor[] =
{
4,
USB_DTYPE_STRING,
USBShort(USB_LANG_EN_US)
};
//****************************************************************************
//
// The manufacturer string.
//
//****************************************************************************
const unsigned char g_pManufacturerString[] =
{
(17 + 1) * 2,
USB_DTYPE_STRING,
'T', 0, 'e', 0, 'x', 0, 'a', 0, 's', 0, ' ', 0, 'I', 0, 'n', 0, 's', 0,
't', 0, 'r', 0, 'u', 0, 'm', 0, 'e', 0, 'n', 0, 't', 0, 's', 0,
};
示例3: USBShort
// USB instance Object
//
//*****************************************************************************
extern tUSBInstanceObject g_USBInstance[];
//*****************************************************************************
//
// Device Descriptor. This is stored in RAM to allow several fields to be
// changed at runtime based on the client's requirements.
//
//*****************************************************************************
unsigned char g_pBulkDeviceDescriptor[] =
{
18, // Size of this structure.
USB_DTYPE_DEVICE, // Type of this structure.
USBShort(0x110), // USB version 1.1 (if we say 2.0, hosts assume
// high-speed - see USB 2.0 spec 9.2.6.6)
USB_CLASS_VEND_SPECIFIC, // USB Device Class
0, // USB Device Sub-class
0, // USB Device protocol
64, // Maximum packet size for default pipe.
USBShort(0), // Vendor ID (VID).
USBShort(0), // Product ID (PID).
USBShort(0x100), // Device Version BCD.
1, // Manufacturer string identifier.
2, // Product string identifier.
3, // Product serial number.
1 // Number of configurations.
};
//*****************************************************************************
示例4: USBShort
// additional configuration defined here. This relationship is assumed in the
// device stack for simplicity even though the USB 2.0 specification imposes
// no such restriction on the bConfigurationValue values.
//
// Note that this structure is deliberately located in RAM since we need to
// be able to patch some values in it based on client requirements.
//
//*****************************************************************************
static uint8_t g_pui8KeybDescriptor[] =
{
//
// Configuration descriptor header.
//
9, // Size of the configuration descriptor.
USB_DTYPE_CONFIGURATION, // Type of this descriptor.
USBShort(34), // The total size of this full structure.
1, // The number of interfaces in this
// configuration.
1, // The unique value for this configuration.
5, // The string identifier that describes this
// configuration.
USB_CONF_ATTR_SELF_PWR, // Bus Powered, Self Powered, remote wake up.
250, // The maximum power in 2mA increments.
};
//*****************************************************************************
//
// The remainder of the configuration descriptor is stored in flash since we
// don't need to modify anything in it at runtime.
//
//*****************************************************************************
示例5: USBShort
//! \addtogroup composite_device_class_api
//! @{
//
//****************************************************************************
//****************************************************************************
//
// Device Descriptor. This is stored in RAM to allow several fields to be
// changed at runtime based on the client's requirements.
//
//****************************************************************************
static unsigned char g_pCompDeviceDescriptor[] =
{
18, // Size of this structure.
USB_DTYPE_DEVICE, // Type of this structure.
USBShort(0x110), // USB version 1.1 (if we say 2.0, hosts assume
// high-speed - see USB 2.0 spec 9.2.6.6)
USB_CLASS_MISC, // USB Device Class (spec 5.1.1)
USB_MISC_SUBCLASS_COMMON, // USB Device Sub-class (spec 5.1.1)
USB_MISC_PROTOCOL_IAD, // USB Device protocol (spec 5.1.1)
64, // Maximum packet size for default pipe.
USBShort(0), // Vendor ID (filled in during USBDCompositeInit).
USBShort(0), // Product ID (filled in during USBDCompositeInit).
USBShort(0x100), // Device Version BCD.
1, // Manufacturer string identifier.
2, // Product string identifier.
3, // Product serial number.
1 // Number of configurations.
};
//****************************************************************************
示例6: ISOC_OUT_EP_MAX_SIZE
// Max size is (48000 samples/sec * 4 bytes/sample) * 0.001 seconds/frame.
//
//*****************************************************************************
#define ISOC_OUT_EP_MAX_SIZE ((48000*4)/1000)
//*****************************************************************************
//
// Device Descriptor. This is stored in RAM to allow several fields to be
// changed at runtime based on the client's requirements.
//
//*****************************************************************************
static uint8_t g_pui8AudioDeviceDescriptor[] =
{
18, // Size of this structure.
USB_DTYPE_DEVICE, // Type of this structure.
USBShort(0x110), // USB version 1.1 (if we say 2.0, hosts assume
// high-speed - see USB 2.0 spec 9.2.6.6)
0, // USB Device Class (spec 5.1.1)
0, // USB Device Sub-class (spec 5.1.1)
0, // USB Device protocol (spec 5.1.1)
64, // Maximum packet size for default pipe.
USBShort(0), // Vendor ID (filled in during USBDAudioInit).
USBShort(0), // Product ID (filled in during USBDAudioInit).
USBShort(0x100), // Device Version BCD.
1, // Manufacturer string identifier.
2, // Product string identifier.
3, // Product serial number.
1 // Number of configurations.
};
//*****************************************************************************