mirror of
https://github.com/CTCaer/hekate.git
synced 2024-12-25 06:18:11 +00:00
joycon: Wait for disconnect cmd reply
This commit is contained in:
parent
3794c61ab2
commit
11ca71cbc7
@ -590,9 +590,20 @@ void jc_deinit()
|
|||||||
u8 data = HCI_STATE_SLEEP;
|
u8 data = HCI_STATE_SLEEP;
|
||||||
|
|
||||||
if (jc_r.connected)
|
if (jc_r.connected)
|
||||||
|
{
|
||||||
jc_send_hid_cmd(UART_B, JC_HID_SUBCMD_HCI_STATE, &data, 1);
|
jc_send_hid_cmd(UART_B, JC_HID_SUBCMD_HCI_STATE, &data, 1);
|
||||||
|
msleep(1);
|
||||||
|
jc_rcv_pkt(&jc_r);
|
||||||
|
}
|
||||||
if (jc_l.connected)
|
if (jc_l.connected)
|
||||||
|
{
|
||||||
jc_send_hid_cmd(UART_C, JC_HID_SUBCMD_HCI_STATE, &data, 1);
|
jc_send_hid_cmd(UART_C, JC_HID_SUBCMD_HCI_STATE, &data, 1);
|
||||||
|
msleep(1);
|
||||||
|
jc_rcv_pkt(&jc_l);
|
||||||
|
}
|
||||||
|
|
||||||
|
jc_power_supply(UART_B, false);
|
||||||
|
jc_power_supply(UART_C, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void jc_init_conn(joycon_ctxt_t *jc)
|
static void jc_init_conn(joycon_ctxt_t *jc)
|
||||||
|
Loading…
Reference in New Issue
Block a user