BlackOneとAndroidの連携デモプログラム AndroidAccessoryを改造してBlackOneとAndroidが連携できるようにしました。 サポートしているのは、デモアプリの ”Buttons” B1-SW1, B2-SW2, B3-SW3 ”LED2” RGB-LED のみです。 LCDに表示するイメージをマイクロSDカードに入れてLCDのソケットに挿入しておく必要があります。 イメージは、320X240ドットで”\Image”という名前のフォルダの直下に”10.jpg”という名前で入れてください。

Dependencies:   TextLCD mbed

Committer:
techand
Date:
Fri Dec 23 04:33:33 2011 +0000
Revision:
0:7b556109fd46

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
techand 0:7b556109fd46 1 /*
techand 0:7b556109fd46 2 Copyright (c) 2010 Peter Barrett
techand 0:7b556109fd46 3
techand 0:7b556109fd46 4 Permission is hereby granted, free of charge, to any person obtaining a copy
techand 0:7b556109fd46 5 of this software and associated documentation files (the "Software"), to deal
techand 0:7b556109fd46 6 in the Software without restriction, including without limitation the rights
techand 0:7b556109fd46 7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
techand 0:7b556109fd46 8 copies of the Software, and to permit persons to whom the Software is
techand 0:7b556109fd46 9 furnished to do so, subject to the following conditions:
techand 0:7b556109fd46 10
techand 0:7b556109fd46 11 The above copyright notice and this permission notice shall be included in
techand 0:7b556109fd46 12 all copies or substantial portions of the Software.
techand 0:7b556109fd46 13
techand 0:7b556109fd46 14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
techand 0:7b556109fd46 15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
techand 0:7b556109fd46 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
techand 0:7b556109fd46 17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
techand 0:7b556109fd46 18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
techand 0:7b556109fd46 19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
techand 0:7b556109fd46 20 THE SOFTWARE.
techand 0:7b556109fd46 21 */
techand 0:7b556109fd46 22
techand 0:7b556109fd46 23 /*
techand 0:7b556109fd46 24 Tue Apr 26 2011 Bart Janssens: added PS3 USB support
techand 0:7b556109fd46 25 */
techand 0:7b556109fd46 26
techand 0:7b556109fd46 27 #include <stdio.h>
techand 0:7b556109fd46 28 #include <stdlib.h>
techand 0:7b556109fd46 29 #include <stdio.h>
techand 0:7b556109fd46 30 #include <string.h>
techand 0:7b556109fd46 31
techand 0:7b556109fd46 32 #include "USBHost.h"
techand 0:7b556109fd46 33 #include "Utils.h"
techand 0:7b556109fd46 34 #include "ps3.h"
techand 0:7b556109fd46 35 #include "ADK.h"
techand 0:7b556109fd46 36
techand 0:7b556109fd46 37 #define AUTOEVT(_class,_subclass,_protocol) (((_class) << 16) | ((_subclass) << 8) | _protocol)
techand 0:7b556109fd46 38 #define AUTO_KEYBOARD AUTOEVT(CLASS_HID,1,1)
techand 0:7b556109fd46 39 #define AUTO_MOUSE AUTOEVT(CLASS_HID,1,2)
techand 0:7b556109fd46 40 //#define AUTO_PS3 AUTOEVT(CLASS_HID,0,0)
techand 0:7b556109fd46 41
techand 0:7b556109fd46 42 u8 auto_mouse[4]; // buttons,dx,dy,scroll
techand 0:7b556109fd46 43 u8 auto_keyboard[8]; // modifiers,reserved,keycode1..keycode6
techand 0:7b556109fd46 44 u8 auto_joystick[4]; // x,y,buttons,throttle
techand 0:7b556109fd46 45 //u8 auto_ps3[48];
techand 0:7b556109fd46 46
techand 0:7b556109fd46 47
techand 0:7b556109fd46 48
techand 0:7b556109fd46 49
techand 0:7b556109fd46 50 void AutoEventCallback(int device, int endpoint, int status, u8* data, int len, void* userData) {
techand 0:7b556109fd46 51 int evt = (int)userData;
techand 0:7b556109fd46 52 switch (evt) {
techand 0:7b556109fd46 53 case AUTO_KEYBOARD:
techand 0:7b556109fd46 54 printf("AUTO_KEYBOARD ");
techand 0:7b556109fd46 55 break;
techand 0:7b556109fd46 56 case AUTO_MOUSE:
techand 0:7b556109fd46 57 printf("AUTO_MOUSE ");
techand 0:7b556109fd46 58 break;
techand 0:7b556109fd46 59 // case AUTO_PS3:
techand 0:7b556109fd46 60 // printf("AUTO_PS3 ");
techand 0:7b556109fd46 61 // ParsePs3Report(data,len);
techand 0:7b556109fd46 62 // break;
techand 0:7b556109fd46 63 default:
techand 0:7b556109fd46 64 printf("HUH ");
techand 0:7b556109fd46 65 }
techand 0:7b556109fd46 66 //printfBytes("data",data,len);
techand 0:7b556109fd46 67 USBInterruptTransfer(device,endpoint,data,len,AutoEventCallback,userData);
techand 0:7b556109fd46 68 }
techand 0:7b556109fd46 69
techand 0:7b556109fd46 70 // Establish transfers for interrupt events
techand 0:7b556109fd46 71 void AddAutoEvent(int device, InterfaceDescriptor* id, EndpointDescriptor* ed) {
techand 0:7b556109fd46 72 printf("message from endpoint %02X\r\n",ed->bEndpointAddress);
techand 0:7b556109fd46 73 printf("Class Sub Proto: %02X %02X %02X\r\n",id->bInterfaceClass,id->bInterfaceSubClass,id->bInterfaceProtocol);
techand 0:7b556109fd46 74 //if ((ed->bmAttributes & 3) != ENDPOINT_INTERRUPT || !(ed->bEndpointAddress & 0x80))
techand 0:7b556109fd46 75 // return;
techand 0:7b556109fd46 76
techand 0:7b556109fd46 77 // Make automatic interrupt enpoints for known devices
techand 0:7b556109fd46 78 u32 evt = AUTOEVT(id->bInterfaceClass,id->bInterfaceSubClass,id->bInterfaceProtocol);
techand 0:7b556109fd46 79 printf("Evt: %08X \r\n",evt);
techand 0:7b556109fd46 80 u8* dst = 0;
techand 0:7b556109fd46 81 int len;
techand 0:7b556109fd46 82 switch (evt) {
techand 0:7b556109fd46 83 case AUTO_MOUSE:
techand 0:7b556109fd46 84 dst = auto_mouse;
techand 0:7b556109fd46 85 len = sizeof(auto_mouse);
techand 0:7b556109fd46 86 break;
techand 0:7b556109fd46 87 case AUTO_KEYBOARD:
techand 0:7b556109fd46 88 dst = auto_keyboard;
techand 0:7b556109fd46 89 len = sizeof(auto_keyboard);
techand 0:7b556109fd46 90 break;
techand 0:7b556109fd46 91 // case AUTO_PS3:
techand 0:7b556109fd46 92 // printf("PS3 event ? \r\n");
techand 0:7b556109fd46 93 // dst = auto_ps3;
techand 0:7b556109fd46 94 // len = sizeof(auto_ps3);
techand 0:7b556109fd46 95 default:
techand 0:7b556109fd46 96 printf("Interrupt endpoint %02X %08X\r\n",ed->bEndpointAddress,evt);
techand 0:7b556109fd46 97 break;
techand 0:7b556109fd46 98 }
techand 0:7b556109fd46 99 if (dst) {
techand 0:7b556109fd46 100 printf("Auto Event for %02X %08X\r\n",ed->bEndpointAddress,evt);
techand 0:7b556109fd46 101 USBInterruptTransfer(device,ed->bEndpointAddress,dst,len,AutoEventCallback,(void*)evt);
techand 0:7b556109fd46 102 }
techand 0:7b556109fd46 103 }
techand 0:7b556109fd46 104
techand 0:7b556109fd46 105 void PrintString(int device, int i) {
techand 0:7b556109fd46 106 u8 buffer[256];
techand 0:7b556109fd46 107 int le = GetDescriptor(device,DESCRIPTOR_TYPE_STRING,i,buffer,255);
techand 0:7b556109fd46 108 if (le < 0)
techand 0:7b556109fd46 109 return;
techand 0:7b556109fd46 110 char* dst = (char*)buffer;
techand 0:7b556109fd46 111 for (int j = 2; j < le; j += 2)
techand 0:7b556109fd46 112 *dst++ = buffer[j];
techand 0:7b556109fd46 113 *dst = 0;
techand 0:7b556109fd46 114 printf("%d:%s\r\n",i,(const char*)buffer);
techand 0:7b556109fd46 115 }
techand 0:7b556109fd46 116
techand 0:7b556109fd46 117 // Walk descriptors and create endpoints for a given device
techand 0:7b556109fd46 118 int StartAutoEvent(int device, int configuration, int interfaceNumber) {
techand 0:7b556109fd46 119
techand 0:7b556109fd46 120 printf("StartAutoEvent \r\n");
techand 0:7b556109fd46 121
techand 0:7b556109fd46 122 u8 buffer[255];
techand 0:7b556109fd46 123 int err = GetDescriptor(device,DESCRIPTOR_TYPE_CONFIGURATION,0,buffer,255);
techand 0:7b556109fd46 124 if (err < 0)
techand 0:7b556109fd46 125 return err;
techand 0:7b556109fd46 126
techand 0:7b556109fd46 127 int len = buffer[2] | (buffer[3] << 8);
techand 0:7b556109fd46 128 u8* d = buffer;
techand 0:7b556109fd46 129 u8* end = d + len;
techand 0:7b556109fd46 130 while (d < end) {
techand 0:7b556109fd46 131 if (d[1] == DESCRIPTOR_TYPE_INTERFACE) {
techand 0:7b556109fd46 132 InterfaceDescriptor* id = (InterfaceDescriptor*)d;
techand 0:7b556109fd46 133 if (id->bInterfaceNumber == interfaceNumber) {
techand 0:7b556109fd46 134 d += d[0];
techand 0:7b556109fd46 135 while (d < end && d[1] != DESCRIPTOR_TYPE_INTERFACE) {
techand 0:7b556109fd46 136 if (d[1] == DESCRIPTOR_TYPE_ENDPOINT)
techand 0:7b556109fd46 137 AddAutoEvent(device,id,(EndpointDescriptor*)d);
techand 0:7b556109fd46 138 d += d[0];
techand 0:7b556109fd46 139 }
techand 0:7b556109fd46 140 }
techand 0:7b556109fd46 141 }
techand 0:7b556109fd46 142 d += d[0];
techand 0:7b556109fd46 143 }
techand 0:7b556109fd46 144 return 0;
techand 0:7b556109fd46 145 }
techand 0:7b556109fd46 146
techand 0:7b556109fd46 147 /*
techand 0:7b556109fd46 148 int StartPS3Event(int device, int configuration, int interfaceNumber)
techand 0:7b556109fd46 149 {
techand 0:7b556109fd46 150
techand 0:7b556109fd46 151 printf("StartPS3Event \r\n");
techand 0:7b556109fd46 152
techand 0:7b556109fd46 153 EndpointDescriptor* ep;
techand 0:7b556109fd46 154
techand 0:7b556109fd46 155 u8 buf[4];
techand 0:7b556109fd46 156 buf[0] = 0x42;
techand 0:7b556109fd46 157 buf[1] = 0x0c;
techand 0:7b556109fd46 158 buf[2] = 0x00;
techand 0:7b556109fd46 159 buf[3] = 0x00;
techand 0:7b556109fd46 160
techand 0:7b556109fd46 161 u8 buf2[8];
techand 0:7b556109fd46 162 u8 buf3[8];
techand 0:7b556109fd46 163
techand 0:7b556109fd46 164 buf2[0] = 0x01;
techand 0:7b556109fd46 165 buf2[1] = 0x00;
techand 0:7b556109fd46 166 buf2[2] = 0x00;
techand 0:7b556109fd46 167 buf2[3] = 0x02;
techand 0:7b556109fd46 168 buf2[4] = 0x72;
techand 0:7b556109fd46 169 buf2[5] = 0xAD;
techand 0:7b556109fd46 170 buf2[6] = 0xF3;
techand 0:7b556109fd46 171 buf2[7] = 0x5B;
techand 0:7b556109fd46 172
techand 0:7b556109fd46 173
techand 0:7b556109fd46 174
techand 0:7b556109fd46 175
techand 0:7b556109fd46 176 int result;
techand 0:7b556109fd46 177 int err;
techand 0:7b556109fd46 178
techand 0:7b556109fd46 179 u8 buffer[255];
techand 0:7b556109fd46 180 err = GetDescriptor(device,DESCRIPTOR_TYPE_CONFIGURATION,0,buffer,255);
techand 0:7b556109fd46 181 if (err < 0)
techand 0:7b556109fd46 182 return err;
techand 0:7b556109fd46 183
techand 0:7b556109fd46 184
techand 0:7b556109fd46 185
techand 0:7b556109fd46 186 //configure the device
techand 0:7b556109fd46 187 //err = USBControlTransfer(device, HOST_TO_DEVICE|REQUEST_TYPE_STANDARD|RECIPIENT_DEVICE, SET_CONFIGURATION, 1, 0, 0, 0, 0, 0 );
techand 0:7b556109fd46 188 err = SetConfiguration(device,1);
techand 0:7b556109fd46 189 printf("set config result = %d\r\n", err);
techand 0:7b556109fd46 190
techand 0:7b556109fd46 191 // get Mac address
techand 0:7b556109fd46 192 //err = USBControlTransfer(device, HOST_TO_DEVICE|REQUEST_TYPE_CLASS|RECIPIENT_DEVICE, HID_REQUEST_GET_REPORT, 0x03f5, 0, buf3, sizeof(buf3), 0, 0 );
techand 0:7b556109fd46 193 //printf("get Mac to %02X:%02X:%02X:%02X:%02X:%02X , result = %d\r\n", buf3[2], buf3[3], buf3[4], buf3[5], buf3[6], buf3[7], err);
techand 0:7b556109fd46 194
techand 0:7b556109fd46 195 // set Mac address
techand 0:7b556109fd46 196 err = USBControlTransfer(device, HOST_TO_DEVICE|REQUEST_TYPE_CLASS|RECIPIENT_INTERFACE, HID_REQUEST_SET_REPORT, 0x03f5, 0, buf2, sizeof(buf2), 0, 0 );
techand 0:7b556109fd46 197 printf("set Mac to %02X:%02X:%02X:%02X:%02X:%02X , result = %d\r\n", buf2[2], buf2[3], buf2[4], buf2[5], buf2[6], buf2[7], err);
techand 0:7b556109fd46 198
techand 0:7b556109fd46 199 // get Mac address
techand 0:7b556109fd46 200 //err = USBControlTransfer(device, HOST_TO_DEVICE|REQUEST_TYPE_CLASS|RECIPIENT_DEVICE, HID_REQUEST_GET_REPORT, 0x03f5, 0, buf3, sizeof(buf3), 0, 0 );
techand 0:7b556109fd46 201 //printf("get Mac to %02X:%02X:%02X:%02X:%02X:%02X , result = %d\r\n", buf3[2], buf3[3], buf3[4], buf3[5], buf3[6], buf3[7], err);
techand 0:7b556109fd46 202
techand 0:7b556109fd46 203 err = USBControlTransfer(device, HOST_TO_DEVICE|REQUEST_TYPE_CLASS|RECIPIENT_INTERFACE, HID_REQUEST_SET_REPORT, 0x03f4,0, buf, sizeof(buf), 0, 0 );
techand 0:7b556109fd46 204 printf("set report result = %d\r\n", err);
techand 0:7b556109fd46 205 //USBTransfer(device,0,DEVICE_TO_HOST,buf,sizeof(buf),0,0);
techand 0:7b556109fd46 206
techand 0:7b556109fd46 207 int len = buffer[2] | (buffer[3] << 8);
techand 0:7b556109fd46 208 u8* d = buffer;
techand 0:7b556109fd46 209 u8* end = d + len;
techand 0:7b556109fd46 210 while (d < end)
techand 0:7b556109fd46 211 {
techand 0:7b556109fd46 212 if (d[1] == DESCRIPTOR_TYPE_INTERFACE)
techand 0:7b556109fd46 213 {
techand 0:7b556109fd46 214 InterfaceDescriptor* id = (InterfaceDescriptor*)d;
techand 0:7b556109fd46 215 if (id->bInterfaceNumber == interfaceNumber)
techand 0:7b556109fd46 216 {
techand 0:7b556109fd46 217 d += d[0];
techand 0:7b556109fd46 218 while (d < end && d[1] != DESCRIPTOR_TYPE_INTERFACE)
techand 0:7b556109fd46 219 {
techand 0:7b556109fd46 220 if (d[1] == DESCRIPTOR_TYPE_ENDPOINT)
techand 0:7b556109fd46 221 ep = (EndpointDescriptor*)d;
techand 0:7b556109fd46 222
techand 0:7b556109fd46 223 if (ep->bEndpointAddress == 0x02) {
techand 0:7b556109fd46 224 printf("PS3 input endpoint (0x02) found\r\n");
techand 0:7b556109fd46 225
techand 0:7b556109fd46 226 }
techand 0:7b556109fd46 227 if (ep->bEndpointAddress == 0x81) {
techand 0:7b556109fd46 228 printf("PS3 output endpoint (0x81) found\r\n");
techand 0:7b556109fd46 229 AddAutoEvent(device,id,(EndpointDescriptor*)d);
techand 0:7b556109fd46 230 }
techand 0:7b556109fd46 231 d += d[0];
techand 0:7b556109fd46 232 }
techand 0:7b556109fd46 233 }
techand 0:7b556109fd46 234 }
techand 0:7b556109fd46 235 d += d[0];
techand 0:7b556109fd46 236 }
techand 0:7b556109fd46 237 return 0;
techand 0:7b556109fd46 238 }
techand 0:7b556109fd46 239 */
techand 0:7b556109fd46 240
techand 0:7b556109fd46 241 // Implemented in main.cpp
techand 0:7b556109fd46 242 int OnDiskInsert(int device);
techand 0:7b556109fd46 243
techand 0:7b556109fd46 244 // Implemented in TestShell.cpp
techand 0:7b556109fd46 245 int OnBluetoothInsert(int device);
techand 0:7b556109fd46 246
techand 0:7b556109fd46 247 void OnLoadDevice(int device, DeviceDescriptor* deviceDesc, InterfaceDescriptor* interfaceDesc) {
techand 0:7b556109fd46 248 printf("LoadDevice %d %02X:%02X:%02X\r\n",device,interfaceDesc->bInterfaceClass,interfaceDesc->bInterfaceSubClass,interfaceDesc->bInterfaceProtocol);
techand 0:7b556109fd46 249 char s[128];
techand 0:7b556109fd46 250 u8 my_mac[6] = {0x00, 0x02, 0x72, 0xAD, 0xF3, 0x5B}; // mac address of my Bluetooth device
techand 0:7b556109fd46 251
techand 0:7b556109fd46 252 /*
techand 0:7b556109fd46 253 u8 buf2[6];
techand 0:7b556109fd46 254
techand 0:7b556109fd46 255 buf2[0] = 0x00;
techand 0:7b556109fd46 256 buf2[1] = 0x02;
techand 0:7b556109fd46 257 buf2[2] = 0x72;
techand 0:7b556109fd46 258 buf2[3] = 0xAD;
techand 0:7b556109fd46 259 buf2[4] = 0xF3;
techand 0:7b556109fd46 260 buf2[5] = 0x5B;
techand 0:7b556109fd46 261 */
techand 0:7b556109fd46 262
techand 0:7b556109fd46 263 for (int i = 1; i < 3; i++) {
techand 0:7b556109fd46 264 if (GetString(device,i,s,sizeof(s)) < 0)
techand 0:7b556109fd46 265 break;
techand 0:7b556109fd46 266 printf("%d: %s\r\n",i,s);
techand 0:7b556109fd46 267 }
techand 0:7b556109fd46 268
techand 0:7b556109fd46 269 //for android ADK
techand 0:7b556109fd46 270 if ( ( deviceDesc->idVendor != 0x18D1 ||
techand 0:7b556109fd46 271 ( deviceDesc->idProduct != 0x2D00 && deviceDesc->idProduct != 0x2D01))
techand 0:7b556109fd46 272 &&switchDevice(device)) {
techand 0:7b556109fd46 273
techand 0:7b556109fd46 274 printf(" try to change accmode.interfaceDesc->bInterfaceClass=%d\r\n",interfaceDesc->bInterfaceClass);
techand 0:7b556109fd46 275 //1th root
techand 0:7b556109fd46 276 //accmode_support=true;
techand 0:7b556109fd46 277 printf("accessory mode ok.\r\n");
techand 0:7b556109fd46 278 return;
techand 0:7b556109fd46 279 }
techand 0:7b556109fd46 280
techand 0:7b556109fd46 281 if (deviceDesc->idVendor == 0x18D1 &&
techand 0:7b556109fd46 282 (deviceDesc->idProduct == 0x2D00 || deviceDesc->idProduct == 0x2D01)) {
techand 0:7b556109fd46 283 //2th root
techand 0:7b556109fd46 284 printf("connecting Android.\r\n");
techand 0:7b556109fd46 285 printf("idVender=%x idProduct=%x interfaceDesc->bInterfaceClass=%d\r\n",deviceDesc->idVendor,deviceDesc->idProduct,interfaceDesc->bInterfaceClass);
techand 0:7b556109fd46 286 AdkUSB _AdkUSB(device,1,0);
techand 0:7b556109fd46 287 _AdkUSB.loop();
techand 0:7b556109fd46 288 return;
techand 0:7b556109fd46 289
techand 0:7b556109fd46 290 }
techand 0:7b556109fd46 291
techand 0:7b556109fd46 292
techand 0:7b556109fd46 293 switch (interfaceDesc->bInterfaceClass) {
techand 0:7b556109fd46 294 case CLASS_MASS_STORAGE:
techand 0:7b556109fd46 295 if (interfaceDesc->bInterfaceSubClass == 0x06 && interfaceDesc->bInterfaceProtocol == 0x50)
techand 0:7b556109fd46 296 OnDiskInsert(device); // it's SCSI!
techand 0:7b556109fd46 297 break;
techand 0:7b556109fd46 298
techand 0:7b556109fd46 299 case CLASS_WIRELESS_CONTROLLER:
techand 0:7b556109fd46 300 if (interfaceDesc->bInterfaceSubClass == 0x01 && interfaceDesc->bInterfaceProtocol == 0x01)
techand 0:7b556109fd46 301 OnBluetoothInsert(device); // it's bluetooth!
techand 0:7b556109fd46 302 break;
techand 0:7b556109fd46 303 case CLASS_HID:
techand 0:7b556109fd46 304
techand 0:7b556109fd46 305 printf("idVendor = %04X idProduct = %04X \r\n",deviceDesc->idVendor,deviceDesc->idProduct);
techand 0:7b556109fd46 306 //printf("device = %d configuration = %d interfaceNumber = %d\r\n", device, configuration, interfaceNumber);
techand 0:7b556109fd46 307 //if (deviceDesc->idVendor == 0x054C && deviceDesc->idProduct == 0x0268) StartPS3Event(device,1,0);
techand 0:7b556109fd46 308 if (deviceDesc->idVendor == 0x054C && deviceDesc->idProduct == 0x0268) {
techand 0:7b556109fd46 309 Ps3USB _Ps3USB(device,1,0);
techand 0:7b556109fd46 310
techand 0:7b556109fd46 311 _Ps3USB.SetPair(my_mac);
techand 0:7b556109fd46 312 _Ps3USB.Enable();
techand 0:7b556109fd46 313 _Ps3USB.Led(1);
techand 0:7b556109fd46 314 _Ps3USB.Rumble(0x20,0xff,0x20,0xff);
techand 0:7b556109fd46 315 _Ps3USB.ShowPair();
techand 0:7b556109fd46 316
techand 0:7b556109fd46 317 } else StartAutoEvent(device,1,0);
techand 0:7b556109fd46 318 break;
techand 0:7b556109fd46 319
techand 0:7b556109fd46 320 default:
techand 0:7b556109fd46 321
techand 0:7b556109fd46 322 printf("Not yet supported \r\n");
techand 0:7b556109fd46 323 //StartAutoEvent(device,1,0);
techand 0:7b556109fd46 324 break;
techand 0:7b556109fd46 325 }
techand 0:7b556109fd46 326 }