Wykres commitów

8 Commity (ee40d1704fc3ec285f0be67ef7010670a1c5c01a)

Autor SHA1 Wiadomość Data
Damien George 47ecbbbecb stm32/usb: Add ability to have 2x VCP interfaces on the one USB device.
This patch adds the configuration MICROPY_HW_USB_ENABLE_CDC2 which enables
a new USB device configuration at runtime: VCP+VCP+MSC.  It will give two
independent VCP interfaces available via pyb.USB_VCP(0) and pyb.USB_VCP(1).
The first one is the usual one and has the REPL on it.  The second one is
available for general use.

This configuration is disabled by default because if the mode is not used
then it takes up about 2200 bytes of RAM.  Also, F4 MCUs can't support this
mode on their USB FS peripheral (eg PYBv1.x) because they don't have enough
endpoints.  The USB HS peripheral of an F4 supports it, as well as both the
USB FS and USB HS peripherals of F7 MCUs.
2018-05-14 23:44:45 +10:00
Damien George bf08a99ccd stm32/usb: Combine CDC lower-layer and interface state into one struct. 2018-05-14 16:15:58 +10:00
Damien George d966a33486 stm32: Change header include guards from STMHAL to STM32 to match dir. 2018-02-15 15:47:04 +11:00
Damien George db702ba722 stm32/usbdev: Add support for high-speed USB device mode.
This patch adds support in the USBD configuration and CDC-MSC-HID class for
high-speed USB mode.  To enable it the board configuration must define
USE_USB_HS, and either not define USE_USB_HS_IN_FS, or be an STM32F723 or
STM32F733 MCU which have a built-in HS PHY.  High-speed mode is then
selected dynamically by passing "high_speed=True" to the pyb.usb_mode()
function, otherwise it defaults to full-speed mode.

This patch has been tested on an STM32F733.
2018-02-01 17:57:44 +11:00
Li Weiwei e39fcda8eb stm32/usbd_cdc_interface.h: Fix code comments after recent refactor. 2017-10-13 12:45:16 +11:00
Damien George f8f17f48c5 stm32/usbdev: Put all state for the USB device driver in a struct. 2017-09-21 21:51:04 +10:00
Damien George 980b33177b stm32/usbdev: Put all CDC state in a struct. 2017-09-21 21:48:28 +10:00
Damien George 01dd7804b8 ports: Make new ports/ sub-directory and move all ports there.
This is to keep the top-level directory clean, to make it clear what is
core and what is a port, and to allow the repository to grow with new ports
in a sustainable way.
2017-09-06 13:40:51 +10:00