Teensyduino 1.59 Released

Paul

Administrator
Staff member
Teensyduino 1.59 has been released

https://www.pjrc.com/teensy/td_download.html

Quick summary: (coming soon...)

Support for Arduino IDE 2.0.4 and later is available by adding this package index URL in File > Preferences.

https://www.pjrc.com/teensy/package_teensy_index.json

Since 1.59-beta6, the only change is a fix for launching Teensy Loader on MacOS with Arduino 1.8.19.

Changes since Teensyduino 1.58:

C++17 used for Teensy 3.x and 4.x
Enable LTO options in Arduino Tools > Optimization menu
Fix startup for LTO optimization
Remove serialEvent_default, refactor yield_active_check_flags
Add inplace_function for callbacks
IntervalTimer use inplace_function
IntervalTimer demo callback backwards compatibility
Delete unused flags from String
Use C++17 to simplify IntervalTimer (Luni)
Fault handler use main vs process stack pointer (Christian Kahlo)
USBHost_t36 update DriveInfo example (Warren Watson)
FastLED fix C++17 compiler warnings
Tlc5940 update documentation, SCLK overshoot sensitivity
Fix const init on Wire, SPI, HardwareSerial
Update FlexIO_t4 - ??? (KurtE)
define SPI_HAS_NOTUSINGINTERRUPT
define WIRE_INTERFACES_COUNT and SPI_INTERFACES_COUNT
make availableForWrite virtual (Shawn Silverman)
remove old abs() and round() (mjs513)
CrashReport breadcrumbs improved
update example Makefile
fix Lockable Teensy auto-reboot with optimize smallest size with LTO
fix USB Touchscreen on Teensy 4.x with Windows
extmem_calloc() clears memory (Shawn Silverman)
add Print::vprintf() (Randy Palamar)
Audio improve AudioEffectWaveshaper initialization
Update ILI9488_t3 - ???
Update Keypad - Allow time for signals to settle
Update LittleFS - Add support for GigaDevice NOR Flash
Update RA8875 - ???
Update ST7735_t3 - ???
USBHost_t36 improve timers, fixes simultaneous transmit to 3+ devices
USBHost_t36 fix MIDI fast sustained receive
USBHost_t36 HID parser changes??? (KurtE)
USBHost_t36 RawHID improvements (KurtE)
USBHost_t36 Serial example update (KurtE)
teensy_secure add encrypthex_unlocksnvs option
Teensy monitor on Windows avoid 0 baud setting - not yet in IDE2 packages
Publish Arduino IDE 2.x.x packages using zstd compression
SD/SdFat Workaround for old version 1 cards with SDIO on Teensy 4.1
SD/SdFat Handle cards which falsely claim high speed support (tompilot)
FlexIO_t4 add setClock(), setClockUsingAudioPLL(), setClockUsingVideoPLL()
FlexIO_t4 fix minor issues and update examples
HardwareSerial base class
SoftwareSerial fix for MicroMod (KurtE)
SPI fix constinit for Teensy 3.x
Don't allow writing to ITCM after startup on Teensy 4.x
Update Stream parseInt and parseFloat for LookaheadMode
USB MIDI add realtime send functions (same API as MIDI library)
Add alternate names for FlexIO register bit fields
Fix Serial2 on MicroMod (KurtE)
Fix vprintf on Teensy 2.0
Fix pulldown on half duplex serial (KurtE)
Use namespace "teensy" for inplace_function
IPAddress compare operators are const (ssilverman)
ILI9431 fix DemoSauce example
ILI9488_t3 for clearChangedRange() on Teensy 3.2 (mjs513)
LittleFS fix wrote info in example (karelv)
USBHost_t36 fix race condition in MIDI read()
USBHost_t36 fix sustained fast MIDI receive
USBHost_t36 improve USBDriverTimer to fix fast transmit to 3+ USB devices
USBHost_t36 fix USBHIDDumper example (KurtE)
USBHost_t36 fix typos and spelling mistakes in comments (KurtE)
USBHost_t36 update virtual function defs (pr8x)
Show warning if IDE 2.x.x package used on IDE 1.8.x
analogRead() disable pin input keeper on Teensy 4.x
attachInterrupt always turn on pin hystersis on Teensy 4.x
Add DSB before return from interrupts from attachInterrupt
Wire: Scanner example scans all ports
Wire: Use WIRE_INTERFACES_COUNT for instances on Teensy 3.x
Add SEMC bitfield defines
Add MPU config for SEMC needed by SDRAM_t4 library
SdFat: Fix compiler warning with LTO linking on Teensy 4.x
SdFat: Removed a couple extraneous printfs (mjs513)
Fix makeWord() return type
Fix compiler warning with LTO on Teensy 3.x
LittleFS: Fix compiler warning with LTO linker
Close Teensy Loader on Arduino IDE 2.2.2 Boards Manager uninstall
Fix for wrong Teensy auto-reboot during upload
USB Serial emulation availableForWrite()
Add LCDIF defines (A-Dunstan)
Remove unused IntervalTimer code (Luni)
Audio fix CS4274 (WeTac)
Snooze fix on Teensy 4.x (BriComp)
Fix unable to auto-reboot on Linux
Fix for launching Teensy Loader on MacOS Sonoma from Arduino 1.8.19
 
