Add bluetooth channel connection callback to the incomplete BluetoothHost demo.
[pub/USBasp.git] / Demos / Host / Incomplete / BluetoothHost / BluetoothHost.c
index 016b43c..0717294 100644 (file)
@@ -238,6 +238,20 @@ void Bluetooth_DisconnectionComplete(void)
                 Bluetooth_Connection.RemoteAddress[1], Bluetooth_Connection.RemoteAddress[0]);\r
 }\r
 \r
+/** Bluetooth stack callback event for a Bluetooth ACL Channel connection request. When is callback fires,\r
+ *  the user application must indicate if the channel connection should be rejected or not, based on the \r
+ *  protocol (PSM) value of the requested channel.\r
+ *\r
+ *  \param PSM  Protocol PSM value for the requested channel\r
+ *\r
+ *  \return Boolean true to accept the channel connection request, false to reject it\r
+ */\r
+bool Bluetooth_ChannelConnectionRequest(uint16_t PSM)\r
+{\r
+       /* Always accept channel connection requests regardless of PSM */\r
+       return true;\r
+}\r
+\r
 /** Bluetooth stack callback event for a non-signal ACL packet reception. This callback fires once a connection\r
  *  to a remote Bluetooth device has been made, and the remote device has sent a non-signalling ACL packet.\r
  *\r