PDA

View Full Version : Teensy 3.0 - How many USB end points does it have?



Experimentalist
11-27-2012, 08:09 PM
The question is in the title really, nothing more to add.

cmason
11-27-2012, 08:24 PM
15. See usb_desc.c (https://bitbucket.org/cmason/teensy3/src/901d3800ffd44ccefd708be6fd41bd50d60d9202/teensy/usb_desc.c) usb_endpoint_config_table.

PaulStoffregen
11-27-2012, 09:32 PM
The hardware provides all 16 endpoints. Endpoints 1 to 15 can both transmit and receive.

Experimentalist
11-27-2012, 10:38 PM
Thanks, this really begins to open things up. I am still being lazy at present and using Teensyduino, with all these end points do we see some more USB types coming? Serial, keyboard, mouse ,joystick, SD card, nose hair trimmer . . . ?

PaulStoffregen
11-27-2012, 11:03 PM
I'm working on the joystick type now. It's got some strange bug I've been unable to find.

If you look at the USB code, you'll see I'm trying to use a more modular approach, but without a lot of the complexity of some other traditional USB stacks. At some point, that'll make it easier to mix-and-match various USB stuff... and of course having lots of endpoints makes it possible too.

In the short term, I'm planning to do joystick and midi, and of course serial, keyboard and mouse are already working. Then I'm going to focus on porting more arduino libraries and writing better documentation. That's really needed more urgently than more USB options.

I do have several usb types in mind, but serious work on those probably won't happen for at least a few months.

Experimentalist
11-28-2012, 09:00 PM
Paul, I was looking at your Beta 8 post and . . .


USB Keyboard support is also added. Mouse and Joystick are not yet implemented.

Yet above you say . . .


serial, keyboard and mouse are already working

I have a Teensyduino project using "Serial +Keyboard + Mouse + Joystick" with the following includes:

#include "usb_private.h"
#include <Keypad.h>
#include <SD.h>
#include <EEPROM.h>
#include <AESLib.h>
#include <math.h>
#include "Arduino.h"

I have not tried it with Teensy 3.0 due to the comment from the Beta 8 post. Can you tell me if this lot is supported yet? I would love to get working with it but have held off so far.

Thanks

P.S. It would be great to have a running list of supported libraries for Teensy 3.0 pinned in announcements for reference, any chance?

PaulStoffregen
11-28-2012, 11:06 PM
I added mouse and joystick recently, after beta8. Mouse is working, joystick isn't (yet).

Keypad should work, but hasn't been tested.

SD & EEPROM work.

I don't have AESLib on the list. Can you provide a link to the code or website?

math.h is from the C library, and of course Arduino.h is from the core library. Those should work.

Soon I'm going to start updating the library list page with Teensy 3.0 info.

http://www.pjrc.com/teensy/td_libs.html

Experimentalist
11-29-2012, 05:30 AM
Paul, thanks for the quick response as ever.

I am not currently actually using the mouse and joystick. The AES library aside, I should be able to play with Beta 8 then by the looks of things?


I added mouse and joystick recently

Can the latest version be accessed or do I have to wait for Beta 9 to work with the mouse?

The AES library I am using is from https://github.com/DavyLandman/AESLib

You are obviously not going to scour the whole internet for code to support! Is there another native supported option for encryption you know of in Arduino or the C libraries I could use?