Description
The idea:
I try do work on the raw HID some more. The idea of this is to have a 2nd data pipe beside Serial. It works quite okay so far.
I just noticed some limitation of the HID Protocol:
You can only send data from the PC to the Device via Control Interrupts (works, but not good enough) or via OUT Interrupt EP (is not supported).
The real problem is that the incoming data needs to be proceeded at interrupt time. Since the size can vary from 0-infitiy A static array is not really useful. If you dont read all data the host will see an error (so you need to flush all data). Using malloc also doesnt really work well due to data corruption (tested that, after a few seconds it wont work).
-> With a 2nd EP I could overwrite the data continuously or block. If you have 25 leds for example (75 data bytes > 64 current 32u4 EP size) I could use a fixed size of 128 bytes for the EP and continuously overwrite them. If I dont want to overwrite them I could "block" with a data loss flag at least. But therefore I need to increase the EP size (which is possible on a 32u4, also double banks would be extremely nice.)
So I need an Interrupt OUT EP with variable size.
Serial also needs this Interrupt OUT EP. So if we fix this issue, we can also make the serial pluggable. If we fix the EP size we could also make the serial buffer smaller/bigger which would also be amazing.