Skip to content

Commit e3b3229

Browse files
authored
Merge pull request hathach#2046 from hathach/add-usb2uart-host-driver
Add usb2uart serial host driver
2 parents 4c7fd16 + 732686c commit e3b3229

File tree

10 files changed

+925
-103
lines changed

10 files changed

+925
-103
lines changed

.codespell/ignore-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
synopsys
22
sie
33
tre
4+
thre
45
hsi
56
fro
67
dout

examples/host/cdc_msc_hid/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.5)
1+
cmake_minimum_required(VERSION 3.17)
22

33
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
44

examples/host/cdc_msc_hid/src/tusb_config.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@
9696
#define CFG_TUH_ENUMERATION_BUFSIZE 256
9797

9898
#define CFG_TUH_HUB 1 // number of supported hubs
99-
#define CFG_TUH_CDC 1
99+
#define CFG_TUH_CDC 1 // CDC ACM
100+
#define CFG_TUH_CDC_FTDI 1 // FTDI Serial. FTDI is not part of CDC class, only to re-use CDC driver API
101+
#define CFG_TUH_CDC_CP210X 1 // CP210x Serial. CP210X is not part of CDC class, only to re-use CDC driver API
100102
#define CFG_TUH_HID (3*CFG_TUH_DEVICE_MAX) // typical keyboard + mouse device can have 3-4 HID interfaces
101103
#define CFG_TUH_MSC 1
102104
#define CFG_TUH_VENDOR 0

hw/bsp/rp2040/family.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ void board_init(void)
125125
// Set the system clock to a multiple of 120mhz for bitbanging USB with pico-usb
126126
set_sys_clock_khz(120000, true);
127127

128-
#ifdef PIO_USB_VBUSEN_PIN
128+
#ifdef PICO_DEFAULT_PIO_USB_VBUSEN_PIN
129129
gpio_init(PICO_DEFAULT_PIO_USB_VBUSEN_PIN);
130130
gpio_set_dir(PICO_DEFAULT_PIO_USB_VBUSEN_PIN, GPIO_OUT);
131-
gpio_put(PICO_DEFAULT_PIO_USB_VBUSEN_PIN, PIO_USB_VBUSEN_STATE);
131+
gpio_put(PICO_DEFAULT_PIO_USB_VBUSEN_PIN, PICO_DEFAULT_PIO_USB_VBUSEN_STATE);
132132
#endif
133133

134134
// rp2040 use pico-pio-usb for host tuh_configure() can be used to passed pio configuration to the host stack

0 commit comments

Comments
 (0)