Last edited:
Updated IDE 2.3 JSON as posted, it was downloaded by IDE
Board manager showed 1.59 to update when Teensy was searched.
Clicked update and Install completed:
Tool teensy:teensy-compile@11.3.1 already installed
Downloading packages
teensy:teensy-tools@1.59.0
teensy:teensy-discovery@1.59.0
teensy:teensy-monitor@1.59.0
teensy:avr@1.59.0
Installing teensy:teensy-tools@1.59.0
Configuring tool.
teensy:teensy-tools@1.59.0 installed
Installing teensy:teensy-discovery@1.59.0
Configuring tool.
teensy:teensy-discovery@1.59.0 installed
Installing teensy:teensy-monitor@1.59.0
Configuring tool.
teensy:teensy-monitor@1.59.0 installed
Replacing platform teensy:avr@0.59.6 with teensy:avr@1.59.0
Uninstalling teensy:avr@0.59.6
Running pre_uninstall script.
Platform teensy:avr@0.59.6 uninstalled
Uninstalling teensy:teensy-tools@0.59.6, tool is no more required
Running pre_uninstall script.
Uninstalling teensy:teensy-compile@11.3.1, tool is no more required
Uninstalling teensy:teensy-discovery@1.59.0, tool is no more required
Uninstalling teensy:teensy-monitor@1.59.0, tool is no more required
Configuring platform.
Platform teensy:avr@1.59.0 installed
It seems to have closed Teensy.exe and nothing else open conflicting prevented instalation.
Downloaded TeensyDuino EXE for IDE 1.8.19 and ran that to completion.

Built open T_3.5 listfiles no problem in IDE 2.3
 
I'm getting an update failure in Arduino IDE 2.3.0

1707480552705.png
 
Downloaded and installed 1.59 on both IDE 2.3.0 and 1.8.19 no issues. Did a few compiles on both with no issues - still having coffee :)
 
Downloaded & installed TD 1.59 into Arduino IDE 1.8.19 (download failed first time...Microsoft Win11pro strikes again...but succeeded 2nd time) & Arduino IDE 2.3.0 (download/install succeeded). Tested both with several of my current (quite large) projects, all worked as expected.

Mark J Culross
KD5RXT
 
@PaulStoffregen:

Should Print memory info on Arduino IDE 2.x.x normal color, not red be removed from the release notes . . . wasn't that put in, then backed out after the fact ??

Mark J Culross
KD5RXT
 
I went for the update to 1.59. Code with HardwareSerial no longer compiled ok. I had things like this (only showing the troubled code - what the real app does is allowing two serial ports to take on the role of 'host communication serial port' on the fly):

Code:
HardwareSerial *HostPort = NULL;

void setup() {
  HostPort = &Serial1;
  HostPort->transmitterEnable(2);
}

void loop() {
  // put your main code here, to run repeatedly:

}

Can only get it compiling again by changing that to:
Code:
HardwareSerialIMXRT *HostPort = NULL;

void setup() {
  HostPort = &Serial1;
  HostPort->transmitterEnable(2);
}

void loop() {
  // put your main code here, to run repeatedly:

}

Glad it now compiles again. But not amused about the hassle of having to dive into this just to keep things working as before the update...
 
Just as a heads up looks like Arduino released an update to the IDE. Went from 2.3.0 to 2.3.1 . Looks like primarily security updates plus a couple of other issues.
 
Updated to 2.3.1 then installed 1.59.0 under Windows 10. Was able to build and run the test program.
 
I run windows 11
I updated to 2.3.0 and 1.59 using the zip file option....all worked OK.
My PC has a small 100GB C: ssd (where windows and some programmes are) and also have a 1TB D: hard drive for other data and programmes. I try to keep the ssd with as much free space as possible and that is why I use the Zip option to install Arduino on D:.
This works OK for the download and unzip but when I use the board/library manager setup it installs all the other prog. files in C:\Users\abc\AppData\Local\Arduino15 ....847 MB.
My link in preferences is.... https://www.pjrc.com/teensy/package_teensy_index.json.
The next day on startup I got dialogue box saying 2.3.1 was available so I clicked to install and it ignored my 2.3.0 that was on D: and installed a new 2.3.1 in C:\programfiles\....... I don't think there was any option to change the install folder. It still all works now as Arduino2.3.1 with Teensy1.59 and I simply deleted the 2.3.0 D: folders.
So my question .... Is there a way of getting Arduino15 folder to install on D: instead of C:.??
And if using Zip option should I always update by downloading a new updated Zip file from Arduino instead of dialogue box links.... ??
And what happens now if (Arduino2.3.2 comes) do I update via the dialogue box and will it create a new 2.3.2 in C:programme files..?

When I opened up Arduino2.3.1 it told me it was downloading index......
Downloading index: package_teensy_index.json .....was at bottom RHS of screen....
Is this normal will it do this from time to time even no update available.... OR can it not find something..??

After or during install of 2.3.1 I got dialogue box saying "mdns-discovery" with "public" box ticked. Not sure what to do so unticked the public box and clicked cancel...??
What is the proper option for this....?? and do I need to do anything now..??
 
So my question .... Is there a way of getting Arduino15 folder to install on D: instead of C:.??

I don't know. But I can tell you the directory used is completely outside of Teensyduino's control. Arduino IDE's Boards Manager installs the files. At every step of installing and running Teensy's tools, Arduino IDE (or Arduino CLI being used by Arduino IDE) gives full pathnames for everything. None of the decisions about which drive and folder to use come from Teensy's software. It's dictated by the Arduino software.

How much the Arduino IDE really controls this, I'm not sure. It might be using pathnames set up by Windows. I personally don't use Windows much (I do all dev stuff on Linux and sometimes use MacOS for video... I even make the Windows version of Teensyduino on a Linux machine using a cross compiler). But I tried a quick search and found this page about moving AppData to another drive. I'm sure you can find many more with Google.

