OSDN Git Service

emulator: Add basic advertise enable support for bthost
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 19 Sep 2013 16:42:02 +0000 (19:42 +0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 19 Sep 2013 17:41:50 +0000 (20:41 +0300)
emulator/bthost.c
emulator/bthost.h

index 4b025ef..ae274b4 100644 (file)
@@ -433,6 +433,8 @@ static void evt_cmd_complete(struct bthost *bthost, const void *data,
                break;
        case BT_HCI_CMD_WRITE_SCAN_ENABLE:
                break;
+       case BT_HCI_CMD_LE_SET_ADV_ENABLE:
+               break;
        default:
                printf("Unhandled cmd_complete opcode 0x%04x\n", opcode);
                break;
@@ -919,6 +921,11 @@ void bthost_write_scan_enable(struct bthost *bthost, uint8_t scan)
        send_command(bthost, BT_HCI_CMD_WRITE_SCAN_ENABLE, &scan, 1);
 }
 
+void bthost_set_adv_enable(struct bthost *bthost, uint8_t enable)
+{
+       send_command(bthost, BT_HCI_CMD_LE_SET_ADV_ENABLE, &enable, 1);
+}
+
 void bthost_set_server_psm(struct bthost *bthost, uint16_t psm)
 {
        bthost->server_psm = psm;
index b621d70..dd497e8 100644 (file)
@@ -60,6 +60,8 @@ bool bthost_l2cap_req(struct bthost *bthost, uint16_t handle, uint8_t req,
 
 void bthost_write_scan_enable(struct bthost *bthost, uint8_t scan);
 
+void bthost_set_adv_enable(struct bthost *bthost, uint8_t enable);
+
 void bthost_set_server_psm(struct bthost *bthost, uint16_t psm);
 
 void bthost_start(struct bthost *bthost);