BTstack Bluetooth stack

Dependencies:   mbed USBHost

USBホストライブラリを変更しました。

  • Bluetoothマウス(VGP-BMS33)での動作を確認しました。mouse_demo.cpp
Revision:
2:871b41f4789e
Parent:
0:1ed23ab1345f
--- a/BTstack/hci.c	Thu Mar 21 13:53:05 2013 +0000
+++ b/BTstack/hci.c	Fri Mar 22 22:35:57 2013 +0000
@@ -677,9 +677,9 @@
     }
     
     hci_stack.packet_handler(HCI_EVENT_PACKET, packet, size);
-	
-	// execute main loop
-	hci_run();
+    
+    // execute main loop
+    hci_run();
 }
 
 void packet_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
@@ -983,11 +983,11 @@
     }
 
     // create internal event
-	hci_emit_state();
+    hci_emit_state();
     
-	// trigger next/first action
-	hci_run();
-	
+    // trigger next/first action
+    hci_run();
+    
     return 0;
 }
 
@@ -1061,7 +1061,7 @@
         if (connection->authentication_flags & HANDLE_LINK_KEY_REQUEST){
             link_key_t link_key;
             log_info("responding to link key request\n");
-            if ( hci_stack.remote_device_db->get_link_key( &connection->address, &link_key)){
+            if (hci_stack.remote_device_db->get_link_key( &connection->address, &link_key)){
                hci_send_cmd(&hci_link_key_request_reply, connection->address, &link_key);
             } else {
                hci_send_cmd(&hci_link_key_request_negative_reply, connection->address);
@@ -1109,18 +1109,18 @@
                         log_info("hci_run: init script done\n\r");
                     }
                     // otherwise continue
-					hci_send_cmd(&hci_read_bd_addr);
-					break;
-				case 4:
-					hci_send_cmd(&hci_read_buffer_size);
-					break;
+                    hci_send_cmd(&hci_read_bd_addr);
+                    break;
+                case 4:
+                    hci_send_cmd(&hci_read_buffer_size);
+                    break;
                 case 5:
                     // ca. 15 sec
                     hci_send_cmd(&hci_write_page_timeout, 0x6000);
                     break;
-				case 6:
-					hci_send_cmd(&hci_write_scan_enable, (hci_stack.connectable << 1) | hci_stack.discoverable); // page scan
-					break;
+                case 6:
+                    hci_send_cmd(&hci_write_scan_enable, (hci_stack.connectable << 1) | hci_stack.discoverable); // page scan
+                    break;
                 case 7:
 #ifndef EMBEDDED
                 {