Before you try this, consider it could result in much slower compile speed. Windows is already slow for access to many small files, as happens when compiling code. Using a rotating hard drive for the libraries and compiler's C library could possibly make performance much worse.

You might also try asking on Arduino's forum. I believe Arduino CLI allows you to control which pathnames are used. Maybe there is some way in Arduino IDE too? I know Arduino IDE has a lot of special functionality with Shift-Ctrl-P, but I couldn't tell you which of those many options (if any) to use. Someone like Per would know...
 
If you use the old Arduino IDE 1.8.19, you can choose the install location or just use the ZIP file. The old IDE had a special "portable" mode which made it 100% self contained. If you create the extra directory to put it into that mode (Google search to turn up instructions) before you run the Teensyduino installer, the installer will automatically recognize portable mode and act accordingly. Portable mode was originally meant for students to have a completely self-contained copy of Arduino IDE on a USB stick or other portable drive, so none of their code or settings would get put onto shared computers. Sadly, the new IDE doesn't support portable mode and the several requests people have made have all been closed and locked for no additional comment, so seems unlikely the new IDE will ever support portable mode.
 
Thank you for your replies and good info

"Teensyduino 1.59 supports Arduino versions 1.8.5 and 1.8.9 and 1.8.13 and 1.8.15 and 1.8.16 and 1.8.19."
In the past I have always used the ZIP versions up to 1.8.19 and T1.57 programs installed on D: using the "portable" folder with sketchbook in it. Not sure where "AppData" was, .... probably in C: ...?

"Future versions of Teensyduino will drop support for Arduino 1.8.15" ...... I thought this meant need to update to Arduino 2.0 etc
I changed to Arduino 2.0 ?? and T1.58 some time ago using the Arduino ZIP and the Teensy preferences link and board manager.
"Arduino 2.0.4 and later are supported by use of Arduino Boards Manager."

Your current guidance for non admin windows install is ....??....
"Windows Non-Admin Installation
Download Arduino's Windows ZIP file for non admin install.
Extract the ZIP file, and remember the extracted location.
Download the Teensyduino installer. Save the file, do not run.
Rename TeensyduinoInstall.exe to Teensyduino.exe."

........ I didn't do TeensyInstaller when installing Arduino 2.30 etc, I just Unzipped and used the board manager....???

Regarding moving appdata...... it would affect all programs I have on C: not just Arduino, so I can cope with the windows install to C: as long as the prog. files and appdata don't "grow" with updates.

I think as long as I keep my sketch folder and local libraries separate I can uninstall and do clean install again anytime without loosing anything...?......and if I go back to using the windows installs instead of Zip ..... maybe updates will not create new versions as it did this time.
 
Not sure if to post here and/or on Arduino. Ran into build today that died with:
Code:
internal error in mingw32_gt_pch_use_address, at config/i386/host-mingw32.c:192: MapViewOfFileEx: Attempt to access invalid address.

Had this before, ended up deleting the cached stuff in temp directory to resolve, keeping fingers crossed that works again.
Code:
FQBN: teensy:avr:teensyMM
Using board 'teensyMM' from platform in folder: C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0
Using core 'teensy4' from platform in folder: C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0

Detecting libraries used...
C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\tools\teensy-compile\11.3.1/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY_MICROMOD -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4 C:\Users\kurte\AppData\Local\Temp\arduino\sketches\84548AC90373E7AF3266F6DECADB120C\sketch\OV767X_flexio_tft.ino.cpp -o nul
Alternatives for Arduino_OV767X.h: [Arduino_OV767X@0.0.2]
ResolveLibrary(Arduino_OV767X.h)
  -> candidates: [Arduino_OV767X@0.0.2]
C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\tools\teensy-compile\11.3.1/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY_MICROMOD -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4 -Ic:\Users\kurte\Documents\Arduino\libraries\Arduino_OV7670X\src C:\Users\kurte\AppData\Local\Temp\arduino\sketches\84548AC90373E7AF3266F6DECADB120C\sketch\OV767X_flexio_tft.ino.cpp -o nul
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
  -> candidates: [Wire@1.0]
C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\tools\teensy-compile\11.3.1/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY_MICROMOD -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4 -Ic:\Users\kurte\Documents\Arduino\libraries\Arduino_OV7670X\src -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Wire C:\Users\kurte\AppData\Local\Temp\arduino\sketches\84548AC90373E7AF3266F6DECADB120C\sketch\OV767X_flexio_tft.ino.cpp -o nul
Alternatives for FlexIO_t4.h: [FlexIO_t4@1.0.0 FlexIO_t4@1.0.0]
ResolveLibrary(FlexIO_t4.h)
  -> candidates: [FlexIO_t4@1.0.0 FlexIO_t4@1.0.0]
C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\tools\teensy-compile\11.3.1/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY_MICROMOD -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4 -Ic:\Users\kurte\Documents\Arduino\libraries\Arduino_OV7670X\src -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Wire -Ic:\Users\kurte\Documents\Arduino\libraries\FlexIO_t4\src C:\Users\kurte\AppData\Local\Temp\arduino\sketches\84548AC90373E7AF3266F6DECADB120C\sketch\OV767X_flexio_tft.ino.cpp -o nul
Alternatives for ILI9341_t3n.h: [ILI9341_t3n@1.1.1]
ResolveLibrary(ILI9341_t3n.h)
  -> candidates: [ILI9341_t3n@1.1.1]
