stm32/usb: Don't nul pyb_hid_report_desc if MICROPY_HW_USB_HID disabled.
So this code can be used if pyb_hid_report_desc is not included in the port's root pointer list. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
27e117307d
commit
547688c58c
@ -221,7 +221,9 @@ void pyb_usb_init0(void) {
|
||||
for (int i = 0; i < MICROPY_HW_USB_CDC_NUM; ++i) {
|
||||
usb_device.usbd_cdc_itf[i].attached_to_repl = false;
|
||||
}
|
||||
#if MICROPY_HW_USB_HID
|
||||
MP_STATE_PORT(pyb_hid_report_desc) = MP_OBJ_NULL;
|
||||
#endif
|
||||
|
||||
pyb_usb_vcp_init0();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user