00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00018 #include "config.h"
00019
00020
00021 #pragma userclass (code = BOOTLOADER)
00022 #pragma userclass (const = BOOTLOADER)
00023
00025 #define SWAP(x) ((((x)&0xFF)<<8)|(((x)>>8)&0xFF))
00026
00027 #include "usb_desc_bootloader.h"
00028
00029
00030 code usb_dev_desc_t g_usb_dev_desc = {
00031 sizeof(usb_dev_desc_t),
00032 USB_DESC_DEVICE,
00033 SWAP(0x0200),
00034 0xff,
00035 0xff,
00036 0xff,
00037 MAX_PACKET_SIZE_EP0,
00038 SWAP(6421),
00039 SWAP(0x0101),
00040 SWAP(0x0001),
00041 0x01,
00042 0x02,
00043 0x00,
00044 0x01
00045 };
00046
00047 code usb_conf_desc_bootloader_t g_usb_conf_desc =
00048 {
00049 {
00050 sizeof(usb_conf_desc_t),
00051 USB_DESC_CONFIGURATION,
00052 SWAP(sizeof(usb_conf_desc_bootloader_t)),
00053 1,
00054 1,
00055 2,
00056 0xE0,
00057 50,
00058 },
00059
00060 {
00061 sizeof(usb_if_desc_t),
00062 USB_DESC_INTERFACE,
00063 0,
00064 0,
00065 2,
00066 0xff,
00067 0x00,
00068 0xff,
00069 0x00,
00070 },
00071
00072 {
00073 sizeof(usb_ep_desc_t),
00074 USB_DESC_ENDPOINT,
00075 0x81,
00076 USB_ENDPOINT_TYPE_BULK,
00077 SWAP(USB_EP1_SIZE),
00078 0x06
00079 },
00080
00081 {
00082 sizeof(usb_ep_desc_t),
00083 USB_DESC_ENDPOINT,
00084 0x01,
00085 USB_ENDPOINT_TYPE_BULK,
00086 SWAP(USB_EP1_SIZE),
00087 0x06
00088 },
00089 };
00090
00091 #define USB_STRING_IDX_1_DESC "Nordic Semiconductor"
00092
00093 code uint8_t g_usb_string_desc_1[] =
00094 {
00095 sizeof(USB_STRING_IDX_1_DESC) * 2, 0x03,
00096 'N', 00,
00097 'o', 00,
00098 'r', 00,
00099 'd', 00,
00100 'i', 00,
00101 'c', 00,
00102 ' ', 00,
00103 'S', 00,
00104 'e', 00,
00105 'm', 00,
00106 'i', 00,
00107 'c', 00,
00108 'o', 00,
00109 'n', 00,
00110 'd', 00,
00111 'u', 00,
00112 'c', 00,
00113 't', 00,
00114 'o', 00,
00115 'r', 00
00116 };
00117
00118 #define USB_STRING_IDX_2_DESC "nRF24LU1P-F32 BOOT LDR"
00119
00120 code uint8_t g_usb_string_desc_2[] =
00121 {
00122 sizeof(USB_STRING_IDX_2_DESC) * 2, 0x03,
00123 'n', 00,
00124 'R', 00,
00125 'F', 00,
00126 '2', 00,
00127 '4', 00,
00128 'L', 00,
00129 'U', 00,
00130 '1', 00,
00131 'P', 00,
00132 '-', 00,
00133 'F', 00,
00134 '3', 00,
00135 '2', 00,
00136 ' ', 00,
00137 'B', 00,
00138 'O', 00,
00139 'O', 00,
00140 'T', 00,
00141 ' ', 00,
00142 'L', 00,
00143 'D', 00,
00144 'R', 00
00145 };
00146
00147
00148 code uint8_t string_zero[] = {0x04, 0x03, 0x09, 0x04} ;