projects
/
pub
/
lufa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add user callback function to the Bluetooth host demo to filter out connections from...
[pub/lufa.git]
/
Demos
/
Host
/
Incomplete
/
BluetoothHost
/
Lib
/
BluetoothStack.c
diff --git
a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c
b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c
index
7f49fc9
..
4e0330e
100644
(file)
--- a/
Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c
+++ b/
Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c
@@
-30,26
+30,36
@@
\r
#include "BluetoothStack.h"
\r
\r
\r
#include "BluetoothStack.h"
\r
\r
+/** Bluetooth device connection information structure. Once connected to a remote device, this structure tracks the
\r
+ * connection state of the individual L2CAP channels.
\r
+ */
\r
Bluetooth_Connection_t Bluetooth_Connection = {IsConnected: false};
\r
\r
Bluetooth_Connection_t Bluetooth_Connection = {IsConnected: false};
\r
\r
-Bluetooth_Device_t Bluetooth_DeviceConfiguration ATTR_WEAK =
\r
+/** Bluetooth configuration structure. This structure configures the bluetooth stack's user alterable settings. */
\r
+Bluetooth_Device_t Bluetooth_DeviceConfiguration =
\r
{
\r
{
\r
- Class:
DEVICE_CLASS_MAJOR_MISC
,
\r
+ Class:
(DEVICE_CLASS_SERVICE_CAPTURING | DEVICE_CLASS_MAJOR_COMPUTER | DEVICE_CLASS_MINOR_COMPUTER_PALM)
,
\r
PINCode: "0000",
\r
PINCode: "0000",
\r
- Name: "LUFA B
T Device
"
\r
+ Name: "LUFA B
luetooth Demo
"
\r
};
\r
\r
};
\r
\r
-void Bluetooth_Sta
te
_Init(void)
\r
+void Bluetooth_Sta
ck
_Init(void)
\r
{
\r
Bluetooth_HCIProcessingState = Bluetooth_Init;
\r
}
\r
\r
{
\r
Bluetooth_HCIProcessingState = Bluetooth_Init;
\r
}
\r
\r
-void Bluetooth_Stack_Task(void)
\r
+void Bluetooth_Stack_
USB
Task(void)
\r
{
\r
Bluetooth_ProcessHCICommands();
\r
Bluetooth_ProcessACLPackets();
\r
}
\r
\r
{
\r
Bluetooth_ProcessHCICommands();
\r
Bluetooth_ProcessACLPackets();
\r
}
\r
\r
+bool CALLBACK_Bluetooth_ConnectionRequest(uint8_t* RemoteAddress)
\r
+{
\r
+ /* Always accept connections from remote devices */
\r
+ return true;
\r
+}
\r
+
\r
Bluetooth_Channel_t* Bluetooth_GetChannelData(uint16_t ChannelNumber, bool SearchBySource)
\r
{
\r
Bluetooth_Channel_t* CurrentChannelStructure;
\r
Bluetooth_Channel_t* Bluetooth_GetChannelData(uint16_t ChannelNumber, bool SearchBySource)
\r
{
\r
Bluetooth_Channel_t* CurrentChannelStructure;
\r