start to add pio usb (host) support

run as proof of concept
This commit is contained in:
hathach
2022-03-01 23:55:53 +07:00
parent c9b0fbc907
commit 1d29817139
10 changed files with 300 additions and 13 deletions

View File

@@ -26,4 +26,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details.
family_configure_host_example(${PROJECT})
family_configure_host_example(${PROJECT})

View File

@@ -42,7 +42,9 @@
#if CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_HOST | OPT_MODE_HIGH_SPEED)
#else
#define CFG_TUSB_RHPORT0_MODE OPT_MODE_HOST
//#define CFG_TUSB_RHPORT0_MODE OPT_MODE_HOST
// rp2040: port0 is native, port 1 for PIO-USB
#define CFG_TUSB_RHPORT1_MODE OPT_MODE_HOST
#endif
#ifndef CFG_TUSB_OS
@@ -71,6 +73,9 @@
// CONFIGURATION
//--------------------------------------------------------------------
#define CFG_TUH_RPI_PIO 1
//#define CFG_TUSB_RPI_PIO_INC_PATH 1
// Size of buffer to hold descriptors and other data used for enumeration
#define CFG_TUH_ENUMERATION_BUFSIZE 256