STM32 USE_HOST_MODE
If I define USE_HOST_MODE to compile in the code for experimental USB OTG support here:
https://github.com/micropython/micropython/blob/master/ports/stm32/usb.c#L815, I get a host of compile errors. First is that the includes seem to have been moved to sub-directories, which I can fix like this:
#include "usbhost/Core/Inc/usbh_core.h"
#include "usbhost/Core/Src/usbh_core.c"
//#include "usbh_usr.h"
#include "usbhost/Class/HID/Inc/usbh_hid_core.h"
#include "usbhost/Class/HID/Inc/usbh_hid_keybd.h"
#include "usbhost/Class/HID/Inc/usbh_hid_mouse.h"
#include "usbhost/Core/Src/usbh_hcs.c"
Then there are a lot of missing references that I tried adding from the downloads from ST.com stm32_f105-07_f2_f4_usb-host-device_lib (STSW-STM32046 https://www.st.com/en/embedded-software/stsw-stm32046.html) and STM32Cube_FW_H7_V1.4.0 (STM32CubeH7) under /usbhost/Class/HID/, /usbhost/Class/OTG/ and /usbhost/Core/, but that causes many conflicts with the files under /usbdev/.
Could someone who managed to get the experimental USB OTG support going with a mouse or keyboard point me in the right direction?
USB host mode
Does anyone have any experience getting USB host mode working on the STM32F4 series? I've tried to no avail to get it working on the pyboard.
I'm forcing it to be in pure host mode, pretty much copying from the STM USB HID host example, but it does not work. Seems that it doesn't even register when a USB device is plugged in (it does not generate an interrupt).
Any thoughts?