Skip to content

Commit 81d113f

Browse files
authored
Teensyduino 1.49 Compatibility (#14)
* Teensyduino 1.49 Compatibility * Update Travis software version * Update Teensyduino version in README (1.49)
1 parent 5c3c6e2 commit 81d113f

File tree

5 files changed

+49
-46
lines changed

5 files changed

+49
-46
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: C
22
env:
33
global:
44
- IDE_VERSION=1.8.10
5-
- TEENSY_VERSION=148
5+
- TEENSY_VERSION=149
66
- IDE_LOCATION=/usr/local/share/arduino
77
- BOARDS_DESTINATION=$IDE_LOCATION/hardware
88

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is meant to be used in conjunction with the [ArduinoXInput library](https:/
66

77
## Installation
88

9-
You must have both [Arduino](https://www.arduino.cc/en/main/software) and [Teensyduino](https://www.pjrc.com/teensy/td_download.html) installed before proceeding. Double-check that your installed Teensyduino version matches the files provided in this repository. This repository is currently using version [**1.48**](https://www.pjrc.com/teensy/td_148). If you don't know your Teensyduino version, compile a blank sketch with a Teensy board selected and the Teensy Loader will open. In the Teensy Loader window select `Help -> About` and it will tell you the version number. If your version does not match you will have to reinstall or update the Teensyduino software.
9+
You must have both [Arduino](https://www.arduino.cc/en/main/software) and [Teensyduino](https://www.pjrc.com/teensy/td_download.html) installed before proceeding. Double-check that your installed Teensyduino version matches the files provided in this repository. This repository is currently using version [**1.49**](https://www.pjrc.com/teensy/td_149). If you don't know your Teensyduino version, compile a blank sketch with a Teensy board selected and the Teensy Loader will open. In the Teensy Loader window select `Help -> About` and it will tell you the version number. If your version does not match you will have to reinstall or update the Teensyduino software.
1010

1111
Navigate to your Arduino installation directory and open up the 'hardware' folder. It is recommended that you make a backup of this folder before proceeding in case something goes wrong or if you want to revert the installation.
1212

teensy/avr/boards.txt

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ menu.keys=Keyboard Layout
55

66
teensy40.name=Teensy 4.0
77
teensy40.upload.maximum_size=2031616
8-
teensy40.upload.maximum_data_size=1048576
8+
teensy40.upload.maximum_data_size=524288
9+
#teensy40.upload.maximum_data_size=1048576
910
teensy40.upload.tool=teensyloader
1011
teensy40.upload.protocol=halfkay
1112
teensy40.build.board=TEENSY40
@@ -24,45 +25,44 @@ teensy40.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdl
2425
teensy40.build.flags.dep=-MMD
2526
teensy40.build.flags.optimize=-Os
2627
teensy40.build.flags.cpu=-mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16
27-
teensy40.build.flags.defs=-D__IMXRT1062__ -DTEENSYDUINO=148
28+
teensy40.build.flags.defs=-D__IMXRT1062__ -DTEENSYDUINO=149
2829
teensy40.build.flags.cpp=-std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing
2930
teensy40.build.flags.c=
3031
teensy40.build.flags.S=-x assembler-with-cpp
3132
teensy40.build.flags.ld=-Wl,--gc-sections,--relax "-T{build.core.path}/imxrt1062.ld"
3233
teensy40.build.flags.libs=-larm_cortexM7lfsp_math -lm -lstdc++
33-
#teensy40.build.fcpu=600000000
3434
teensy40.serial.restart_cmd=false
3535
teensy40.menu.usb.serial=Serial
3636
teensy40.menu.usb.serial.build.usbtype=USB_SERIAL
37-
#teensy40.menu.usb.keyboard=Keyboard
38-
#teensy40.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY
39-
#teensy40.menu.usb.keyboard.fake_serial=teensy_gateway
40-
#teensy40.menu.usb.touch=Keyboard + Touch Screen
41-
#teensy40.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN
42-
#teensy40.menu.usb.touch.fake_serial=teensy_gateway
43-
#teensy40.menu.usb.hidtouch=Keyboard + Mouse + Touch Screen
44-
#teensy40.menu.usb.hidtouch.build.usbtype=USB_HID_TOUCHSCREEN
45-
#teensy40.menu.usb.hidtouch.fake_serial=teensy_gateway
46-
#teensy40.menu.usb.hid=Keyboard + Mouse + Joystick
47-
#teensy40.menu.usb.hid.build.usbtype=USB_HID
48-
#teensy40.menu.usb.hid.fake_serial=teensy_gateway
49-
#teensy40.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick
50-
#teensy40.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID
51-
#teensy40.menu.usb.midi=MIDI
52-
#teensy40.menu.usb.midi.build.usbtype=USB_MIDI
53-
#teensy40.menu.usb.midi.fake_serial=teensy_gateway
54-
#teensy40.menu.usb.midi4=MIDIx4
55-
#teensy40.menu.usb.midi4.build.usbtype=USB_MIDI4
56-
#teensy40.menu.usb.midi4.fake_serial=teensy_gateway
57-
#teensy40.menu.usb.midi16=MIDIx16
58-
#teensy40.menu.usb.midi16.build.usbtype=USB_MIDI16
59-
#teensy40.menu.usb.midi16.fake_serial=teensy_gateway
60-
#teensy40.menu.usb.serialmidi=Serial + MIDI
61-
#teensy40.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL
62-
#teensy40.menu.usb.serialmidi4=Serial + MIDIx4
63-
#teensy40.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL
64-
#teensy40.menu.usb.serialmidi16=Serial + MIDIx16
65-
#teensy40.menu.usb.serialmidi16.build.usbtype=USB_MIDI16_SERIAL
37+
teensy40.menu.usb.keyboard=Keyboard
38+
teensy40.menu.usb.keyboard.build.usbtype=USB_KEYBOARDONLY
39+
teensy40.menu.usb.keyboard.fake_serial=teensy_gateway
40+
teensy40.menu.usb.touch=Keyboard + Touch Screen
41+
teensy40.menu.usb.touch.build.usbtype=USB_TOUCHSCREEN
42+
teensy40.menu.usb.touch.fake_serial=teensy_gateway
43+
teensy40.menu.usb.hidtouch=Keyboard + Mouse + Touch Screen
44+
teensy40.menu.usb.hidtouch.build.usbtype=USB_HID_TOUCHSCREEN
45+
teensy40.menu.usb.hidtouch.fake_serial=teensy_gateway
46+
teensy40.menu.usb.hid=Keyboard + Mouse + Joystick
47+
teensy40.menu.usb.hid.build.usbtype=USB_HID
48+
teensy40.menu.usb.hid.fake_serial=teensy_gateway
49+
teensy40.menu.usb.serialhid=Serial + Keyboard + Mouse + Joystick
50+
teensy40.menu.usb.serialhid.build.usbtype=USB_SERIAL_HID
51+
teensy40.menu.usb.midi=MIDI
52+
teensy40.menu.usb.midi.build.usbtype=USB_MIDI
53+
teensy40.menu.usb.midi.fake_serial=teensy_gateway
54+
teensy40.menu.usb.midi4=MIDIx4
55+
teensy40.menu.usb.midi4.build.usbtype=USB_MIDI4
56+
teensy40.menu.usb.midi4.fake_serial=teensy_gateway
57+
teensy40.menu.usb.midi16=MIDIx16
58+
teensy40.menu.usb.midi16.build.usbtype=USB_MIDI16
59+
teensy40.menu.usb.midi16.fake_serial=teensy_gateway
60+
teensy40.menu.usb.serialmidi=Serial + MIDI
61+
teensy40.menu.usb.serialmidi.build.usbtype=USB_MIDI_SERIAL
62+
teensy40.menu.usb.serialmidi4=Serial + MIDIx4
63+
teensy40.menu.usb.serialmidi4.build.usbtype=USB_MIDI4_SERIAL
64+
teensy40.menu.usb.serialmidi16=Serial + MIDIx16
65+
teensy40.menu.usb.serialmidi16.build.usbtype=USB_MIDI16_SERIAL
6666
#teensy40.menu.usb.audio=Audio
6767
#teensy40.menu.usb.audio.build.usbtype=USB_AUDIO
6868
#teensy40.menu.usb.audio.fake_serial=teensy_gateway
@@ -73,9 +73,9 @@ teensy40.menu.usb.serial.build.usbtype=USB_SERIAL
7373
#teensy40.menu.usb.mtp=MTP Disk (Experimental)
7474
#teensy40.menu.usb.mtp.build.usbtype=USB_MTPDISK
7575
#teensy40.menu.usb.mtp.fake_serial=teensy_gateway
76-
#teensy40.menu.usb.rawhid=Raw HID
77-
#teensy40.menu.usb.rawhid.build.usbtype=USB_RAWHID
78-
#teensy40.menu.usb.rawhid.fake_serial=teensy_gateway
76+
teensy40.menu.usb.rawhid=Raw HID
77+
teensy40.menu.usb.rawhid.build.usbtype=USB_RAWHID
78+
teensy40.menu.usb.rawhid.fake_serial=teensy_gateway
7979
#teensy40.menu.usb.flightsim=Flight Sim Controls
8080
#teensy40.menu.usb.flightsim.build.usbtype=USB_FLIGHTSIM
8181
#teensy40.menu.usb.flightsim.fake_serial=teensy_gateway
@@ -218,7 +218,7 @@ teensy36.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdl
218218
teensy36.build.flags.dep=-MMD
219219
teensy36.build.flags.optimize=-Os
220220
teensy36.build.flags.cpu=-mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant
221-
teensy36.build.flags.defs=-D__MK66FX1M0__ -DTEENSYDUINO=148
221+
teensy36.build.flags.defs=-D__MK66FX1M0__ -DTEENSYDUINO=149
222222
teensy36.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti
223223
teensy36.build.flags.c=
224224
teensy36.build.flags.S=-x assembler-with-cpp
@@ -426,7 +426,7 @@ teensy35.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdl
426426
teensy35.build.flags.dep=-MMD
427427
teensy35.build.flags.optimize=-Os
428428
teensy35.build.flags.cpu=-mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant
429-
teensy35.build.flags.defs=-D__MK64FX512__ -DTEENSYDUINO=148
429+
teensy35.build.flags.defs=-D__MK64FX512__ -DTEENSYDUINO=149
430430
teensy35.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti
431431
teensy35.build.flags.c=
432432
teensy35.build.flags.S=-x assembler-with-cpp
@@ -624,7 +624,7 @@ teensy31.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdl
624624
teensy31.build.flags.dep=-MMD
625625
teensy31.build.flags.optimize=-Os
626626
teensy31.build.flags.cpu=-mthumb -mcpu=cortex-m4 -fsingle-precision-constant
627-
teensy31.build.flags.defs=-D__MK20DX256__ -DTEENSYDUINO=148
627+
teensy31.build.flags.defs=-D__MK20DX256__ -DTEENSYDUINO=149
628628
teensy31.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti
629629
teensy31.build.flags.c=
630630
teensy31.build.flags.S=-x assembler-with-cpp
@@ -833,7 +833,7 @@ teensy30.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdl
833833
teensy30.build.flags.dep=-MMD
834834
teensy30.build.flags.optimize=-Os
835835
teensy30.build.flags.cpu=-mthumb -mcpu=cortex-m4 -fsingle-precision-constant
836-
teensy30.build.flags.defs=-D__MK20DX128__ -DTEENSYDUINO=148
836+
teensy30.build.flags.defs=-D__MK20DX128__ -DTEENSYDUINO=149
837837
teensy30.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti
838838
teensy30.build.flags.c=
839839
teensy30.build.flags.S=-x assembler-with-cpp
@@ -992,7 +992,7 @@ teensyLC.build.command.size=arm-none-eabi-size
992992
teensyLC.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib
993993
teensyLC.build.flags.dep=-MMD
994994
teensyLC.build.flags.cpu=-mthumb -mcpu=cortex-m0plus -fsingle-precision-constant
995-
teensyLC.build.flags.defs=-D__MKL26Z64__ -DTEENSYDUINO=148
995+
teensyLC.build.flags.defs=-D__MKL26Z64__ -DTEENSYDUINO=149
996996
teensyLC.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti
997997
teensyLC.build.flags.c=
998998
teensyLC.build.flags.S=-x assembler-with-cpp
@@ -1146,7 +1146,7 @@ teensypp2.build.flags.common=-g -Wall -ffunction-sections -fdata-sections
11461146
teensypp2.build.flags.dep=-MMD
11471147
teensypp2.build.flags.optimize=-Os
11481148
teensypp2.build.flags.cpu=-mmcu=at90usb1286
1149-
teensypp2.build.flags.defs=-DTEENSYDUINO=148 -DARDUINO_ARCH_AVR
1149+
teensypp2.build.flags.defs=-DTEENSYDUINO=149 -DARDUINO_ARCH_AVR
11501150
teensypp2.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++11
11511151
teensypp2.build.flags.c=
11521152
teensypp2.build.flags.S=-x assembler-with-cpp
@@ -1263,7 +1263,7 @@ teensy2.build.flags.common=-g -Wall -ffunction-sections -fdata-sections
12631263
teensy2.build.flags.dep=-MMD
12641264
teensy2.build.flags.optimize=-Os
12651265
teensy2.build.flags.cpu=-mmcu=atmega32u4
1266-
teensy2.build.flags.defs=-DTEENSYDUINO=148 -DARDUINO_ARCH_AVR
1266+
teensy2.build.flags.defs=-DTEENSYDUINO=149 -DARDUINO_ARCH_AVR
12671267
teensy2.build.flags.cpp=-fno-exceptions -fpermissive -felide-constructors -std=gnu++11
12681268
teensy2.build.flags.c=
12691269
teensy2.build.flags.S=-x assembler-with-cpp

teensy/avr/cores/teensy3/usb_desc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ static uint8_t config_descriptor[CONFIG_DESC_SIZE] = {
614614
0x02, // bFunctionClass
615615
0x02, // bFunctionSubClass
616616
0x01, // bFunctionProtocol
617-
4, // iFunction
617+
0, // iFunction
618618
#endif
619619

620620
#ifdef CDC_DATA_INTERFACE
@@ -1112,7 +1112,7 @@ static uint8_t config_descriptor[CONFIG_DESC_SIZE] = {
11121112
0x06, // bInterfaceClass (0x06 = still image)
11131113
0x01, // bInterfaceSubClass
11141114
0x01, // bInterfaceProtocol
1115-
4, // iInterface
1115+
0, // iInterface
11161116
// endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
11171117
7, // bLength
11181118
5, // bDescriptorType

teensy/avr/cores/teensy3/usb_dev.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,9 @@ uint32_t usb_tx_byte_count(uint32_t endpoint)
719719
return usb_queue_byte_count(tx_first[endpoint]);
720720
}
721721

722+
// Discussion about using this function and USB transmit latency
723+
// https://forum.pjrc.com/threads/58663?p=223513&viewfull=1#post223513
724+
//
722725
uint32_t usb_tx_packet_count(uint32_t endpoint)
723726
{
724727
const usb_packet_t *p;

0 commit comments

Comments
 (0)