summaryrefslogtreecommitdiff
path: root/android/hal-hidhost.c
diff options
context:
space:
mode:
authorRavi kumar Veeramally <ravikumar.veeramally@linux.intel.com>2013-11-05 23:09:09 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2013-11-06 10:17:23 +0200
commit868e069fc13bec2715ccba973a91e574d62e76e3 (patch)
treedabe28b81d63b791d99081143b6606d68c897ab0 /android/hal-hidhost.c
parentbf0031a50bc3cb180ee8b31ba53a6497f22cb219 (diff)
downloadbluez-868e069fc13bec2715ccba973a91e574d62e76e3.tar.gz
android/hid: Handle protocol mode notification in HAL
Diffstat (limited to 'android/hal-hidhost.c')
-rw-r--r--android/hal-hidhost.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/android/hal-hidhost.c b/android/hal-hidhost.c
index c20c78567..13928e672 100644
--- a/android/hal-hidhost.c
+++ b/android/hal-hidhost.c
@@ -59,6 +59,15 @@ static void handle_info(void *buf)
bt_hh_cbacks->hid_info_cb((bt_bdaddr_t *) ev->bdaddr, info);
}
+static void handle_proto_mode(void *buf)
+{
+ struct hal_ev_hid_proto_mode *ev = buf;
+
+ if (bt_hh_cbacks->protocol_mode_cb)
+ bt_hh_cbacks->protocol_mode_cb((bt_bdaddr_t *) ev->bdaddr,
+ ev->status, ev->mode);
+}
+
/* will be called from notification thread context */
void bt_notify_hh(uint16_t opcode, void *buf, uint16_t len)
{
@@ -72,6 +81,9 @@ void bt_notify_hh(uint16_t opcode, void *buf, uint16_t len)
case HAL_EV_HID_INFO:
handle_info(buf);
break;
+ case HAL_EV_HID_PROTO_MODE:
+ handle_proto_mode(buf);
+ break;
default:
DBG("Unhandled callback opcode=0x%x", opcode);
break;