diff --git a/android/hog.c b/android/hog.c
index 43bd266..9f8c7e5 100644
--- a/android/hog.c
+++ b/android/hog.c
return 0;
}
+
+int bt_hog_send_report(struct bt_hog *hog, void *data, size_t size, int type)
+{
+ struct report *report;
+ GSList *l;
+
+ if (!hog)
+ return -EINVAL;
+
+ if (!hog->attrib)
+ return -ENOTCONN;
+
+ l = g_slist_find_custom(hog->reports, GUINT_TO_POINTER(type),
+ report_type_cmp);
+ if (!l)
+ return -ENOTSUP;
+
+ report = l->data;
+
+ DBG("hog: Write report, handle 0x%X", report->decl->value_handle);
+
+ if (report->decl->properties & GATT_CHR_PROP_WRITE)
+ gatt_write_char(hog->attrib, report->decl->value_handle,
+ data, size, output_written_cb, hog);
+
+ if (report->decl->properties & GATT_CHR_PROP_WRITE_WITHOUT_RESP)
+ gatt_write_cmd(hog->attrib, report->decl->value_handle,
+ data, size, NULL, NULL);
+
+ for (l = hog->instances; l; l = l->next) {
+ struct bt_hog *instance = l->data;
+
+ bt_hog_send_report(instance, data, size, type);
+ }
+
+ return 0;
+}
diff --git a/android/hog.h b/android/hog.h
index 7cf446b..ddb2cea 100644
--- a/android/hog.h
+++ b/android/hog.h
void bt_hog_detach(struct bt_hog *hog);
int bt_hog_set_control_point(struct bt_hog *hog, bool suspend);
+int bt_hog_send_report(struct bt_hog *hog, void *data, size_t size, int type);