📄 usb_desc_bootloader.lst
字号:
C51 COMPILER V7.50 USB_DESC_BOOTLOADER 03/05/2008 17:32:46 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE USB_DESC_BOOTLOADER
OBJECT MODULE PLACED IN .\build\usb_desc_bootloader.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE usb_desc_bootloader.c OMF2 ROM(COMPACT) OPTIMIZE(9,SPEED) BROWSE MODC2 MDU_
-R515 DEBUG PRINT(.\list\usb_desc_bootloader.lst) OBJECT(.\build\usb_desc_bootloader.obj)
line level source
1 /* Copyright (c) 2007 Nordic Semiconductor. All Rights Reserved.
2 *
3 * The information contained herein is property of Nordic Semiconductor ASA.
4 * Terms and conditions of usage are described in detail in NORDIC
5 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
6 *
7 * Licensees are granted free, non-transferable use of the information. NO
8 * WARRENTY of ANY KIND is provided. This heading must NOT be removed from
9 * the file.
10 *
11 * $LastChangedRevision: 2290 $
12 */
13
14 /** @file
15 * USB descriptor for Bootloader
16 *
17 * @author Ken A. Redergaard
18 * @author Ole Saether
19 *
20 */
21 #include "config.h"
22
23 #ifdef USE_USERCLASS
24 #pragma userclass (code = BOOTLOADER)
25 #pragma userclass (const = BOOTLOADER)
26 #endif
27
28 /** Swaps the upper byte with the lower byte in a 16 bit variable */
29 #define SWAP(x) ((((x)&0xFF)<<8)|(((x)>>8)&0xFF))
30
31 #include "usb_desc_bootloader.h"
32
33
34 code usb_dev_desc_t g_usb_dev_desc = {
35 sizeof(usb_dev_desc_t),
36 USB_DESC_DEVICE,
37 SWAP(0x0200), // bcdUSB
38 0xff, // bDeviceClass
39 0xff, // bDeviceSubclass
40 0xff, // bDeviceProtocol
41 MAX_PACKET_SIZE_EP0,// bMaxPAcketSize0
42 SWAP(6421), // idVendor - 6421 (0x1915) : Nordic Semiconductor ASA
43 SWAP(0x0101), // idProduct
44 SWAP(0x0001), // bcdDevice - Device Release Number (BCD)
45 0x01, // iManufacturer
46 0x02, // iProduct
47 0x00, // iSerialNumber
48 0x01 // bNumConfigurations
49 };
50
51 code usb_conf_desc_bootloader_t g_usb_conf_desc =
52 {
53 {
54 sizeof(usb_conf_desc_t),
C51 COMPILER V7.50 USB_DESC_BOOTLOADER 03/05/2008 17:32:46 PAGE 2
55 USB_DESC_CONFIGURATION,
56 SWAP(sizeof(usb_conf_desc_bootloader_t)),
57 1, // bNumInterfaces
58 1, // bConfigurationValue
59 2, // iConfiguration
60 0xE0, // bmAttributes - D6: self-powered, bus powered: 0xA0
61 50, // bMaxPower
62 },
63 /* Interface Descriptor 0 */
64 {
65 sizeof(usb_if_desc_t),
66 USB_DESC_INTERFACE,
67 0, // bInterfaceNumber
68 0, // bAlternateSetting
69 2, // bNumEndpoints
70 0xff, // bInterfaceClass
71 0x00, // bInterfaceSubClass
72 0xff, // bInterfaceProtocol
73 0x00, // iInterface
74 },
75 /* Endpoint Descriptor EP1IN */
76 {
77 sizeof(usb_ep_desc_t),
78 USB_DESC_ENDPOINT,
79 0x81, // bEndpointAddress
80 USB_ENDPOINT_TYPE_BULK, // bmAttributes
81 SWAP(USB_EP1_SIZE), // wMaxPacketSize
82 0x06 // bInterval
83 },
84 /* Endpoint Descriptor EP1OUT */
85 {
86 sizeof(usb_ep_desc_t),
87 USB_DESC_ENDPOINT,
88 0x01, // bEndpointAddress
89 USB_ENDPOINT_TYPE_BULK, // bmAttributes
90 SWAP(USB_EP1_SIZE), // wMaxPacketSize
91 0x06 // bInterval
92 },
93 };
94
95 #define USB_STRING_IDX_1_DESC "Nordic Semiconductor"
96
97 code uint8_t g_usb_string_desc_1[] =
98 {
99 sizeof(USB_STRING_IDX_1_DESC) * 2, 0x03,
100 'N', 00,
101 'o', 00,
102 'r', 00,
103 'd', 00,
104 'i', 00,
105 'c', 00,
106 ' ', 00,
107 'S', 00,
108 'e', 00,
109 'm', 00,
110 'i', 00,
111 'c', 00,
112 'o', 00,
113 'n', 00,
114 'd', 00,
115 'u', 00,
116 'c', 00,
C51 COMPILER V7.50 USB_DESC_BOOTLOADER 03/05/2008 17:32:46 PAGE 3
117 't', 00,
118 'o', 00,
119 'r', 00
120 };
121
122 #define USB_STRING_IDX_2_DESC "Nordic Semiconductor nRF24LU1 BOOT LDR"
123
124 code uint8_t g_usb_string_desc_2[] =
125 {
126 sizeof(USB_STRING_IDX_2_DESC) * 2, 0x03,
127 'N', 00,
128 'o', 00,
129 'r', 00,
130 'd', 00,
131 'i', 00,
132 'c', 00,
133 ' ', 00,
134 'S', 00,
135 'e', 00,
136 'm', 00,
137 'i', 00,
138 'c', 00,
139 'o', 00,
140 'n', 00,
141 'd', 00,
142 'u', 00,
143 'c', 00,
144 't', 00,
145 'o', 00,
146 'r', 00,
147 ' ', 00,
148 'n', 00,
149 'R', 00,
150 'F', 00,
151 '2', 00,
152 '4', 00,
153 'L', 00,
154 'U', 00,
155 '1', 00,
156 ' ', 00,
157 'B', 00,
158 'O', 00,
159 'O', 00,
160 'T', 00,
161 ' ', 00,
162 'L', 00,
163 'D', 00,
164 'R', 00
165 };
166
167 // This is for setting language American English (String descriptor 0 is an array of supported languages):
168 code uint8_t string_zero[] = {0x04, 0x03, 0x09, 0x04} ;
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = ---- ----
CONSTANT SIZE = 174 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
C51 COMPILER V7.50 USB_DESC_BOOTLOADER 03/05/2008 17:32:46 PAGE 4
EDATA SIZE = ---- ----
HDATA SIZE = ---- ----
XDATA CONST SIZE = ---- ----
FAR CONST SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -