ev->state);
}
+static void handle_info(void *buf)
+{
+ struct hal_ev_hid_info *ev = buf;
+ bthh_hid_info_t info;
+
+ info.attr_mask = ev->attr;
+ info.sub_class = ev->subclass;
+ info.app_id = ev->app_id;
+ info.vendor_id = ev->vendor;
+ info.product_id = ev->product;
+ info.version = ev->version;
+ info.ctry_code = ev->country;
+ info.dl_len = ev->descr_len;
+ memcpy(info.dsc_list, ev->descr, info.dl_len);
+
+ if (bt_hh_cbacks->hid_info_cb)
+ bt_hh_cbacks->hid_info_cb((bt_bdaddr_t *) ev->bdaddr, info);
+}
+
/* will be called from notification thread context */
void bt_notify_hh(uint16_t opcode, void *buf, uint16_t len)
{
case HAL_EV_HID_CONN_STATE:
handle_conn_state(buf);
break;
+ case HAL_EV_HID_INFO:
+ handle_info(buf);
+ break;
default:
DBG("Unhandled callback opcode=0x%x", opcode);
break;
uint8_t state;
} __attribute__((packed));
+#define HAL_EV_HID_INFO 0x82
+struct hal_ev_hid_info {
+ uint8_t bdaddr[6];
+ uint8_t attr;
+ uint8_t subclass;
+ uint8_t app_id;
+ uint16_t vendor;
+ uint16_t product;
+ uint16_t version;
+ uint8_t country;
+ uint16_t descr_len;
+ uint8_t descr[884];
+} __attribute__((packed));
+
#define HAL_EV_AV_CONNECTION_STATE 0x81
struct hal_ev_av_connection_state {
uint8_t state;