Library to allo USB PTP device to be hosted by the mbed platform

Dependents:   class_project_main

Revision:
8:5f6024e68aa7
Parent:
7:c3a16a61643f
Child:
9:961c3357504d
--- a/USBHostPTP.cpp	Thu Aug 29 23:59:17 2013 +0000
+++ b/USBHostPTP.cpp	Tue Sep 03 07:08:56 2013 +0000
@@ -31,7 +31,6 @@
 }
 
 void USBHostPTP::initializeClassData() {
-    deviceConnected         = false;
     pointerToDevice         = NULL;
     bulk_in                 = NULL;
     bulk_out                = NULL;
@@ -59,7 +58,7 @@
     if (deviceConnected) {
         return true;
     }
-
+    
     for (uint8_t i = 0; i < MAX_DEVICE_CONNECTED; i++) {
         if ((pointerToDevice = host->getDevice(i)) != NULL) {
             
@@ -82,7 +81,7 @@
                 pointerToDevice->setName("PTP", ptp_intf);
                 host->registerDriver(pointerToDevice, ptp_intf, this, &USBHostPTP::initializeClassData);
 
-                deviceConnected = true;
+                this->deviceConnected = true;
                 return true;
             }
         } //if()