diff options
author | neilh10 <neilh20@wLLw.net> | 2015-12-08 14:02:34 -0800 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-12-09 09:56:36 +0000 |
commit | 1be0fde45c8d84eaf04851af96f06aad8171b2b2 (patch) | |
tree | 6dd5ee8b27c3d6493bf1718775f766d7e96e0743 /stmhal/usb.h | |
parent | 0891cf7d2d6bfe1d3daf625213ddc99b78102f1e (diff) | |
download | micropython-1be0fde45c8d84eaf04851af96f06aad8171b2b2.tar.gz micropython-1be0fde45c8d84eaf04851af96f06aad8171b2b2.zip |
stmhal: Enable two USB phys to be supported together.
This is refactoring to enable support for the two USB PHYs available on
some STM32F4 processors to be used at the same time. The F405/7 & F429
have two USB PHYs, others such as the F411 only have one PHY.
This has been tested separately on a pyb10 (USB_FS PHY) and F429DISC
(USB_HS PHY) to be able to invoke a REPL/USB. I have modified a PYBV10
to support two PHYs.
The long term objective is to support a 2nd USB PHY to be brought up as a
USB HOST, and possibly a single USB PHY to be OTG.
Diffstat (limited to 'stmhal/usb.h')
-rw-r--r-- | stmhal/usb.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/stmhal/usb.h b/stmhal/usb.h index ae16e72076..debb4aa7c4 100644 --- a/stmhal/usb.h +++ b/stmhal/usb.h @@ -41,6 +41,11 @@ typedef enum { PYB_USB_STORAGE_MEDIUM_SDCARD, } pyb_usb_storage_medium_t; +typedef enum { + USB_PHY_FS_ID = 0, + USB_PHY_HS_ID = 1, +} USB_PHY_ID; + extern mp_uint_t pyb_usb_flags; extern struct _USBD_HandleTypeDef hUSBDDevice; extern pyb_usb_storage_medium_t pyb_usb_storage_medium; |