More improvements to the incomplete BluetoothHost demo - add Disconnection Event...
[pub/lufa.git] / Demos / Host / Incomplete / BluetoothHost / Lib / BluetoothStack.c
index f20b27a..7f49fc9 100644 (file)
@@ -1,13 +1,13 @@
 /*\r
              LUFA Library\r
 /*\r
              LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
+     Copyright (C) Dean Camera, 2010.\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
 \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
 \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
@@ -39,11 +39,13 @@ Bluetooth_Device_t     Bluetooth_DeviceConfiguration ATTR_WEAK =
                Name:    "LUFA BT Device"\r
        };\r
 \r
                Name:    "LUFA BT Device"\r
        };\r
 \r
+void Bluetooth_State_Init(void)\r
+{\r
+       Bluetooth_HCIProcessingState = Bluetooth_Init;\r
+}\r
+\r
 void Bluetooth_Stack_Task(void)\r
 {\r
 void Bluetooth_Stack_Task(void)\r
 {\r
-       if (USB_HostState != HOST_STATE_Configured)\r
-         Bluetooth_HCIProcessingState = Bluetooth_Init;\r
-               \r
        Bluetooth_ProcessHCICommands();\r
        Bluetooth_ProcessACLPackets();\r
 }\r
        Bluetooth_ProcessHCICommands();\r
        Bluetooth_ProcessACLPackets();\r
 }\r