unsigned char key[8];
} hid_send_key_event_t;
-typedef struct {
- unsigned char btcode;
- unsigned char rep_id;
- unsigned short key[3];
-} hid_send_rc_key_event_t;
-
typedef void (*hid_cb_func_ptr)(int, hid_event_param_t *, void *);
typedef struct {
*/
int bluetooth_hid_disconnect(hid_device_address_t *device_address);
+int bluetooth_hid_enable_barcode_feature(void);
+
/**
* @fn int bluetooth_hid_device_init(hid_cb_func_ptr callback_ptr, void *user_data)
* @brief Initialize HID Device service and register the callback
hid_send_key_event_t send_event);
/**
- * @fn int bluetooth_hid_device_send_rc_key_event(
- * const char *remote_addr, hid_send_rc_key_event_t send_event)
+ * @fn int bluetooth_hid_device_send_custom_event(const char *remote_addr,
+ * unsigned char btcode, unsigned char report_id,
+ * const char *data, unsigned int data_len)
*
* @brief write the event data on the socket.
*
*
* @exception None
* @param[in] remote_addr device address of remote device.
- * @param[in] send_event This indicates the event data to send to remote device.
+ * @param[in] btcode The btcode
+ * @param[in] report_id The report id
+ * @param[in] data This indicates the event data to send to remote device.
+ * @param[in] data_len The length of the data
* @remark None
*/
-int bluetooth_hid_device_send_rc_key_event(const char *remote_addr,
- hid_send_rc_key_event_t send_event);
+int bluetooth_hid_device_send_custom_event(const char *remote_addr,
+ unsigned char btcode, unsigned char report_id,
+ const char *data, unsigned int data_len);
+
/**
* @fn int bluetooth_hid_device_reply_to_report(const char *remote_addr,
- * bluetooth_hid_header_type_t htype,
- * bluetooth_hid_param_type_t ptype,
+ * bt_hid_header_type_t htype,
+ * bt_hid_param_type_t ptype,
* char *buffer)
*
* @brief write the event data on the socket.
* @remark None
*/
int bluetooth_hid_device_reply_to_report(const char *remote_addr,
- bluetooth_hid_header_type_t htype,
- bluetooth_hid_param_type_t ptype,
+ bt_hid_header_type_t htype,
+ bt_hid_param_type_t ptype,
const char *data,
unsigned int data_len);