C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\tools\teensy-compile\11.3.1/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY_MICROMOD -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4 -Ic:\Users\kurte\Documents\Arduino\libraries\Arduino_OV7670X\src -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Wire -Ic:\Users\kurte\Documents\Arduino\libraries\FlexIO_t4\src -Ic:\Users\kurte\Documents\Arduino\libraries\ILI9341_t3n\src C:\Users\kurte\AppData\Local\Temp\arduino\sketches\84548AC90373E7AF3266F6DECADB120C\sketch\OV767X_flexio_tft.ino.cpp -o nul
Alternatives for SPI.h: [SPI@1.0]
ResolveLibrary(SPI.h)
  -> candidates: [SPI@1.0]
C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\tools\teensy-compile\11.3.1/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY_MICROMOD -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4 -Ic:\Users\kurte\Documents\Arduino\libraries\Arduino_OV7670X\src -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Wire -Ic:\Users\kurte\Documents\Arduino\libraries\FlexIO_t4\src -Ic:\Users\kurte\Documents\Arduino\libraries\ILI9341_t3n\src -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\SPI C:\Users\kurte\AppData\Local\Temp\arduino\sketches\84548AC90373E7AF3266F6DECADB120C\sketch\OV767X_flexio_tft.ino.cpp -o nul
C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\tools\teensy-compile\11.3.1/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY_MICROMOD -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4 -Ic:\Users\kurte\Documents\Arduino\libraries\Arduino_OV7670X\src -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Wire -Ic:\Users\kurte\Documents\Arduino\libraries\FlexIO_t4\src -Ic:\Users\kurte\Documents\Arduino\libraries\ILI9341_t3n\src -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\SPI c:\Users\kurte\Documents\Arduino\libraries\Arduino_OV7670X\src\OV767X.cpp -o nul
Using cached library dependencies for file: c:\Users\kurte\Documents\Arduino\libraries\Arduino_OV7670X\src\utility\ov7670.c
Using cached library dependencies for file: c:\Users\kurte\Documents\Arduino\libraries\Arduino_OV7670X\src\utility\ov7670_arduino_shim.cpp
Using cached library dependencies for file: C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Wire\Wire.cpp
Using cached library dependencies for file: C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Wire\WireIMXRT.cpp
Using cached library dependencies for file: C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Wire\WireKinetis.cpp
Using cached library dependencies for file: C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Wire\utility\twi.c
Using cached library dependencies for file: c:\Users\kurte\Documents\Arduino\libraries\FlexIO_t4\src\FlexIOSPI.cpp
Using cached library dependencies for file: c:\Users\kurte\Documents\Arduino\libraries\FlexIO_t4\src\FlexIO_t4.cpp
Using cached library dependencies for file: c:\Users\kurte\Documents\Arduino\libraries\FlexIO_t4\src\FlexSerial.cpp
Using cached library dependencies for file: c:\Users\kurte\Documents\Arduino\libraries\ILI9341_t3n\src\ILI9341_t3n.cpp
Using cached library dependencies for file: c:\Users\kurte\Documents\Arduino\libraries\ILI9341_t3n\src\glcdfont.c
Using cached library dependencies for file: c:\Users\kurte\Documents\Arduino\libraries\ILI9341_t3n\src\ili9341_t3n_font_Arial.c
Using cached library dependencies for file: c:\Users\kurte\Documents\Arduino\libraries\ILI9341_t3n\src\ili9341_t3n_font_ArialBold.c
Using cached library dependencies for file: c:\Users\kurte\Documents\Arduino\libraries\ILI9341_t3n\src\ili9341_t3n_font_ComicSansMS.c
Using cached library dependencies for file: c:\Users\kurte\Documents\Arduino\libraries\ILI9341_t3n\src\ili9341_t3n_font_OpenSans.c
Using cached library dependencies for file: C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\SPI\SPI.cpp
Generating function prototypes...
C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\tools\teensy-compile\11.3.1/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY_MICROMOD -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4 -Ic:\Users\kurte\Documents\Arduino\libraries\Arduino_OV7670X\src -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Wire -Ic:\Users\kurte\Documents\Arduino\libraries\FlexIO_t4\src -Ic:\Users\kurte\Documents\Arduino\libraries\ILI9341_t3n\src -IC:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\SPI C:\Users\kurte\AppData\Local\Temp\arduino\sketches\84548AC90373E7AF3266F6DECADB120C\sketch\OV767X_flexio_tft.ino.cpp -o C:\Users\kurte\AppData\Local\Temp\1892314832\sketch_merged.cpp
C:\Users\kurte\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\kurte\AppData\Local\Temp\1892314832\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-tools\\1.59.0/precompile_helper" "C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\1.59.0/cores/teensy4" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino\\sketches\\84548AC90373E7AF3266F6DECADB120C" "C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-compile\\11.3.1/arm/bin/arm-none-eabi-g++" -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY_MICROMOD -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\1.59.0/cores/teensy4" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino\\sketches\\84548AC90373E7AF3266F6DECADB120C/pch/Arduino.h" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino\\sketches\\84548AC90373E7AF3266F6DECADB120C/pch/Arduino.h.gch"
Using previously compiled file: C:\Users\kurte\AppData\Local\Temp\arduino\sketches\84548AC90373E7AF3266F6DECADB120C\pch\Arduino.h.gch
"C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-compile\\11.3.1/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY_MICROMOD -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\kurte\\AppData\\Local\\Temp\\arduino\\sketches\\84548AC90373E7AF3266F6DECADB120C/pch" "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\1.59.0\\cores\\teensy4" "-Ic:\\Users\\kurte\\Documents\\Arduino\\libraries\\Arduino_OV7670X\\src" "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\1.59.0\\libraries\\Wire" "-Ic:\\Users\\kurte\\Documents\\Arduino\\libraries\\FlexIO_t4\\src" "-Ic:\\Users\\kurte\\Documents\\Arduino\\libraries\\ILI9341_t3n\\src" "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\1.59.0\\libraries\\SPI" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino\\sketches\\84548AC90373E7AF3266F6DECADB120C\\sketch\\OV767X_flexio_tft.ino.cpp" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino\\sketches\\84548AC90373E7AF3266F6DECADB120C\\sketch\\OV767X_flexio_tft.ino.cpp.o"
internal error in mingw32_gt_pch_use_address, at config/i386/host-mingw32.c:192: MapViewOfFileEx: Attempt to access invalid address.

