mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-03 20:54:18 +00:00
hid_device: fix hid_device_send_interrupt_message
This commit is contained in:
parent
2cc827d492
commit
e9392950b0
@ -897,21 +897,20 @@ void hid_device_request_can_send_now_event(uint16_t hid_cid){
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send HID messageon interrupt channel
|
||||
* @brief Send HID message on interrupt channel
|
||||
* @param hid_cid
|
||||
*/
|
||||
void hid_device_send_interrupt_message(uint16_t hid_cid, const uint8_t * message, uint16_t message_len){
|
||||
hid_device_t * hid_device = hid_device_get_instance_for_hid_cid(hid_cid);
|
||||
if (!hid_device || !hid_device->interrupt_cid) return;
|
||||
l2cap_send(hid_device->interrupt_cid, (uint8_t*) message, message_len);
|
||||
// request user can send now if pending
|
||||
if (hid_device->interrupt_cid){
|
||||
if (hid_device->user_request_can_send_now){
|
||||
l2cap_request_can_send_now_event((hid_device->interrupt_cid));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send HID messageon control channel
|
||||
* @brief Send HID message on control channel
|
||||
* @param hid_cid
|
||||
*/
|
||||
void hid_device_send_control_message(uint16_t hid_cid, const uint8_t * message, uint16_t message_len){
|
||||
|
@ -172,13 +172,13 @@ void hid_device_disconnect(uint16_t hid_cid);
|
||||
void hid_device_request_can_send_now_event(uint16_t hid_cid);
|
||||
|
||||
/**
|
||||
* @brief Send HID messageon interrupt channel
|
||||
* @brief Send HID message on interrupt channel
|
||||
* @param hid_cid
|
||||
*/
|
||||
void hid_device_send_interrupt_message(uint16_t hid_cid, const uint8_t * message, uint16_t message_len);
|
||||
|
||||
/**
|
||||
* @brief Send HID messageon control channel
|
||||
* @brief Send HID message on control channel
|
||||
* @param hid_cid
|
||||
*/
|
||||
void hid_device_send_control_message(uint16_t hid_cid, const uint8_t * message, uint16_t message_len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user