diff options
| author | hathach <[email protected]> | 2023-03-21 21:04:06 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2023-03-21 21:04:06 +0700 |
| commit | d22fc550c76f0d2c5d980a253161e95f1a853309 (patch) | |
| tree | f1243793f2805928ed0c89f81dd75dbe49c84b94 /examples | |
| parent | 8a0b17598c14497805addbb7c670e41c9eb5c0b7 (diff) | |
change meaning of CFG_TUH_HID to total number of HID interfaces supported.
- previously CFG_TUH_HID is max number of interfaces per device which is
rather limited and consume more resources than needed.
- change hid host instance in API to index
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/dual/host_hid_to_device_cdc/src/tusb_config.h | 2 | ||||
| -rw-r--r-- | examples/host/cdc_msc_hid/src/tusb_config.h | 4 | ||||
| -rw-r--r-- | examples/host/hid_controller/src/tusb_config.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/dual/host_hid_to_device_cdc/src/tusb_config.h b/examples/dual/host_hid_to_device_cdc/src/tusb_config.h index f749bd712..72ec8d654 100644 --- a/examples/dual/host_hid_to_device_cdc/src/tusb_config.h +++ b/examples/dual/host_hid_to_device_cdc/src/tusb_config.h @@ -132,7 +132,7 @@ // max device support (excluding hub device) #define CFG_TUH_DEVICE_MAX (CFG_TUH_HUB ? 4 : 1) // hub typically has 4 ports -#define CFG_TUH_HID 4 +#define CFG_TUH_HID (4*CFG_TUH_DEVICE_MAX) #define CFG_TUH_HID_EPIN_BUFSIZE 64 #define CFG_TUH_HID_EPOUT_BUFSIZE 64 diff --git a/examples/host/cdc_msc_hid/src/tusb_config.h b/examples/host/cdc_msc_hid/src/tusb_config.h index 4b50f2096..a0a740c6e 100644 --- a/examples/host/cdc_msc_hid/src/tusb_config.h +++ b/examples/host/cdc_msc_hid/src/tusb_config.h @@ -36,7 +36,7 @@ #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 CFG_TUH_RPI_PIO_USB 1 #define BOARD_TUH_RHPORT CFG_TUH_RPI_PIO_USB #endif @@ -97,7 +97,7 @@ #define CFG_TUH_HUB 1 // number of supported hubs #define CFG_TUH_CDC 1 -#define CFG_TUH_HID 4 // typical keyboard + mouse device can have 3-4 HID interfaces +#define CFG_TUH_HID (4*CFG_TUH_DEVICE_MAX) // typical keyboard + mouse device can have 3-4 HID interfaces #define CFG_TUH_MSC 1 #define CFG_TUH_VENDOR 0 diff --git a/examples/host/hid_controller/src/tusb_config.h b/examples/host/hid_controller/src/tusb_config.h index 2e0dd0dbe..f4ddc1b81 100644 --- a/examples/host/hid_controller/src/tusb_config.h +++ b/examples/host/hid_controller/src/tusb_config.h @@ -97,7 +97,7 @@ #define CFG_TUH_HUB 0 #define CFG_TUH_CDC 0 -#define CFG_TUH_HID 4 // typical keyboard + mouse device can have 3-4 HID interfaces +#define CFG_TUH_HID (4*CFG_TUH_DEVICE_MAX) // typical keyboard + mouse device can have 3-4 HID interfaces #define CFG_TUH_MSC 0 #define CFG_TUH_VENDOR 0 |
