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

Files at this revision

API Documentation at this revision

Comitter:
ds074704261
Date:
Wed Sep 23 09:02:41 2015 +0000
Parent:
0:99a111b75cb4
Commit message:
hotfix

Changed in this revision

AutoEvents.cpp Show annotated file Show diff for this revision Revisions of this file
FATFileSystem.lib Show annotated file Show diff for this revision Revisions of this file
hci.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 99a111b75cb4 -r 469717149e71 AutoEvents.cpp
--- a/AutoEvents.cpp	Tue Apr 26 16:09:17 2011 +0000
+++ b/AutoEvents.cpp	Wed Sep 23 09:02:41 2015 +0000
@@ -260,14 +260,14 @@
     char s[128];
     u8 my_mac[6] = {0x00, 0x02, 0x72, 0xAD, 0xF3, 0x5B}; // mac address of my Bluetooth device
     
-    u8 buf2[6];
-    
-    buf2[0] = 0x00;
-    buf2[1] = 0x02;
-    buf2[2] = 0x72;
-    buf2[3] = 0xAD;
-    buf2[4] = 0xF3;
-    buf2[5] = 0x5B;
+//    u8 buf2[6];
+//    
+//    buf2[0] = 0x00;
+//    buf2[1] = 0x02;
+//    buf2[2] = 0x72;
+//    buf2[3] = 0xAD;
+//    buf2[4] = 0xF3;
+//    buf2[5] = 0x5B;
     
     
     for (int i = 1; i < 3; i++)
diff -r 99a111b75cb4 -r 469717149e71 FATFileSystem.lib
--- a/FATFileSystem.lib	Tue Apr 26 16:09:17 2011 +0000
+++ b/FATFileSystem.lib	Wed Sep 23 09:02:41 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_unsupported/code/fatfilesystem/
\ No newline at end of file
+http://mbed.org/users/mbed_unsupported/code/fatfilesystem/#333d6e93e58f
diff -r 99a111b75cb4 -r 469717149e71 hci.cpp
--- 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;