HOG mouse/keyboard: stop sending on disconnect

This commit is contained in:
Matthias Ringwald 2017-10-30 15:17:00 +01:00
parent 6c333d061e
commit d241e50b75
2 changed files with 2 additions and 0 deletions

View File

@ -390,6 +390,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
case HCI_EVENT_PACKET:
switch (hci_event_packet_get_type(packet)) {
case HCI_EVENT_DISCONNECTION_COMPLETE:
con_handle = HCI_CON_HANDLE_INVALID;
printf("Disconnected\n");
break;
case SM_EVENT_JUST_WORKS_REQUEST:

View File

@ -293,6 +293,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
case HCI_EVENT_PACKET:
switch (hci_event_packet_get_type(packet)) {
case HCI_EVENT_DISCONNECTION_COMPLETE:
con_handle = HCI_CON_HANDLE_INVALID;
printf("Disconnected\n");
break;
case SM_EVENT_JUST_WORKS_REQUEST: