スマートコンセント(富士通 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: USBHost.cpp
- Revision:
- 6:08a406cd2726
- Parent:
- 5:96a70a8cebb9
--- a/USBHost.cpp Sun Sep 30 07:41:28 2012 +0000 +++ b/USBHost.cpp Sun Sep 30 12:45:05 2012 +0000 @@ -28,7 +28,7 @@ #define MAX_ENDPOINTS_TOTAL 16 // Max number of endpoints total #define MAX_ENDPOINTS_PER_DEVICE 8 // Max number of endpoints for any one device -#define USBLOG 1 +#define USBLOG 0 #if USBLOG #define LOG(...) printf(__VA_ARGS__) #else @@ -37,7 +37,7 @@ // USB host structures -#define USB_RAM_SIZE 4096 // AHB SRAM block 1 TODO MACHINE DEPENDENT +#define USB_RAM_SIZE 16*1024 // AHB SRAM block 1 TODO MACHINE DEPENDENT //#define USB_RAM_SIZE 16*1024 // AHB SRAM block 1 TODO MACHINE DEPENDENT //#define USB_RAM_BASE 0x20080000 //#define USB_RAM_BASE 0x2007C000 @@ -895,7 +895,7 @@ // Host controller instance and Interrupt handler //static HostController _controller __attribute__((at(USB_RAM_BASE))); -static __align(4096) HostController _controller __attribute__((section("AHBSRAM1"))); +static __align(256) HostController _controller __attribute__((section("AHBSRAM1"))); extern "C" void USB_IRQHandler(void) __irq; void USB_IRQHandler (void) __irq