aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-04-05 12:13:33 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-04-05 12:13:33 +0000
commit083d797acaa58f792960a1cb9d7d8d41c3c956a7 (patch)
tree2335216af3b26e4a27e1fbfc726153ab736747bb /Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
parentfa1a092901319b3b41bf09e0c4cb9cbbec470d6b (diff)
downloadlufa-083d797acaa58f792960a1cb9d7d8d41c3c956a7.tar.gz
lufa-083d797acaa58f792960a1cb9d7d8d41c3c956a7.tar.bz2
lufa-083d797acaa58f792960a1cb9d7d8d41c3c956a7.zip
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.
Diffstat (limited to 'Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c')
-rw-r--r--Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c b/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
index 338997fc7..a3ca0aaa4 100644
--- a/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
+++ b/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
@@ -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]);
+}