mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
Add Bluetooth signalling echo request/response handlers, disconnection request/response handlers.
Add Bluetooth connection request/complete/disconnection callbacks. Remove debugging from HCI layer, as it is now operational -- add guards to ACL debug statements to reduce logging chattyness so that the overall command sequences can be observed and debugged.
This commit is contained in:
@@ -195,3 +195,30 @@ void Bluetooth_Host_Task(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool Bluetooth_ConnectionRequest(uint8_t* RemoteAddress)
|
||||
{
|
||||
printf_P(PSTR("Connection Request from Device %02X:%02X:%02X:%02X:%02X:%02X\r\n"),
|
||||
RemoteAddress[5], RemoteAddress[4],
|
||||
RemoteAddress[3], RemoteAddress[2],
|
||||
RemoteAddress[1], RemoteAddress[0]);
|
||||
|
||||
/* Always accept connections from remote devices */
|
||||
return true;
|
||||
}
|
||||
|
||||
void Bluetooth_ConnectionComplete(void)
|
||||
{
|
||||
printf_P(PSTR("Connection Complete to Device %02X:%02X:%02X:%02X:%02X:%02X\r\n"),
|
||||
Bluetooth_Connection.RemoteAddress[5], Bluetooth_Connection.RemoteAddress[4],
|
||||
Bluetooth_Connection.RemoteAddress[3], Bluetooth_Connection.RemoteAddress[2],
|
||||
Bluetooth_Connection.RemoteAddress[1], Bluetooth_Connection.RemoteAddress[0]);
|
||||
}
|
||||
|
||||
void Bluetooth_DisconnectionComplete(void)
|
||||
{
|
||||
printf_P(PSTR("Disconnection Complete to Device %02X:%02X:%02X:%02X:%02X:%02X\r\n"),
|
||||
Bluetooth_Connection.RemoteAddress[5], Bluetooth_Connection.RemoteAddress[4],
|
||||
Bluetooth_Connection.RemoteAddress[3], Bluetooth_Connection.RemoteAddress[2],
|
||||
Bluetooth_Connection.RemoteAddress[1], Bluetooth_Connection.RemoteAddress[0]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user