From 13939703e91781b77f606a8ebc0cf52da7f479d6 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Sun, 14 Mar 2010 11:09:10 +0000 Subject: [PATCH] added master/slave role commands and events --- include/btstack/hci_cmds.h | 2 ++ src/hci_cmds.c | 23 +++++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/include/btstack/hci_cmds.h b/include/btstack/hci_cmds.h index 4030dd2bb..41f1b1c22 100644 --- a/include/btstack/hci_cmds.h +++ b/include/btstack/hci_cmds.h @@ -210,7 +210,9 @@ extern hci_cmd_t hci_read_link_supervision_timeout; extern hci_cmd_t hci_remote_name_request; extern hci_cmd_t hci_remote_name_request_cancel; extern hci_cmd_t hci_reset; +extern hci_cmd_t hci_role_discovery; extern hci_cmd_t hci_set_event_mask; +extern hci_cmd_t hci_switch_role_command; extern hci_cmd_t hci_write_authentication_enable; extern hci_cmd_t hci_write_class_of_device; extern hci_cmd_t hci_write_extended_inquiry_response; diff --git a/src/hci_cmds.c b/src/hci_cmds.c index f800452de..778e34610 100644 --- a/src/hci_cmds.c +++ b/src/hci_cmds.c @@ -151,7 +151,6 @@ hci_cmd_t hci_create_connection = { OPCODE(OGF_LINK_CONTROL, 0x05), "B21121" // BD_ADDR, Packet_Type, Page_Scan_Repetition_Mode, Reserved, Clock_Offset, Allow_Role_Switch }; - hci_cmd_t hci_disconnect = { OPCODE(OGF_LINK_CONTROL, 0x06), "H1" // Handle, Reason: 0x05, 0x13-0x15, 0x1a, 0x29 @@ -194,17 +193,25 @@ OPCODE(OGF_LINK_CONTROL, 0x1A), "B" * Link Policy Commands */ hci_cmd_t hci_qos_setup = { - OPCODE(OGF_LINK_POLICY, 0x07), "H114444" - // handle, flags, service_type, token rate (bytes/s), peak bandwith (bytes/s), - // latency (us), delay_variation (us) +OPCODE(OGF_LINK_POLICY, 0x07), "H114444" +// handle, flags, service_type, token rate (bytes/s), peak bandwith (bytes/s), +// latency (us), delay_variation (us) +}; +hci_cmd_t hci_role_discovery = { +OPCODE(OGF_LINK_POLICY, 0x09), "H" +// handle +}; +hci_cmd_t hci_switch_role_command= { +OPCODE(OGF_LINK_POLICY, 0x0b), "B1" +// handle, role: {0=master,1=slave} }; hci_cmd_t hci_read_link_policy_settings = { - OPCODE(OGF_LINK_POLICY, 0x0c), "H" - // handle +OPCODE(OGF_LINK_POLICY, 0x0c), "H" +// handle }; hci_cmd_t hci_write_link_policy_settings = { - OPCODE(OGF_LINK_POLICY, 0x0d), "H2" - // handlee, settings +OPCODE(OGF_LINK_POLICY, 0x0d), "H2" +// handlee, settings }; /**