スマートコンセント PS-5204PSをmbedで

Dependencies:   FatFileSystemCpp mbed TextLCD

Fork of BlueUSB by Peter Barrett

Fusjitsu スマートコンセント FX-5204PSを利用できます。

BlueUSBを利用していますが、Bluetoothは兼用できません。

複数台利用するには、USBハブを使用してください。ただし相性があります。
・良ければ10台まで利用できるかも。
・稼働中に追加はできますが、外すことはできません。



LED1-3, スマートコンセント接続状態(3台まで表示)
LED4、点滅で正常動作

Revision:
1:3f2890d103fb
Parent:
0:606b230e5b4a
Child:
2:32a2d06f4fe2
--- a/AutoEvents.cpp	Sat Apr 10 00:30:24 2010 +0000
+++ b/AutoEvents.cpp	Wed Sep 26 06:29:47 2012 +0000
@@ -133,6 +133,12 @@
 //  Implemented in TestShell.cpp
 int OnBluetoothInsert(int device);
 
+//  Added by Y.Tauchi  ------------------------------------
+//  Implemented in usps.cpp 
+int OnUspsInsert(int device);
+//  -----------------------------------------------------------
+
+
 void OnLoadDevice(int device, DeviceDescriptor* deviceDesc, InterfaceDescriptor* interfaceDesc)
 {
     printf("LoadDevice %d %02X:%02X:%02X\n",device,interfaceDesc->bInterfaceClass,interfaceDesc->bInterfaceSubClass,interfaceDesc->bInterfaceProtocol);
@@ -154,6 +160,12 @@
             if (interfaceDesc->bInterfaceSubClass == 0x01 && interfaceDesc->bInterfaceProtocol == 0x01)
                 OnBluetoothInsert(device);    // it's bluetooth!
             break;
+        //  Added by Y.Tauchi  ------------------------------------
+        case CLASS_VENDOR_SPECIFIC:
+            if (interfaceDesc->bInterfaceSubClass == 0x01 && interfaceDesc->bInterfaceProtocol == 0x02)
+                OnUspsInsert(device);    // it's USPS! (FUJITSU FX-5204PS)
+            break;
+//  ----------------------------------------------------------
         default:
             StartAutoEvent(device,1,0);
             break;