Multiple libraries were found for "FlexIO_t4.h"
  Used: D:\github\FlexIO_t4
  Not used: C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\FlexIO_t4
Using library Arduino_OV767X at version 0.0.2 in folder: D:\github\Arduino_OV767X
Using library Wire at version 1.0 in folder: C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Wire
Using library FlexIO_t4 at version 1.0.0 in folder: D:\github\FlexIO_t4
Using library ILI9341_t3n at version 1.1.1 in folder: D:\github\ili9341_t3n
Using library SPI at version 1.0 in folder: C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\SPI
exit status 1

Compilation error: exit status 1

Compiling for Micromod with the release on yesterday's nightly build on Windows 11. Which is the first nightly build with the custom FQBN pr in it.

EDIT: - deleting the cached stuff resolved it :D
Will still install todays build...
 
I know this has already been reported but had the same issue with HardwareSerial * needing to be replaced with HardwareSerialIMXRT * when trying to use write9bit() function.
 
Since updating Teensy to the latest version I'm having issues where Joystick.useManualSend no longer works. I don't know if others are experiencing this.
 
I'm having issues where Joystick.useManualSend no longer works. I don't know if others are experiencing this.

I don't know either, but since nobody has confirmed, difficult to know if you really have found a problem or not. Since you didn't give us a program and instructions to reproduce the problem, all anyone can do is wait.

Or perhaps someone could try to craft a program from scratch to investigate. But unless a problem is reported by multiple people and considered to be a severe issue, usually I do not try to create such a program from scratch. Over and over people have reported an issue without code and when I try to recreate the problem from scratch, I do it differently and my code doesn't reproduce the issue. It usually just wastes a lot of time for no benefit. Sometimes I even find out, after wasting a lot of time, the problem only happens if using a system like PlatformIO with different compiler command line settings. That is the reason why I ask for code to copy into Arduino IDE, because the compiler commands are known.

If you want me or others to look into this problem, the path forward requires more work on your part. You need to compose a small but complete program I or anyone else can copy into Arduino IDE and upload. You also need to be specific about which Teensy to use, what hardware (if any) needs to be connected, and what software to run on the PC side to observe the problem.
 
I've got Arduino 1.8.19 and 2.3.2 installed on 2 separate PC's to test what is going on. Both have Teensy 1.59.0 installed as well. While testing I used the pre made example in File > Examples > Teensy > USB_Joystick > Complete with no luck. I also used 2 of my own codes to test with the same issue coming up. Both have issues with Joystick.useManualSend. I'm attaching my code for a touchpad joystick I created (and have already been gaming with) that now doesn't compile. I'm using a teensy LC and 4.0.

Code:
// Current Prototype - March 2023
// Copyright (c) 2018 Cirque Corp. Restrictions apply. See: www.cirque.com/sw-license

#include <SPI.h>

// This device is currently built to operate with a Teensy 3.2.
// It can easily be adapted to work with other Arduino-based systems.
// This device is using a Cirque TM0XX0XX trackpad with a Curved Overlay.
// A 12 pin FFC cable, A 12 pin 0.5mm Ribbon adapter, Jumper cables, and the Teensy

// This application connects to a TM0XX0XX circular trackpad via SPI. To verify that
// your trackpad is configured for SPI-mode, make sure that R1 is populated with a
// 470k resistor (or whichever resitor connects pins 24 & 25 of the 1CA027 IC).

// NOTE: To eliminate any confusion in the hookup process I've listed below the old
// and new terminology. For example MISO (OLD) = CIPO (NEW). Depending on when you
// started to code, this may be useful

// NOTE: Additionally I've color coded the wires to aid in your hookup process.

// The TM0XX0XX circular trackpad is configured for Absolute mode tracking.
// The Teensy 3.2 becomes a USB joystick. You must select Joystick from the
// "tools > USB Type" menu. Joystick code pulled from public domain.

// Pinnacle TM0XX0XX with Arduino (Hookup)
// Trackpad -> 12 pin FFC cable -> Ribbon Adapter -> Jumper cables -> Teensy 3.2

// 12 pin 0.5mm Ribbon Adapter
// Pin 1 SCK            (SPI Clock Line)                        (GREEN)
// Pin 2 MISO           (SPI Master Input Slave Output)         (RED)
//       CIPO           (SPI Controller In Peripheral Out)
// Pin 3 SS             (Slave Select)                          (BROWN)
//       CS             (Chip Select)
// Pin 4 DR             (Data Ready)                            (ORANGE)
// Pin 5 MOSI           (SPI Master Output Slave Input)         (PURPLE)
//       COPI           (SPI Controller out Peripheral In)
// Pin 6 BTN2           (Hardware input button #2)
// Pin 7 BTN3           (Hardware input button #3)
// Pin 8 BTN1           (Hardware input button #1)
// Pin 9 SCL            (I2C Clock Line)
// Pin 10 SDA           (I2C Data Line)
// Pin 11 GND           (Ground)                                (YELLOW)
// Pin 12 VDD           (3.3V Power Supply)                       (BLUE)

