These are the examples provided for [[/users/frank26080115/libraries/LPC1700CMSIS_Lib/]] Note, the entire "program" is not compilable!

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers usbdesc.h Source File

usbdesc.h

00001 /*----------------------------------------------------------------------------
00002  *      U S B  -  K e r n e l
00003  *----------------------------------------------------------------------------
00004  *      Name:    USBDESC.H
00005  *      Purpose: USB Descriptors Definitions
00006  *      Version: V1.10
00007  *----------------------------------------------------------------------------
00008  *      This software is supplied "AS IS" without any warranties, express,
00009  *      implied or statutory, including but not limited to the implied
00010  *      warranties of fitness for purpose, satisfactory quality and
00011  *      noninfringement. Keil extends you a royalty-free right to reproduce
00012  *      and distribute executable files created using this software for use
00013  *      on NXP Semiconductors LPC family microcontroller devices only. Nothing 
00014  *      else gives you the right to use this software.
00015  *---------------------------------------------------------------------------*/
00016 
00017 #ifndef __USBDESC_H__
00018 #define __USBDESC_H__
00019 
00020 
00021 #define WBVAL(x) (x & 0xFF),((x >> 8) & 0xFF)
00022 
00023 #define USB_DEVICE_DESC_SIZE        (sizeof(USB_DEVICE_DESCRIPTOR))
00024 #define USB_CONFIGUARTION_DESC_SIZE (sizeof(USB_CONFIGURATION_DESCRIPTOR))
00025 #define USB_INTERFACE_DESC_SIZE     (sizeof(USB_INTERFACE_DESCRIPTOR))
00026 #define USB_ENDPOINT_DESC_SIZE      (sizeof(USB_ENDPOINT_DESCRIPTOR))
00027 
00028 #define HID_DESC_OFFSET              0x0012
00029 #define HID_DESC_SIZE               (sizeof(HID_DESCRIPTOR))
00030 #define HID_REPORT_DESC_SIZE        (sizeof(HID_ReportDescriptor))
00031 
00032 extern const uint8_t USB_DeviceDescriptor[];
00033 extern const uint8_t USB_ConfigDescriptor[];
00034 extern const uint8_t USB_StringDescriptor[];
00035 
00036 extern const uint8_t HID_ReportDescriptor[];
00037 extern const uint16_t HID_ReportDescSize;
00038 
00039 
00040 #endif  /* __USBDESC_H__ */