diff options
author | Dean Camera <[email protected]> | 2010-04-05 12:13:33 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2010-04-05 12:13:33 +0000 |
commit | 083d797acaa58f792960a1cb9d7d8d41c3c956a7 (patch) | |
tree | 2335216af3b26e4a27e1fbfc726153ab736747bb /Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c | |
parent | fa1a092901319b3b41bf09e0c4cb9cbbec470d6b (diff) | |
download | qmk_firmware-083d797acaa58f792960a1cb9d7d8d41c3c956a7.tar.gz qmk_firmware-083d797acaa58f792960a1cb9d7d8d41c3c956a7.zip |
Add Bluetooth signalling echo request/response handlers, disconnection request/response handlers.
Add Bluetooth connection request/complete/disconnection callbacks.
Remove debugging from HCI layer, as it is now operational -- add guards to ACL debug statements to reduce logging chattyness so that the overall command sequences can be observed and debugged.
Diffstat (limited to 'Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c')
-rw-r--r-- | Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c index 4e0330e527..5da4d0b167 100644 --- a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c +++ b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c @@ -54,21 +54,14 @@ void Bluetooth_Stack_USBTask(void) 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;
-
for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++)
{
- CurrentChannelStructure = &Bluetooth_Connection.Channels[i];
+ Bluetooth_Channel_t* CurrentChannelStructure = &Bluetooth_Connection.Channels[i];
- uint16_t CurrentChannelNumber = ((SearchBySource) ? CurrentChannelStructure->RemoteNumber : CurrentChannelStructure->LocalNumber);
+ uint16_t CurrentChannelNumber = (SearchBySource) ? CurrentChannelStructure->RemoteNumber :
+ CurrentChannelStructure->LocalNumber;
if (CurrentChannelNumber == ChannelNumber)
return CurrentChannelStructure;
@@ -79,11 +72,9 @@ Bluetooth_Channel_t* Bluetooth_GetChannelData(uint16_t ChannelNumber, bool Searc Bluetooth_Channel_t* Bluetooth_InitChannelData(uint16_t RemoteChannelNumber, uint16_t PSM)
{
- Bluetooth_Channel_t* CurrentChannelStructure;
-
for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++)
{
- CurrentChannelStructure = &Bluetooth_Connection.Channels[i];
+ Bluetooth_Channel_t* CurrentChannelStructure = &Bluetooth_Connection.Channels[i];
if (CurrentChannelStructure->State == Channel_Closed)
{
|