2018.07.26

Dependencies:   FATFileSystem2 mbed-rtos

Fork of USBHost by mbed official

Revision:
32:e6717a485577
Parent:
27:4206883f4cb7
diff -r 220cd93c9a5f -r e6717a485577 USBHostHID/USBHostMouse.cpp
--- a/USBHostHID/USBHostMouse.cpp	Mon Jun 01 11:01:25 2015 +0100
+++ b/USBHostHID/USBHostMouse.cpp	Tue Jun 02 05:57:44 2015 +0000
@@ -48,22 +48,22 @@
 
 bool USBHostMouse::connect() {
     int len_listen;
-
+    
     if (dev_connected) {
         return true;
     }
 
     for (uint8_t i = 0; i < MAX_DEVICE_CONNECTED; i++) {
         if ((dev = host->getDevice(i)) != NULL) {
-
-            if(host->enumerate(dev, this))
+            if(host->enumerate(dev, this)){
                 break;
-
+            }
             if (mouse_device_found) {
-
                 int_in = dev->getEndpoint(mouse_intf, INTERRUPT_ENDPOINT, IN);
-                if (!int_in)
+                if (!int_in){
+                    USB_INFO("b");
                     break;
+                }
 
                 USB_INFO("New Mouse device: VID:%04x PID:%04x [dev: %p - intf: %d]", dev->getVid(), dev->getPid(), dev, mouse_intf);
                 dev->setName("Mouse", mouse_intf);
@@ -86,6 +86,7 @@
 }
 
 void USBHostMouse::rxHandler() {
+    // このハンドラーでマウスイベントを取得している。
     int len_listen = int_in->getSize();
 
     if (onUpdate) {