Hello,
I'm trying to implement a custom USB type for a ham radio project; I need two serial ports and an audio port. At first glance, it seems simple: Just edit boards.txt to put in the option, and edit usb_desc.h to define the new type, pulling in pieces from other types that have the ports I want.
The first snag is endpoints. Apparently, due to timing constraints having to do with 480Mbit/s support, the Teensy 4.1 can only have 8 endpoints. Endpoints 0
and 1 are reserved. That leaves 6 endpoints. Each serial port requires two endpoints - one for data, the other for control. An audio port requires 3 endpoints. That's
7 endpoints, and we only have 6.
Why does a serial port need two endpoints? Can it work with only one?
There is also "seremu", which is a serial port that only requires one endpoint. I guess it's not as good as "Serial". But it seems good enough. Remote control of a ham radio transceiver is not exactly high-impact serial.
OK, I made an entry to usb_desc.h with one real serial port ( 2 endpoints ), one seremu port ( 1 endpoint ) and an audio port ( 3 endpoints ). 6 endpoints total.
Whups, it doesn't compile. Here's where things get interesting:
There is a seremu class, but it is never instantiated. Where would it be instantiated?
Well, it looks like it would be instantiated in usb_inst.cpp. But it isn't. In fact - usb_inst.cpp does not seem to be actually compiled. I stuck syntax errors in it, and they
are never found. Why is that?
I'm trying to implement a custom USB type for a ham radio project; I need two serial ports and an audio port. At first glance, it seems simple: Just edit boards.txt to put in the option, and edit usb_desc.h to define the new type, pulling in pieces from other types that have the ports I want.
The first snag is endpoints. Apparently, due to timing constraints having to do with 480Mbit/s support, the Teensy 4.1 can only have 8 endpoints. Endpoints 0
and 1 are reserved. That leaves 6 endpoints. Each serial port requires two endpoints - one for data, the other for control. An audio port requires 3 endpoints. That's
7 endpoints, and we only have 6.
Why does a serial port need two endpoints? Can it work with only one?
There is also "seremu", which is a serial port that only requires one endpoint. I guess it's not as good as "Serial". But it seems good enough. Remote control of a ham radio transceiver is not exactly high-impact serial.
OK, I made an entry to usb_desc.h with one real serial port ( 2 endpoints ), one seremu port ( 1 endpoint ) and an audio port ( 3 endpoints ). 6 endpoints total.
Whups, it doesn't compile. Here's where things get interesting:
There is a seremu class, but it is never instantiated. Where would it be instantiated?
Well, it looks like it would be instantiated in usb_inst.cpp. But it isn't. In fact - usb_inst.cpp does not seem to be actually compiled. I stuck syntax errors in it, and they
are never found. Why is that?