XOOMの動作状況を聞き処理を変えてみました。 USBケーブルを抜いた際に処理を終了するようにしました。

Dependencies:   mbed

Revision:
0:9fb6c423e32c
Child:
2:a05c7cbe396f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ADK.h	Wed May 25 09:34:38 2011 +0000
@@ -0,0 +1,44 @@
+
+#ifndef ADK_H_INCLUDED
+#define ADK_H_INCLUDED
+
+#include "mbed.h"
+
+
+#define ACCESSORY_STRING_MANUFACTURER   0
+#define ACCESSORY_STRING_MODEL          1
+#define ACCESSORY_STRING_DESCRIPTION    2
+#define ACCESSORY_STRING_VERSION        3
+#define ACCESSORY_STRING_URI            4
+#define ACCESSORY_STRING_SERIAL         5
+
+#define ACCESSORY_GET_PROTOCOL          51
+#define ACCESSORY_SEND_STRING           52
+#define ACCESSORY_START                 53
+
+
+//void sendString(int device, int index, const char *str);
+//int getProtocol(int device);
+bool switchDevice(int device);
+
+class AdkUSB
+{
+    public:
+    AdkUSB(int device, int configuration, int interfaceNumber);
+    int read(u8 *buff, int len, int nakLimit);
+    int write(u8 *buff, int len );
+    void loop();
+    
+    private:
+    int input_ep;
+    int output_ep;
+    int _device;
+    int _configuration;
+    int _interfaceNumber;
+
+  
+};
+
+
+
+#endif
\ No newline at end of file