Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FatFileSystem PS3_BlueUSB QEI RoboClaw_mine_ mbed
Fork of PS3_BlueUSB by
Diff: hci.cpp
- Revision:
- 1:b2063ffa4927
- Parent:
- 0:99a111b75cb4
diff -r 99a111b75cb4 -r b2063ffa4927 hci.cpp
--- a/hci.cpp Tue Apr 26 16:09:17 2011 +0000
+++ b/hci.cpp Thu Jan 11 07:47:26 2018 +0000
@@ -105,10 +105,13 @@
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 +119,16 @@
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[0]=0;
SendCmd(HCI_OP_ACCEPT_CONN_REQ,buf,sizeof(buf));
return 0;
