USB device libary?

Status
Not open for further replies.

jsprenkle

New member
Good afternoon,

I'm trying to implement a USB connected device controlled from a regular PC.
I'm a Noob to Teensy. I ordered some "LC" version boards to play with.
The documentation on the pjrc site says the HID code is deprecated and to use TeensyDuino.
Is there an example project like RawHID to look at?
Which libraries implement the USB device calls?

Thanks,
Jay
 
Depending on your choice of the compiler options in the Arduino Tools -> USB type menu (after installing the Teensyduino plugin), the needed core files are automatically included and the USB port accordingly configured after compile, upload, and reboot (of the Teensy). That's why all this old USB stuff is deprecated.

If you selected for example USB Raw HID type, you might directly use the following functions without including additional libraries:

int usb_rawhid_recv(void *buffer, uint32_t timeout);
int usb_rawhid_available(void);
int usb_rawhid_send(const void *buffer, uint32_t timeout);
 
Just a recommendation: Take a rainy afternoon and look through the Teensyduino core files. That's more interesting than reading manuals or googling for (outdated) information.
 
Status
Not open for further replies.
Back
Top