arpruss / USBComposite_stm32f1

USB Composite library for STM32F1 (HID, Serial, MIDI and XBox360 controller)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple Output and Feature Buffers

MarvinSt opened this issue · comments

First of all thank you for this library. I am using it to implement a force feedback steering wheel driver and need to handle many outputs and features. If I understand the library correctly, I need to setup an HIDReportHandler for each reportId and allocate a HIDBuffer for each output and feature. I then add each HIDBuffer to the HID interface with HID.addOutputBuffer(bufOut[i]) and HID.addFeatureBuffer(bufFeat[i]). Now with reporter[reportId].setFeature/getOutput, I can send and process the information.

It is working well, but the amount of buffers seems to be limited to 8 and I need to process more outputs and features (something like 11 in total).

I have two questions:

  • can I increase the maximum number of buffers?
  • do I really need to create many report handlers for each output/feature, or can I use a single report handler and buffer to receive outputs/features with different report ids?

Thank you in advance.