\r
#include "BluetoothHost.h"\r
\r
+/** Bluetooth configuration structure. This structure configures the bluetooth stack's user alterable settings. */\r
+Bluetooth_Device_t Bluetooth_DeviceConfiguration =\r
+ {\r
+ Class: (DEVICE_CLASS_SERVICE_CAPTURING | DEVICE_CLASS_MAJOR_COMPUTER | DEVICE_CLASS_MINOR_COMPUTER_PALM),\r
+ PINCode: "0000",\r
+ Name: "LUFA Bluetooth Demo"\r
+ };\r
+\r
/** Main program entry point. This routine configures the hardware required by the application, then\r
* enters a loop to run the application tasks in sequence.\r
*/\r
puts_P(PSTR(ESC_FG_CYAN "Bluetooth Host Demo running.\r\n" ESC_FG_WHITE));\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+ sei();\r
\r
for (;;)\r
{\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
*/\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
+ 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
*/\r
void Bluetooth_ConnectionComplete(void)\r
{\r
- printf_P(PSTR("Connection Complete to Device %02X:%02X:%02X:%02X:%02X:%02X\r\n"), \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
void Bluetooth_DisconnectionComplete(void)\r
{\r
- printf_P(PSTR("Disconnection Complete to Device %02X:%02X:%02X:%02X:%02X:%02X\r\n"), \r
+ printf_P(PSTR("Disconnection 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