Need USB advice and direction

IDE 2 Hover text is COOL - pulling the comment in with the proto info!

That seems good - didn't get to read the 200 lines yet, now lunch time ... will update and look again.

Any idea on Raw HID? Not that it is critical - just thought to try/ask ...maybe support is not there/needed.

Not sure what you are asking about Raw HID?

If you are asking does this sketch handle fowarding of Raw HID to and from the PC to what is plugged into USBHost? Nope. Different protocol.

Likewise, this one does not currently support the Teensy Serial emulation (SEREMU). That one would be probably an easy addition.
Probably something like commented out section like:
Code:
USBHIDParser hid1(myusb);
USBHIDParser hid2(myusb);
USBSerialEmu userial(myusb);
As for how many HIDParser objects we would need/want, it may depend. The
Code:
class USBSerialEmu : public USBHIDInput, public Stream {
Uses a HIDParser object to talk to. But other interfaces may be defined before the HID object that does EMU. So might eat those, even though maybe they should release themself if none of the objects derived from USBHIDInput claims any ot the collections. i.e. all of the data that comes in through this will be tossed.
 
Cute - it shows the bootloader baud change command :) :
Code:
U-S(20 20):15:51:10 26 4 2023
[B]DEBUG: baud change: 134[/B]
DEBUG: baud change: 115200
15:51:16 26 4 2023

Yes, was asking about Raw HID protocol detection support - just wondering.

Pulled the current branch 'USBHost_t36-USBSerial.zip' and using that. Only seeing one warning:
Code:
In file included from C:\Users\Tim\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.58.1\libraries\USBHost_t36\examples\USBtoUSBHostSerial\USBtoUSBHostSerial.ino:11:
c:\T_Drive\tCode\libraries\USBHost_t36/USBHost_t36.h: In member function 'USBFilesystem::operator bool()':
c:\T_Drive\tCode\libraries\USBHost_t36/USBHost_t36.h:2375:34: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
 2375 |                 Device_t *dev = *(Device_t * volatile *)&device;
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Not seeing hid1/2 in the sketch comments in git version? Will trust your choices.
Code:
USBHIDParser hid1(myusb);
USBHIDParser hid2(myusb);
 
Note: The USBHost_t36.h header file warning the line number does not line up with what I see in the code...

For RawHID - It has been awhile since I played with Teensy to Teensy. I believe that the 512 byte package support was merged into the USBHost code.

The code I was playing with is up in: https://github.com/KurtE/RawHid

And the cores PR from about a year and a half ago, has not been merged: https://github.com/PaulStoffregen/cores/pull/629
And surprisingly the code does not have conflicts.

Probably could extract some of the example code from there to add something to USBHost for this... Probably direct copy. The 8 times the speed of normal RAWHID was fun!
More in the thread: https://forum.pjrc.com/threads/6862...es-sense-to-add-to-system?highlight=rawhid512
 
Note: The USBHost_t36.h header file warning the line number does not line up with what I see in the code...
...

OPPS - WOW! : that header is WRONG! - and I'm just now reading it :( From IDE 2 it should be using from :: C:\Users\Tim\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.58.1\libraries\USBHost_t36
I went to the trouble of putting GIT ZIP in that folder than didn't see I had a year old copy in 'sketchbook' ... Opps.

. <Deleted old sketchbook private copy>
Builds with no errors/warnings when: Using library USBHost_t36 at version 0.2 in folder: C:\Users\Tim\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.58.1\libraries\USBHost_t36
 
Back
Top