summaryrefslogtreecommitdiff
path: root/examples/device
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-06-10 18:50:59 +0700
committerGitHub <[email protected]>2019-06-10 18:50:59 +0700
commit393492823ce037a2e46d367d61fad1235859af2e (patch)
tree7bc829e94b0a542e6990566e71ec293a600d3553 /examples/device
parent69e98215ea94bf5d6a8adc042732fe2a67df9764 (diff)
parent7156bfb54d5e9e13c8574b2384a47bd5554798a9 (diff)
Merge pull request #80 from hathach/develop
added usbd_edpt_xfer/usbd_edpt_busy to replace dcd_edpt_transfer/dcd_edpt_busy()
Diffstat (limited to 'examples/device')
-rw-r--r--examples/device/cdc_msc_hid/src/main.c2
-rw-r--r--examples/device/cdc_msc_hid/src/tusb_config.h5
-rw-r--r--examples/device/cdc_msc_hid_freertos/src/tusb_config.h2
-rw-r--r--examples/device/hid_generic_inout/src/main.c15
-rw-r--r--examples/device/hid_generic_inout/src/tusb_config.h2
-rw-r--r--examples/device/msc_dual_lun/src/tusb_config.h2
6 files changed, 20 insertions, 8 deletions
diff --git a/examples/device/cdc_msc_hid/src/main.c b/examples/device/cdc_msc_hid/src/main.c
index 7c0fd39d5..8ebdddd80 100644
--- a/examples/device/cdc_msc_hid/src/main.c
+++ b/examples/device/cdc_msc_hid/src/main.c
@@ -201,7 +201,7 @@ void hid_task(void)
tud_hid_mouse_report(REPORT_ID_MOUSE, 0x00, delta, delta, 0, 0);
// delay a bit before attempt to send keyboard report
- board_delay(2);
+ board_delay(10);
}
}
diff --git a/examples/device/cdc_msc_hid/src/tusb_config.h b/examples/device/cdc_msc_hid/src/tusb_config.h
index 8981077d3..2c89a63b7 100644
--- a/examples/device/cdc_msc_hid/src/tusb_config.h
+++ b/examples/device/cdc_msc_hid/src/tusb_config.h
@@ -62,7 +62,7 @@
#endif
#ifndef CFG_TUSB_MEM_ALIGN
-#define CFG_TUSB_MEM_ALIGN ATTR_ALIGNED(4)
+#define CFG_TUSB_MEM_ALIGN TU_ATTR_ALIGNED(4)
#endif
//--------------------------------------------------------------------
@@ -95,6 +95,9 @@
// Should be sufficient to hold ID (if any) + Data
#define CFG_TUD_HID_BUFSIZE 16
+#define CFG_TUD_MIDI_RX_BUFSIZE 512
+#define CFG_TUD_MIDI_TX_BUFSIZE 512
+
#ifdef __cplusplus
}
#endif
diff --git a/examples/device/cdc_msc_hid_freertos/src/tusb_config.h b/examples/device/cdc_msc_hid_freertos/src/tusb_config.h
index dfa8be629..b4e18de92 100644
--- a/examples/device/cdc_msc_hid_freertos/src/tusb_config.h
+++ b/examples/device/cdc_msc_hid_freertos/src/tusb_config.h
@@ -62,7 +62,7 @@
#endif
#ifndef CFG_TUSB_MEM_ALIGN
-#define CFG_TUSB_MEM_ALIGN ATTR_ALIGNED(4)
+#define CFG_TUSB_MEM_ALIGN TU_ATTR_ALIGNED(4)
#endif
//--------------------------------------------------------------------
diff --git a/examples/device/hid_generic_inout/src/main.c b/examples/device/hid_generic_inout/src/main.c
index b08ca5aee..bbc61a797 100644
--- a/examples/device/hid_generic_inout/src/main.c
+++ b/examples/device/hid_generic_inout/src/main.c
@@ -34,9 +34,18 @@
* It will receive data from Host (In endpoint) and echo back (Out endpoint).
* HID Report descriptor use vendor for usage page (using template TUD_HID_REPORT_DESC_GENERIC_INOUT)
*
- * Run 'python3 hid_test.py' on your PC to send and receive data to this device.
- * Python and `hid` package is required, for installation please follow
- * https://pypi.org/project/hid/
+ * There are 2 ways to test the sketch
+ * 1. Using nodejs
+ * - Install nodejs and nmp to your PC
+ * - Install execellent node-hid (https://github.com/node-hid/node-hid) by
+ * $ npm install node-hid
+ * - Run provided hid test script
+ * $ node hid_test.js
+ *
+ * 2. Using python hidRun
+ * - Python and `hid` package is required, for installation please follow https://pypi.org/project/hid/
+ * - Run provided hid test script to send and receive data to this device.
+ * $ python3 hid_test.py
*/
//--------------------------------------------------------------------+
diff --git a/examples/device/hid_generic_inout/src/tusb_config.h b/examples/device/hid_generic_inout/src/tusb_config.h
index acd23f954..dc7d98812 100644
--- a/examples/device/hid_generic_inout/src/tusb_config.h
+++ b/examples/device/hid_generic_inout/src/tusb_config.h
@@ -62,7 +62,7 @@
#endif
#ifndef CFG_TUSB_MEM_ALIGN
-#define CFG_TUSB_MEM_ALIGN ATTR_ALIGNED(4)
+#define CFG_TUSB_MEM_ALIGN TU_ATTR_ALIGNED(4)
#endif
//--------------------------------------------------------------------
diff --git a/examples/device/msc_dual_lun/src/tusb_config.h b/examples/device/msc_dual_lun/src/tusb_config.h
index fe30fbf20..ae57b4d60 100644
--- a/examples/device/msc_dual_lun/src/tusb_config.h
+++ b/examples/device/msc_dual_lun/src/tusb_config.h
@@ -62,7 +62,7 @@
#endif
#ifndef CFG_TUSB_MEM_ALIGN
-#define CFG_TUSB_MEM_ALIGN ATTR_ALIGNED(4)
+#define CFG_TUSB_MEM_ALIGN TU_ATTR_ALIGNED(4)
#endif
//--------------------------------------------------------------------