// Hardware pin-number labels (Teensy 3.2 / Teensy LC)
#define SCK_PIN       13  
#define DIN_PIN       12    
#define DOUT_PIN      11  
#define CS_PIN        10  
#define DR_PIN        9

#define LED_0       21
#define LED_1       20

// Mask for Cirque Register Access Protocol (RAP)
#define WRITE_MASK  0x80
#define READ_MASK   0xA0

// Register config values for this demo
#define SYSCONFIG_1   0x00
#define FEEDCONFIG_1  0x83
#define FEEDCONFIG_2  0x06
#define Z_IDLE_COUNT  0x05

// Coordinate scaling values
#define PINNACLE_XMAX     2047     // max value Pinnacle can report for X (0to (8 * 256) - 1)
#define PINNACLE_YMAX     1535     // max value Pinnacle can report for Y (0to (6 * 256) - 1)
#define PINNACLE_X_LOWER  511      // min "reachable" X value 127
#define PINNACLE_X_UPPER  1535     // max "reachable" X value 1919
#define PINNACLE_Y_LOWER  226      // min "reachable" Y value 63
#define PINNACLE_Y_UPPER  1250     // max "reachable" Y value 1471
#define PINNACLE_X_RANGE  (PINNACLE_X_UPPER-PINNACLE_X_LOWER)
#define PINNACLE_Y_RANGE  (PINNACLE_Y_UPPER-PINNACLE_Y_LOWER)
#define ZONESCALE 256   // divisor for reducing x,y values to an array index for the LUT
#define ROWS_Y ((PINNACLE_YMAX + 1) / ZONESCALE)
#define COLS_X ((PINNACLE_XMAX + 1) / ZONESCALE)

// ADC-attenuation settings (held in BIT_7 and BIT_6)
// 1X = most sensitive, 4X = least sensitive
#define ADC_ATTENUATE_1X   0x00
#define ADC_ATTENUATE_2X   0x40
#define ADC_ATTENUATE_3X   0x80
#define ADC_ATTENUATE_4X   0xC0

// Convenient way to store and access measurements
typedef struct _absData
{
  uint16_t xValue;
  uint16_t yValue;
  uint16_t zValue;
  uint8_t buttonFlags;
  bool touchDown;
  bool hovering;
} absData_t;

absData_t touchData;

//const uint16_t ZONESCALE = 256;
//const uint16_t ROWS_Y = 6;
//const uint16_t COLS_X = 8;

// These values require tuning for optimal touch-response
// Each element represents the Z-value below which is considered "hovering" in that XY region of the sensor.
// The values present are not guaranteed to work for all HW configurations.
const uint8_t ZVALUE_MAP[ROWS_Y][COLS_X] =
{
  {5, 5,  5,  5,  5,  5, 5, 5},
  {5, 5,  5,  5,  5,  5, 5, 5},
  {5, 5,  5, 15, 15,  5, 5, 5},
  {5, 5,  5, 15, 15,  5, 5, 5},
  {5, 5,  5,  5,  5,  5, 5, 5},
  {5, 5,  5,  5,  5,  5, 5, 5},
};

// setup() gets called once at power-up, sets up serial debug output and Cirque's Pinnacle ASIC.
void setup()
{
  Serial.begin(115200);
  Joystick.useManualSend(true);

  pinMode(LED_0, OUTPUT);

  Pinnacle_Init();

  // These functions are required for use with thick overlays (curved)
  setAdcAttenuation(ADC_ATTENUATE_4X);
  tuneEdgeSensitivity();

  Serial.println();
  Serial.println("X\tY\tZ\tBtn\tData");
  Pinnacle_EnableFeed(true);
}

// loop() continuously checks to see if data-ready (DR) is high. If so, reads and reports touch data to terminal.
void loop()
{
  if(DR_Asserted())
  {
    Pinnacle_GetAbsolute(&touchData);
    Pinnacle_CheckValidTouch(&touchData);     // Checks for "hover" caused by curved overlays
    if (touchData.touchDown)
      ScaleData(&touchData, PINNACLE_X_RANGE, PINNACLE_Y_RANGE);      // Scale coordinates to arbitrary X, Y resolution  
    else{
      touchData.xValue = PINNACLE_X_RANGE/2;  //Joystick range divisible to center stick, Maintain value 3.5    
      touchData.yValue = PINNACLE_Y_RANGE/2; //Joystick range divsiible to center stick, Maintain value 2.75
    }
    Joystick.X(touchData.yValue);
    Joystick.Y(touchData.xValue);

    Serial.print(touchData.xValue);
    Serial.print('\t');
    Serial.print(touchData.yValue);
    Serial.print('\t');
    Serial.print(touchData.zValue);
    Serial.print('\t');
    Serial.print(touchData.buttonFlags);
    Serial.print('\t');
    if(Pinnacle_zIdlePacket(&touchData))
    {
      Serial.println("liftoff");
    }
    else if(touchData.hovering)
    {
      Serial.println("hovering");
    }
    else
    {
      Serial.println("valid");
    }
  }
  AssertSensorLED(touchData.touchDown);
  Joystick.send_now();
}

/*  Pinnacle-based TM0XX0XX Functions  */
void Pinnacle_Init()
{
  RAP_Init();
  DeAssert_CS();
  pinMode(DR_PIN, INPUT);

  // Host clears SW_CC flag
  Pinnacle_ClearFlags();

  // Host configures bits of registers 0x03 and 0x05
  RAP_Write(0x03, SYSCONFIG_1);
  RAP_Write(0x05, FEEDCONFIG_2);

  // Host enables preferred output mode (absolute)
  RAP_Write(0x04, FEEDCONFIG_1);

  // Host sets z-idle packet count to 5 (default is 30)
  RAP_Write(0x0A, Z_IDLE_COUNT);
  Serial.println("Pinnacle Initialized...");
}

