ch32: select USBHS device speed from rhport configuration
Honor rh_init->speed when configuring the USBHS controller instead of
selecting speed with TUD_OPT_HIGH_SPEED and rejecting full-speed builds.
Map AUTO/HIGH to high speed, FULL to full speed, and LOW to low speed;
reject unsupported values. This ports the speed-selection part of #3727.
The low-speed register setting does not establish low-speed enumeration
support: the reset-completion path still relies on SOF.
Validation:
- Full example sets passed on NanoCH32V305 and CH32V307: 54 builds.
- NanoCH32V305 uac2_headset builds with USBHS forced to full speed.
- NanoCH32V305 uac2_headset stack size: +44 bytes code, no RAM change.
1 file changed