video streaming using websocket. but,streaming is very slower than 0.1fps.
Dependencies: BaseUsbHost EthernetInterface WebSocketClient mbed-rtos mbed
Fork of BaseUsbHost_example by
Diff: example1_UsbMouseHost.cpp
- Revision:
- 2:c10029b87439
- Parent:
- 1:80205a2de336
- Child:
- 3:6ae9a03a6145
--- a/example1_UsbMouseHost.cpp Wed Dec 05 13:25:18 2012 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -#if 0 -#include "mbed.h" -#include "rtos.h" -#include "BaseUsbHost.h" -#define DEBUG -#include "BaseUsbHostDebug.h" -#define TEST -#include "BaseUsbHostTest.h" -#include "UsbMouseHost.h" - -Serial pc(USBTX, USBRX); -DigitalOut led1(LED1); - -BaseUsbHost *UsbHost; -UsbHub* hub; -ControlEp* ctlEp = NULL; -UsbMouseHost* mouse; -int main() { - pc.baud(921600); - printf("%s\n", __FILE__); - - UsbHost = new BaseUsbHost; - TEST_ASSERT_TRUE(UsbHost); - - UsbHub* hub = new UsbHub(); - TEST_ASSERT_TRUE(hub); - - for(int i = 0; i < MAX_HUB_PORT; i++) { - if (UsbMouseHost::check(hub->PortEp[i])) { - ctlEp = hub->PortEp[i]; - break; - } - } - if (ctlEp == NULL) { - error("USB Mouse not found\n"); - } - - mouse = new UsbMouseHost(ctlEp); - TEST_ASSERT(mouse); - - while(1) { - uint32_t status; - int r = mouse->read(&status); - if (r == USB_OK) { - printf("%08X\n", status); - if (status & 1) { // left - led1 = !led1; - } else if (status & 2) { // right - break; - } - } - } - exit(1); -} - -#endif