summaryrefslogtreecommitdiff
path: root/examples/device
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-04-08 13:36:05 +0700
committerhathach <[email protected]>2022-04-08 13:36:05 +0700
commitd5d4909c20f581ef2046932191f487c001d59ca3 (patch)
tree1a9e0023c867554886edc12bd694000ca9d937e4 /examples/device
parentd97c1546957059cfb3063b95d5287e2729f7f79a (diff)
proof of concpet that device pio-usb work with host pio-usb
Diffstat (limited to 'examples/device')
-rw-r--r--examples/device/hid_boot_interface/src/main.c4
-rw-r--r--examples/device/hid_boot_interface/src/tusb_config.h3
2 files changed, 7 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