+ \r
+ /* Initialize the Bluetooth stack */\r
+ Bluetooth_Stack_Init();\r
+\r
+ USB_HostState = HOST_STATE_Configured;\r
+ break;\r
+ }\r
+}\r
+\r
+/** Bluetooth stack callback event for when the Bluetooth stack has fully initialized using the attached\r
+ * Bluetooth dongle.\r
+ */\r
+void Bluetooth_StackInitialized(void)\r
+{\r
+ printf_P(PSTR("Stack initialized with local address %02X:%02X:%02X:%02X:%02X:%02X.\r\n"),\r
+ Bluetooth_State.LocalBDADDR[5], Bluetooth_State.LocalBDADDR[4], Bluetooth_State.LocalBDADDR[3],\r
+ Bluetooth_State.LocalBDADDR[2], Bluetooth_State.LocalBDADDR[1], Bluetooth_State.LocalBDADDR[0]);\r
+}\r
+\r
+/** Bluetooth stack callback event for a Bluetooth connection request. When this callback fires, the\r
+ * user application must indicate if the connection is to be allowed or rejected.\r
+ *\r
+ * \param[in] RemoteAddress Bluetooth address of the remote device attempting the connection\r
+ *\r
+ * \return Boolean true to accept the connection, false to reject it\r
+ */\r
+bool Bluetooth_ConnectionRequest(const uint8_t* RemoteAddress)\r
+{\r
+ printf_P(PSTR("Connection Request from Device %02X:%02X:%02X:%02X:%02X:%02X.\r\n"),\r
+ RemoteAddress[5], RemoteAddress[4], RemoteAddress[3], RemoteAddress[2],\r
+ RemoteAddress[1], RemoteAddress[0]);\r
+\r
+ /* Always accept connections from remote devices */\r
+ return true;\r
+}\r
+\r
+/** Bluetooth stack callback event for a completed Bluetooth connection. When this callback is made,\r
+ * the connection information can be accessed through the global \ref Bluetooth_Connection structure.\r
+ */\r
+void Bluetooth_ConnectionComplete(void)\r
+{\r
+ printf_P(PSTR("Connection Complete to Device %02X:%02X:%02X:%02X:%02X:%02X.\r\n"), \r
+ Bluetooth_Connection.RemoteAddress[5], Bluetooth_Connection.RemoteAddress[4],\r
+ Bluetooth_Connection.RemoteAddress[3], Bluetooth_Connection.RemoteAddress[2],\r
+ Bluetooth_Connection.RemoteAddress[1], Bluetooth_Connection.RemoteAddress[0]);\r
+}\r