xmos / lib_xua

XMOS USB Audio
Other
17 stars 13 forks source link

Fix channel/ep usage when NUM_USB_CHAN_IN/OUT = 0 #405

Closed xross closed 2 months ago

xross commented 2 months ago

The original issue I attempted to fix was the endpoint type table when NUM_USB_CHAN_IN == NUM_USB_CHAN_OUT == 0.

The issue was the that the EP type for the HID EP was marked as an ISO endpoint, thus making the PID toggling invalid.

However, fixing this table had knock on effects on the offsets of channels used from arrays etc, so the changes became wider reaching.

Ultimately this means that the I2S build with audio class 2 descriptors now functions.

xross commented 2 months ago

Looks good, only thing I'm wondering is whether defines can be prefixed with XUA_ as has been done elsewhere. I'm assuming you will address the failing AN00248 build as you can't merge without that.

100% agree, just tying to patch this up for now as changing this define would cause lots of things to break at the moment. Note, there is an issue tracking this: https://github.com/xmos/lib_xua/issues/2