// Reads XYZ data from Pinnacle registers 0x14 through 0x17
// Stores result in absData_t struct with xValue, yValue, and zValue members
void Pinnacle_GetAbsolute(absData_t * result)
{
  uint8_t data[6] = { 0,0,0,0,0,0 };
  RAP_ReadBytes(0x12, data, 6);

  Pinnacle_ClearFlags();

  result->buttonFlags = data[0] & 0x3F;
  result->xValue = data[2] | ((data[4] & 0x0F) << 8);
  result->yValue = data[3] | ((data[4] & 0xF0) << 4);
  result->zValue = data[5] & 0x3F;

  result->touchDown = result->xValue != 0;
}

// Checks touch data to see if it is a z-idle packet (all zeros)
bool Pinnacle_zIdlePacket(absData_t * data)
{
  return data->xValue == 0 && data->yValue == 0 && data->zValue == 0;
}

// Clears Status1 register flags (SW_CC and SW_DR)
void Pinnacle_ClearFlags()
{
  RAP_Write(0x02, 0x00);
  delayMicroseconds(50);
}

// Enables/Disables the feed
void Pinnacle_EnableFeed(bool feedEnable)
{
  uint8_t temp;

  RAP_ReadBytes(0x04, &temp, 1);  // Store contents of FeedConfig1 register

  if(feedEnable)
  {
    temp |= 0x01;                 // Set Feed Enable bit
    RAP_Write(0x04, temp);
  }
  else
  {
    temp &= ~0x01;                // Clear Feed Enable bit
    RAP_Write(0x04, temp);
  }
}


/*  Curved Overlay Functions  */
// Adjusts the feedback in the ADC, effectively attenuating the finger signal
// By default, the the signal is maximally attenuated (ADC_ATTENUATE_4X for use with thin, flat overlays
void setAdcAttenuation(uint8_t adcGain)
{
  uint8_t temp = 0x00;

  Serial.println();
  Serial.println("Setting ADC gain...");
  ERA_ReadBytes(0x0187, &temp, 1);
  temp &= 0x3F; // clear top two bits
  temp |= adcGain;
  ERA_WriteByte(0x0187, temp);
  ERA_ReadBytes(0x0187, &temp, 1);
  Serial.print("ADC gain set to:\t");
  Serial.print(temp &= 0xC0, HEX);
  switch(temp)
  {
    case ADC_ATTENUATE_1X:
      Serial.println(" (X/1)");
      break;
    case ADC_ATTENUATE_2X:
      Serial.println(" (X/2)");
      break;
    case ADC_ATTENUATE_3X:
      Serial.println(" (X/3)");
      break;
    case ADC_ATTENUATE_4X:
      Serial.println(" (X/4)");
      break;
    default:
      break;
  }
}

// Changes thresholds to improve detection of fingers
void tuneEdgeSensitivity()
{
  uint8_t temp = 0x00;

  Serial.println();
  Serial.println("Setting xAxis.WideZMin...");
  ERA_ReadBytes(0x0149, &temp, 1);
  Serial.print("Current value:\t");
  Serial.println(temp, HEX);
  ERA_WriteByte(0x0149,  0x04);
  ERA_ReadBytes(0x0149, &temp, 1);
  Serial.print("New value:\t");
  Serial.println(temp, HEX);

  Serial.println();
  Serial.println("Setting yAxis.WideZMin...");
  ERA_ReadBytes(0x0168, &temp, 1);
  Serial.print("Current value:\t");
  Serial.println(temp, HEX);
  ERA_WriteByte(0x0168,  0x03);
  ERA_ReadBytes(0x0168, &temp, 1);
  Serial.print("New value:\t");
  Serial.println(temp, HEX);
}

// This function identifies when a finger is "hovering" so your system can choose to ignore them.
// Explanation: Consider the response of the sensor to be flat across it's area. The Z-sensitivity of the sensor projects this area
// a short distance upwards above the surface of the sensor. Imagine it is a solid cylinder (wider than it is tall)
// in which a finger can be detected and tracked. Adding a curved overlay will cause a user's finger to dip deeper in the middle, and higher
// on the perimeter. If the sensitivity is tuned such that the sensing area projects to the highest part of the overlay, the lowest
// point will likely have excessive sensitivity. This means the sensor can detect a finger that isn't actually contacting the overlay in the shallower area.
// ZVALUE_MAP[][] stores a lookup table in which you can define the Z-value and XY position that is considered "hovering". Experimentation/tuning is required.
// NOTE: Z-value output decreases to 0 as you move your finger away from the sensor, and it's maximum value is 0x63 (6-bits).
void Pinnacle_CheckValidTouch(absData_t * touchData)
{
  uint32_t zone_x, zone_y;
  //eliminate hovering
  zone_x = touchData->xValue / ZONESCALE;
  zone_y = touchData->yValue / ZONESCALE;
  touchData->hovering = !(touchData->zValue > ZVALUE_MAP[zone_y][zone_x]);
}

/*  ERA (Extended Register Access) Functions  */
// Reads <count> bytes from an extended register at <address> (16-bit address),
// stores values in <*data>
void ERA_ReadBytes(uint16_t address, uint8_t * data, uint16_t count)
{
  uint8_t ERAControlValue = 0xFF;

  Pinnacle_EnableFeed(false); // Disable feed

  RAP_Write(0x1C, (uint8_t)(address >> 8));     // Send upper byte of ERA address
  RAP_Write(0x1D, (uint8_t)(address & 0x00FF)); // Send lower byte of ERA address

  for(uint16_t i = 0; i < count; i++)
  {
    RAP_Write(0x1E, 0x05);  // Signal ERA-read (auto-increment) to Pinnacle

    // Wait for status register 0x1E to clear
    do
    {
      RAP_ReadBytes(0x1E, &ERAControlValue, 1);
    } while(ERAControlValue != 0x00);

    RAP_ReadBytes(0x1B, data + i, 1);

    Pinnacle_ClearFlags();
  }
}

