summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-10-29 17:16:41 +0700
committerhathach <[email protected]>2013-10-29 17:16:41 +0700
commitd9ce879df84f6098e431736a297d4239d6f8eb2a (patch)
tree7ff1677d602937d4232849954bd0caa61e66e2ff /demos
parentcb0a02f8c9734af86ea86b0571bf1c6026d15dff (diff)
able to enumerate mouse + keyboard (missing timing at set configured though)
Diffstat (limited to 'demos')
-rw-r--r--demos/device/keyboard/main.c24
-rw-r--r--demos/device/keyboard/tusb_config.h2
2 files changed, 11 insertions, 15 deletions
diff --git a/demos/device/keyboard/main.c b/demos/device/keyboard/main.c
index 733aab3d9..e6c78f60d 100644
--- a/demos/device/keyboard/main.c
+++ b/demos/device/keyboard/main.c
@@ -101,22 +101,18 @@ void keyboard_device_app_task(void * p_para)
#endif
#if TUSB_CFG_DEVICE_HID_MOUSE
+hid_mouse_report_t mouse_report TUSB_CFG_ATTR_USBRAM;
void mouse_device_app_task(void * p_para)
{
-#if 1
- if (tusb_device_is_configured())
- {
- static uint32_t count =0;
- if (count < 8)
- {
- count++;
- tusbd_hid_mouse_send_report(
- &(hid_mouse_report_t) {
- .x = 20,
- .y = 20 } );
- }
- }
-#endif
+// if (tusbd_is_configured(0))
+// {
+// static uint32_t count =0;
+// if (count++ < 10)
+// {
+// mouse_report.x = mouse_report.y = 20;
+// tusbd_hid_mouse_send( &mouse_report );
+// }
+// }
}
#endif
diff --git a/demos/device/keyboard/tusb_config.h b/demos/device/keyboard/tusb_config.h
index 7569680d8..e2c7ce8e6 100644
--- a/demos/device/keyboard/tusb_config.h
+++ b/demos/device/keyboard/tusb_config.h
@@ -94,7 +94,7 @@
//------------- CLASS -------------//
#define TUSB_CFG_DEVICE_HID_KEYBOARD 1
-#define TUSB_CFG_DEVICE_HID_MOUSE 0
+#define TUSB_CFG_DEVICE_HID_MOUSE 1
#define TUSB_CFG_DEVICE_HID_GENERIC 0
#define TUSB_CFG_DEVICE_MSC 0
#define TUSB_CFG_DEVICE_CDC 0