-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathusb_local_defs.jal
56 lines (52 loc) · 1.36 KB
/
usb_local_defs.jal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--
-- $Id
--
-- Defines local to this application which may override
-- defaults in the standard library files.
--
-- This file needs to be included -before- usb_serial in your
-- main.jal (or whatever you name your main source file).
--
include usb_defs;
--
-- Because our board uses the internal oscillators, it is only
-- capable of low-speed USB communications.
--
UCFG_UPUEN = TRUE -- Specifically enable USB pull-ups.
const byte USB_SPEED_OPTION = USB_LOW_SPEED;
const byte USB_TRANSCEIVER_OPTION = USB_INTERNAL_TRANSCEIVER;
--
-- USB_STRING2 Descriptor.
-- When this is defined, it replaces the default string "JAL Serial" in the
-- usb_serial.jal library file.
-- Note that the characters are double-byte unicode and little-endian
-- encoded, hence the strange looking ascii + `trailing' "0x00". The size
-- count "bLength" is decimal and includes the characters (two bytes for
-- each), as well as bDescriptorType and bLength itself.
--
const byte USB_STRING2[44] =
{
44, -- bLength (Total length in decimal, incl this descriptor).
0x03, -- 0x03 = USB_DT_STRING bDescriptorType (See usb_serial.jal).
"P", 0x00,
"I", 0x00,
"C", 0x00,
"1", 0x00,
"8", 0x00,
"F", 0x00,
"2", 0x00,
"7", 0x00,
"J", 0x00,
"5", 0x00,
"3", 0x00,
" ", 0x00,
"E", 0x00,
"m", 0x00,
"b", 0x00,
"e", 0x00,
"d", 0x00,
"d", 0x00,
"e", 0x00,
"d", 0x00,
".", 0x00
}