スマートコンセント(富士通 FX-5204PS)をIEEE1888 StorageにWRITEするサンプルプログラムです。
Dependencies: EthernetInterface FiapV2 HTTPClientForSOAP NTPClient TextLCD mbed-rtos mbed spxml
Fork of BlueUSB_f by
スマートコンセント(富士通 FX-5204PS)をIEEE1888 StorageにWRITEするサンプルプログラムです。
USB HUBを使用して2台利用した例です。
表示のみは http://mbed.org/users/yueee_yt/code/BlueUSB_f/で公開しています。
BlueUSBより派生していますが、BluetoothとMass Storage Classは利用できません。
2台まで確認していますが、プログラム的には10台まで接続できるようにしています。
(RTOSとの整合により難しいかもしれません)
Diff: AutoEvents.cpp
- Revision:
- 2:32a2d06f4fe2
- Parent:
- 1:3f2890d103fb
- Child:
- 5:96a70a8cebb9
--- a/AutoEvents.cpp Wed Sep 26 06:29:47 2012 +0000 +++ b/AutoEvents.cpp Thu Sep 27 13:04:36 2012 +0000 @@ -141,9 +141,10 @@ void OnLoadDevice(int device, DeviceDescriptor* deviceDesc, InterfaceDescriptor* interfaceDesc) { + int kk=0; printf("LoadDevice %d %02X:%02X:%02X\n",device,interfaceDesc->bInterfaceClass,interfaceDesc->bInterfaceSubClass,interfaceDesc->bInterfaceProtocol); char s[128]; - for (int i = 1; i < 3; i++) + for (int i = 1; i < 3; i++) { if (GetString(device,i,s,sizeof(s)) < 0) break; @@ -163,7 +164,8 @@ // Added by Y.Tauchi ------------------------------------ case CLASS_VENDOR_SPECIFIC: if (interfaceDesc->bInterfaceSubClass == 0x01 && interfaceDesc->bInterfaceProtocol == 0x02) - OnUspsInsert(device); // it's USPS! (FUJITSU FX-5204PS) + kk = OnUspsInsert(device); // it's USPS! (FUJITSU FX-5204PS) + if(kk!=0)printf("OnUspsInsert Error %d \n\r",kk); break; // ---------------------------------------------------------- default: