mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
(btstack_hid.c) Cleanup
This commit is contained in:
parent
595646fea4
commit
7b7869eb4c
@ -533,10 +533,8 @@ void btpad_packet_handler(uint8_t packet_type,
|
|||||||
|
|
||||||
/* TODO: Where did I get 672 for MTU? */
|
/* TODO: Where did I get 672 for MTU? */
|
||||||
|
|
||||||
bt_send_cmd_ptr(l2cap_register_service_ptr,
|
bt_send_cmd_ptr(l2cap_register_service_ptr, PSM_HID_CONTROL, 672);
|
||||||
PSM_HID_CONTROL, 672);
|
bt_send_cmd_ptr(l2cap_register_service_ptr, PSM_HID_INTERRUPT, 672);
|
||||||
bt_send_cmd_ptr(l2cap_register_service_ptr,
|
|
||||||
PSM_HID_INTERRUPT, 672);
|
|
||||||
btpad_queue_hci_inquiry(cmd, HCI_INQUIRY_LAP, 3, 1);
|
btpad_queue_hci_inquiry(cmd, HCI_INQUIRY_LAP, 3, 1);
|
||||||
|
|
||||||
btpad_queue_run(1);
|
btpad_queue_run(1);
|
||||||
@ -623,12 +621,18 @@ void btpad_packet_handler(uint8_t packet_type,
|
|||||||
RARCH_LOG("[BTpad]: L2CAP channel opened: (PSM: %02X)\n", psm);
|
RARCH_LOG("[BTpad]: L2CAP channel opened: (PSM: %02X)\n", psm);
|
||||||
connection->handle = handle;
|
connection->handle = handle;
|
||||||
|
|
||||||
if (psm == PSM_HID_CONTROL)
|
switch (psm)
|
||||||
connection->channels[0] = channel_id;
|
{
|
||||||
else if (psm == PSM_HID_INTERRUPT)
|
case PSM_HID_CONTROL:
|
||||||
connection->channels[1] = channel_id;
|
connection->channels[0] = channel_id;
|
||||||
else
|
break;
|
||||||
RARCH_LOG("[BTpad]: Got unknown L2CAP PSM, ignoring (PSM: %02X).\n", psm);
|
case PSM_HID_INTERRUPT:
|
||||||
|
connection->channels[1] = channel_id;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
RARCH_LOG("[BTpad]: Got unknown L2CAP PSM, ignoring (PSM: %02X).\n", psm);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (connection->channels[0] && connection->channels[1])
|
if (connection->channels[0] && connection->channels[1])
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user