summaryrefslogtreecommitdiff
path: root/examples/host/bare_api
diff options
context:
space:
mode:
authorMengsk <[email protected]>2022-12-29 12:14:52 +0100
committerMengsk <[email protected]>2022-12-29 12:14:52 +0100
commit8327090171246d0928195c49f4f15ce8b569a39b (patch)
tree40b3f6d218e06bff8ec485ec1b8bfa897ce8467c /examples/host/bare_api
parentd584b07e2c8068a51c89421be2ddc116f4fc9d3e (diff)
parent549bee94add9d8f1c346bfa0fa6b25481db3f191 (diff)
Merge branch 'master' of https://github.com/hathach/tinyusb into stm32_fsdev
Diffstat (limited to 'examples/host/bare_api')
-rw-r--r--examples/host/bare_api/CMakeLists.txt13
-rw-r--r--examples/host/bare_api/Makefile3
-rw-r--r--examples/host/bare_api/src/tusb_config.h6
3 files changed, 17 insertions, 5 deletions
diff --git a/examples/host/bare_api/CMakeLists.txt b/examples/host/bare_api/CMakeLists.txt
index bc04b01a7..31a8aa222 100644
--- a/examples/host/bare_api/CMakeLists.txt
+++ b/examples/host/bare_api/CMakeLists.txt
@@ -26,5 +26,14 @@ target_include_directories(${PROJECT} PUBLIC
# in hw/bsp/FAMILY/family.cmake for details.
family_configure_host_example(${PROJECT})
-# For rp2040, un-comment to enable pico-pio-usb
-# family_add_pico_pio_usb(${PROJECT}) \ No newline at end of file
+# For rp2040 enable pico-pio-usb
+if(FAMILY STREQUAL "rp2040")
+ family_add_pico_pio_usb(${PROJECT})
+
+ # due to warnings from Pico-PIO-USB
+ target_compile_options(${PROJECT} PUBLIC
+ -Wno-error=cast-qual
+ -Wno-error=sign-conversion
+ -Wno-error=conversion
+ )
+endif() \ No newline at end of file
diff --git a/examples/host/bare_api/Makefile b/examples/host/bare_api/Makefile
index 13e14df53..84555a889 100644
--- a/examples/host/bare_api/Makefile
+++ b/examples/host/bare_api/Makefile
@@ -11,9 +11,6 @@ EXAMPLE_SOURCE += \
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
-# TODO: suppress warning caused by host stack
-CFLAGS += -Wno-error=cast-align -Wno-error=null-dereference
-
# TinyUSB Host Stack source
SRC_C += \
src/class/cdc/cdc_host.c \
diff --git a/examples/host/bare_api/src/tusb_config.h b/examples/host/bare_api/src/tusb_config.h
index ed0aaf7da..701aa6d90 100644
--- a/examples/host/bare_api/src/tusb_config.h
+++ b/examples/host/bare_api/src/tusb_config.h
@@ -34,6 +34,12 @@
// Board Specific Configuration
//--------------------------------------------------------------------+
+#if CFG_TUSB_MCU == OPT_MCU_RP2040
+// change to 1 if using pico-pio-usb as host controller for raspberry rp2040
+#define CFG_TUH_RPI_PIO_USB 0
+#define BOARD_TUH_RHPORT CFG_TUH_RPI_PIO_USB
+#endif
+
// RHPort number used for host can be defined by board.mk, default to port 0
#ifndef BOARD_TUH_RHPORT
#define BOARD_TUH_RHPORT 0