summaryrefslogtreecommitdiffstats
path: root/include/hardware/bluetooth.h
diff options
context:
space:
mode:
authorGanesh Ganapathi Batta <ganeshg@broadcom.com>2013-02-05 15:23:45 -0800
committerMatthew Xie <mattx@google.com>2013-02-27 18:14:00 -0800
commitfefb3343906fe73c827d1b9d50cb3c451602c514 (patch)
treeef5822b437061769289b08ae98fd1903dde55e5f /include/hardware/bluetooth.h
parenta0ed4bead4d7a9b9031f7cefe0ef49a951443461 (diff)
downloadhardware_libhardware-fefb3343906fe73c827d1b9d50cb3c451602c514.zip
hardware_libhardware-fefb3343906fe73c827d1b9d50cb3c451602c514.tar.gz
hardware_libhardware-fefb3343906fe73c827d1b9d50cb3c451602c514.tar.bz2
Initial version of BLE support for Bluedroid
Change-Id: Iacf3a56943b31c4fd4f4b833ed675a35cbd47104
Diffstat (limited to 'include/hardware/bluetooth.h')
-rw-r--r--include/hardware/bluetooth.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/include/hardware/bluetooth.h b/include/hardware/bluetooth.h
index be7f0b1..8aaecad 100644
--- a/include/hardware/bluetooth.h
+++ b/include/hardware/bluetooth.h
@@ -43,6 +43,7 @@ __BEGIN_DECLS
#define BT_PROFILE_HIDHOST_ID "hidhost"
#define BT_PROFILE_PAN_ID "pan"
+#define BT_PROFILE_GATT_ID "gatt"
/** Bluetooth Address */
typedef struct {
@@ -51,7 +52,7 @@ typedef struct {
/** Bluetooth Device Name */
typedef struct {
- uint8_t name[248];
+ uint8_t name[249];
} __attribute__((packed))bt_bdname_t;
/** Bluetooth Adapter Visibility Modes*/
@@ -115,6 +116,15 @@ typedef struct
char name[256]; // what's the maximum length
} bt_service_record_t;
+
+/** Bluetooth Remote Version info */
+typedef struct
+{
+ int version;
+ int sub_ver;
+ int manufacturer;
+} bt_remote_version_t;
+
/* Bluetooth Adapter and Remote Device property types */
typedef enum {
/* Properties common to both adapter and remote device */
@@ -189,6 +199,13 @@ typedef enum {
* Data type - int32_t.
*/
BT_PROPERTY_REMOTE_RSSI,
+ /**
+ * Description - Remote version info
+ * Access mode - SET/GET.
+ * Data type - bt_remote_version_t.
+ */
+
+ BT_PROPERTY_REMOTE_VERSION_INFO,
BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP = 0xFF,
} bt_property_type_t;
@@ -299,6 +316,10 @@ typedef void (*callback_thread_event)(bt_cb_thread_evt evt);
/* Receive any HCI event from controller. Must be in DUT Mode for this callback to be received */
typedef void (*dut_mode_recv_callback)(uint16_t opcode, uint8_t *buf, uint8_t len);
+/* LE Test mode callbacks
+* This callback shall be invoked whenever the le_tx_test, le_rx_test or le_test_end is invoked
+* The num_packets is valid only for le_test_end command */
+typedef void (*le_test_mode_callback)(bt_status_t status, uint16_t num_packets);
/** TODO: Add callbacks for Link Up/Down and other generic
* notifications/callbacks */
@@ -317,6 +338,7 @@ typedef struct {
acl_state_changed_callback acl_state_changed_cb;
callback_thread_event thread_evt_cb;
dut_mode_recv_callback dut_mode_recv_cb;
+ le_test_mode_callback le_test_mode_cb;
} bt_callbacks_t;
/** NOTE: By default, no profiles are initialized at the time of init/enable.
@@ -424,6 +446,10 @@ typedef struct {
/* Send any test HCI (vendor-specific) command to the controller. Must be in DUT Mode */
int (*dut_mode_send)(uint16_t opcode, uint8_t *buf, uint8_t len);
+ /** BLE Test Mode APIs */
+ /* opcode MUST be one of: LE_Receiver_Test, LE_Transmitter_Test, LE_Test_End */
+ int (*le_test_mode)(uint16_t opcode, uint8_t *buf, uint8_t len);
+
} bt_interface_t;
/** TODO: Need to add APIs for Service Discovery, Service authorization and