aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-04-05 08:09:12 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-04-05 08:09:12 +0000
commitfa1a092901319b3b41bf09e0c4cb9cbbec470d6b (patch)
treeaa75acf5f00faa999f4622ce8754fe713d312b23 /Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c
parentfd96b288824caaa3ee4e5e03887f016de9df80cf (diff)
downloadlufa-fa1a092901319b3b41bf09e0c4cb9cbbec470d6b.tar.gz
lufa-fa1a092901319b3b41bf09e0c4cb9cbbec470d6b.tar.bz2
lufa-fa1a092901319b3b41bf09e0c4cb9cbbec470d6b.zip
Add user callback function to the Bluetooth host demo to filter out connections from remote devices. Add in ability to reject connections based on their bluetooth device address.
Clean up RelayBoard project code. Make AVRISP project clear the XMEGA target's reset register twice; this does not appear to take affect properly the first time under some circumstances.
Diffstat (limited to 'Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c')
-rw-r--r--Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c
index 7f49fc979..4e0330e52 100644
--- a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c
+++ b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c
@@ -30,26 +30,36 @@
#include "BluetoothStack.h"
+/** Bluetooth device connection information structure. Once connected to a remote device, this structure tracks the
+ * connection state of the individual L2CAP channels.
+ */
Bluetooth_Connection_t Bluetooth_Connection = {IsConnected: false};
-Bluetooth_Device_t Bluetooth_DeviceConfiguration ATTR_WEAK =
+/** Bluetooth configuration structure. This structure configures the bluetooth stack's user alterable settings. */
+Bluetooth_Device_t Bluetooth_DeviceConfiguration =
{
- Class: DEVICE_CLASS_MAJOR_MISC,
+ Class: (DEVICE_CLASS_SERVICE_CAPTURING | DEVICE_CLASS_MAJOR_COMPUTER | DEVICE_CLASS_MINOR_COMPUTER_PALM),
PINCode: "0000",
- Name: "LUFA BT Device"
+ Name: "LUFA Bluetooth Demo"
};
-void Bluetooth_State_Init(void)
+void Bluetooth_Stack_Init(void)
{
Bluetooth_HCIProcessingState = Bluetooth_Init;
}
-void Bluetooth_Stack_Task(void)
+void Bluetooth_Stack_USBTask(void)
{
Bluetooth_ProcessHCICommands();
Bluetooth_ProcessACLPackets();
}
+bool CALLBACK_Bluetooth_ConnectionRequest(uint8_t* RemoteAddress)
+{
+ /* Always accept connections from remote devices */
+ return true;
+}
+
Bluetooth_Channel_t* Bluetooth_GetChannelData(uint16_t ChannelNumber, bool SearchBySource)
{
Bluetooth_Channel_t* CurrentChannelStructure;