diff options
| author | hathach <[email protected]> | 2022-04-08 13:36:05 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-04-08 13:36:05 +0700 |
| commit | d5d4909c20f581ef2046932191f487c001d59ca3 (patch) | |
| tree | 1a9e0023c867554886edc12bd694000ca9d937e4 /examples | |
| parent | d97c1546957059cfb3063b95d5287e2729f7f79a (diff) | |
proof of concpet that device pio-usb work with host pio-usb
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/device/hid_boot_interface/src/main.c | 4 | ||||
| -rw-r--r-- | examples/device/hid_boot_interface/src/tusb_config.h | 3 | ||||
| -rw-r--r-- | examples/host/cdc_msc_hid/src/tusb_config.h | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/examples/device/hid_boot_interface/src/main.c b/examples/device/hid_boot_interface/src/main.c index e5e2f6856..ed7f235b7 100644 --- a/examples/device/hid_boot_interface/src/main.c +++ b/examples/device/hid_boot_interface/src/main.c @@ -31,6 +31,8 @@ #include "tusb.h" #include "usb_descriptors.h" +#include "pio_usb.h" + //--------------------------------------------------------------------+ // MACRO CONSTANT TYPEDEF PROTYPES //--------------------------------------------------------------------+ @@ -59,6 +61,8 @@ int main(void) while (1) { + pio_usb_device_task(); + tud_task(); // tinyusb device task led_blinking_task(); diff --git a/examples/device/hid_boot_interface/src/tusb_config.h b/examples/device/hid_boot_interface/src/tusb_config.h index 1c8fa40b2..d4f67e7ba 100644 --- a/examples/device/hid_boot_interface/src/tusb_config.h +++ b/examples/device/hid_boot_interface/src/tusb_config.h @@ -39,6 +39,9 @@ #error CFG_TUSB_MCU must be defined #endif +// Use raspberry pio-usb for device +#define CFG_TUD_RPI_PIO_USB 1 + // RHPort number used for device can be defined by board.mk, default to port 0 #ifndef BOARD_DEVICE_RHPORT_NUM #define BOARD_DEVICE_RHPORT_NUM 0 diff --git a/examples/host/cdc_msc_hid/src/tusb_config.h b/examples/host/cdc_msc_hid/src/tusb_config.h index 80ee8cb01..9d083c771 100644 --- a/examples/host/cdc_msc_hid/src/tusb_config.h +++ b/examples/host/cdc_msc_hid/src/tusb_config.h @@ -39,6 +39,7 @@ #error CFG_TUSB_MCU must be defined #endif +// Use raspberry pio-usb for host #define CFG_TUH_RPI_PIO_USB 1 //#define CFG_TUSB_RPI_PIO_INC_PATH 1 |