// Writes a byte, <data>, to an extended register at <address> (16-bit address)
void ERA_WriteByte(uint16_t address, uint8_t data)
{
  uint8_t ERAControlValue = 0xFF;

  Pinnacle_EnableFeed(false); // Disable feed

  RAP_Write(0x1B, data);    //Send data byte to be written

  RAP_Write(0x1C, (uint8_t)(address >> 8));     // Upper byte of ERA address
  RAP_Write(0x1D, (uint8_t)(address & 0x00FF)); // Lower byte of ERA address

  RAP_Write(0x1E, 0x05);  // Signal ERA-read (auto-increment) to Pinnacle

  // Wait for status register 0x1E to clear
  do
  {
    RAP_ReadBytes(0x1E, &ERAControlValue, 1);
  } while(ERAControlValue != 0x00);

  Pinnacle_ClearFlags();
}

/*  RAP Functions */

void RAP_Init()
{
  pinMode(CS_PIN, OUTPUT);
  SPI.begin();
}

// Reads <count> Pinnacle registers starting at <address>
void RAP_ReadBytes(byte address, byte * data, byte count)
{
  byte cmdByte = READ_MASK | address;   // Form the READ command byte

  SPI.beginTransaction(SPISettings(20000000, MSBFIRST, SPI_MODE1));

  Assert_CS();
  SPI.transfer(cmdByte);  // Signal a RAP-read operation starting at <address>
  SPI.transfer(0xFC);     // Filler byte
  SPI.transfer(0xFC);     // Filler byte
  for(byte i = 0; i < count; i++)
  {
    data[i] =  SPI.transfer(0xFC);  // Each subsequent SPI transfer gets another register's contents
  }
  DeAssert_CS();

  SPI.endTransaction();
}

// Writes single-byte <data> to <address>
void RAP_Write(byte address, byte data)
{
  byte cmdByte = WRITE_MASK | address;  // Form the WRITE command byte

  SPI.beginTransaction(SPISettings(10000000, MSBFIRST, SPI_MODE1));

  Assert_CS();
  SPI.transfer(cmdByte);  // Signal a write to register at <address>
  SPI.transfer(data);    // Send <value> to be written to register
  DeAssert_CS();

  SPI.endTransaction();
}

/*  Logical Scaling Functions */
// Clips raw coordinates to "reachable" window of sensor
// NOTE: values outside this window can only appear as a result of noise
void ClipCoordinates(absData_t * coordinates)
{
  if(coordinates->xValue < PINNACLE_X_LOWER)
  {
    coordinates->xValue = PINNACLE_X_LOWER;
  }
  else if(coordinates->xValue > PINNACLE_X_UPPER)
  {
    coordinates->xValue = PINNACLE_X_UPPER;
  }
  if(coordinates->yValue < PINNACLE_Y_LOWER)
  {
    coordinates->yValue = PINNACLE_Y_LOWER;
  }
  else if(coordinates->yValue > PINNACLE_Y_UPPER)
  {
    coordinates->yValue = PINNACLE_Y_UPPER;
  }
}

// Scales data to desired X & Y resolution
void ScaleData(absData_t * coordinates, uint16_t xResolution, uint16_t yResolution)
{
  uint32_t xTemp = 0;
  uint32_t yTemp = 0;

  ClipCoordinates(coordinates);

  xTemp = coordinates->xValue;
  yTemp = coordinates->yValue;

  // translate coordinates to (0, 0) reference by subtracting edge-offset
  xTemp -= PINNACLE_X_LOWER; //For joystick, this is the Y Axis
  yTemp -= PINNACLE_Y_LOWER; //For joystick, this is the X Axis

  // scale coordinates to (xResolution, yResolution) range
  coordinates->xValue = (uint16_t)(xTemp * xResolution / PINNACLE_X_RANGE);
  coordinates->yValue = (uint16_t)(yTemp * yResolution / PINNACLE_Y_RANGE);
}

/*  I/O Functions */
void Assert_CS()
{
  digitalWrite(CS_PIN, LOW);
}

void DeAssert_CS()
{
  digitalWrite(CS_PIN, HIGH);
}

void AssertSensorLED(bool state)
{
  digitalWrite(LED_0, !state);
}

bool DR_Asserted()
{
  return digitalRead(DR_PIN);
}
 
If you set your USB to Keyboard+Mouse+Joystick it compiles just fine.
Without "Joystick" as one of the USB settings it wil, fail to compile.
 
I just managed to get everything to work. Joystick.useManualSend is no longer an issue for me. It resolved itself when I changed fallingEdge and rising edge to fell/ rose. Keyboard+Mouse+Joystick was still selected. Sorry to be an inconvenience.
 
I just ran into something after updating to 1.59.0.
I'm using Arduino IDE 2.3.2 (on Windows 10) and the current FastLED 3.6.0.
After updating from 1.58.2 to 1.59.0, when I upload a FastLED sketch it doesn't seem to run. I do see the message that the compile and upload are done, but the sketch doesn't seem to be running. After switching back to 1.58.2 things run as normal again.

Edit: forgot to mention this is on a Teensy 3.2.
 
Back
Top