スマートコンセント(富士通 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との整合により難しいかもしれません)
Utils.h
- Committer:
- yueee_yt
- Date:
- 2012-09-30
- Revision:
- 6:08a406cd2726
- Parent:
- 0:606b230e5b4a
File content as of revision 6:08a406cd2726:
typedef unsigned char u8; typedef unsigned short u16; typedef unsigned long u32; void DelayMS(int ms); void printfBytes(const char* label,const u8* data, int len); void printHex(const u8* d, int len); #ifndef min #define min(_a,_b) ((_a) < (_b) ? (_a) : (_b)) #endif inline int LE16(const u8* d) { return d[0] | (d[1] << 8); } inline u32 BE32(const u8* d) { return (d[0] << 24) | (d[1] << 16) | (d[2] << 8) | d[3]; } inline void BE32(u32 n, u8* d) { d[0] = (u8)(n >> 24); d[1] = (u8)(n >> 16); d[2] = (u8)(n >> 8); d[3] = (u8)n; } inline void BE16(u32 n, u8* d) { d[0] = (u8)(n >> 8); d[1] = (u8)n; }