for PS3 Controller Special thanks to robo8080 http://blog.goo.ne.jp/roboz80/e/10e7bf38d3a63b996ca2894e9fb5e3b6

Dependencies:   FatFileSystem mbed

Fork of PS3_BlueUSB by Bart Janssens

Revision:
1:469717149e71
Parent:
0:99a111b75cb4
--- a/hci.cpp	Tue Apr 26 16:09:17 2011 +0000
+++ b/hci.cpp	Wed Sep 23 09:02:41 2015 +0000
@@ -106,9 +106,11 @@
 int HCI::WriteScanEnable()
 {
    
-    u8 buf[2];
+//    u8 buf[2];
+//    buf[0] = 0x03;
+//    buf[1] = 0x01;    
+    u8 buf[1];
     buf[0] = 0x03;
-    buf[1] = 0x01;    
     
     SendCmd(HCI_OP_WRITE_SCAN_ENABLE,buf,sizeof(buf));
     return 0;
@@ -116,10 +118,15 @@
 
 int HCI::AcceptConnection(const BD_ADDR* addr)
 {
-    u8 buf[6+4];
+//    u8 buf[6+4];
+//    memset(buf,0,sizeof(buf));
+//    memcpy(buf,addr,6);
+//    buf[7] = 0;      
+    
+    u8 buf[6+1];
     memset(buf,0,sizeof(buf));
     memcpy(buf,addr,6);
-    buf[7] = 0;      
+    buf[6] = 0;
     
     SendCmd(HCI_OP_ACCEPT_CONN_REQ,buf,sizeof(buf));
     return 0;