Fork BlueUSB lib for NHK robot contest 2014 TEU JAPAN

Dependencies:   C12832_lcd FatFileSystem TextLCD mbed

Fork of PS3_BlueUSB by Bart Janssens

Revision:
1:335bce3448c3
Parent:
0:99a111b75cb4
--- a/hci.cpp	Tue Apr 26 16:09:17 2011 +0000
+++ b/hci.cpp	Sun Jan 12 07:08:34 2014 +0000
@@ -106,9 +106,11 @@
 int HCI::WriteScanEnable()
 {
    
-    u8 buf[2];
-    buf[0] = 0x03;
-    buf[1] = 0x01;    
+//    u8 buf[2];
+//    buf[0] = 0x03;
+//    buf[1] = 0x01;    
+    u8 buf[1];
+    buf[0]=0x03;
     
     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;