Source code from TeensyLC to Teensy 3.2

Status
Not open for further replies.

LuisHS

Well-known member
Hello everybody:

I have a source code for a Teensy LC, but I want translate it to a Teensy 3.2. I do not have experience with Arduino, but for a long time I develop for PIC32 and ARM STM32 microcontrollers, and also soon I will begin with NXP Kinetis. For me the more hard is C++, because all my developments with PIC32 and STM32 are in C, though I have develop something for PC with VC++.

The question is if its very hard translate source code from Teensy LC to Teensy 3.2. Currenty if I compile the source code for Teensy 3.2, there are these 3 errors:

C:\ARDUINO\hardware\teensy\avr\cores\teensy3/usb_seremu.h:90:25: error: conflicting declaration 'usb_seremu_class Serial'
extern usb_seremu_class Serial;
^
C:\ARDUINO\hardware\teensy\avr\cores\teensy3/usb_serial.h:139:25: error: 'Serial' has a previous declaration as 'usb_serial_class Serial'
extern usb_serial_class Serial;
^
C:\ARDUINO\hardware\teensy\avr\cores\teensy3/usb_keyboard.h:92:29: error: 'usb_keymedia_release_all' was not declared in this scope
usb_keymedia_release_all();
^



Thank you.
 
Last edited:
This normally can't happen. Did you mess with the USB descriptors? What USB type did you select?

Post some full compiler command lines (Settings/Preferences verbose output during compilation, if you haven't enabled that).
 
This normally can't happen. Did you mess with the USB descriptors? What USB type did you select?

Post some full compiler command lines (Settings/Preferences verbose output during compilation, if you haven't enabled that).


Thanks, I have solve already.

This is to emulate a Xbox 360 gamepad, so its not an HID USB device, but an Xinput USB device. I have add 3 lines to boards.txt file for USB Xinput Teensy 3.2, and then compile and run without errors. Now I connect Teensy 3.2 to PC by USB and Windows recognize it like an Xbox 360 gamepad. I must check IO ports because I do not know if Teensy LC and Teensy 3.2 have same pinout for IO ports, to connect buttons, joysticks, pads and rumble motors.
 
Last edited:
Status
Not open for further replies.
Back
Top