projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Bluetooth signalling echo request/response handlers, disconnection request/respon...
[pub/USBasp.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
4e0330e
..
5da4d0b
100644
(file)
--- 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();
\r
}
\r
\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* Bluetooth_GetChannelData(uint16_t ChannelNumber, bool SearchBySource)
\r
{
\r
- Bluetooth_Channel_t* CurrentChannelStructure;
\r
-
\r
for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++)
\r
{
\r
for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++)
\r
{
\r
- CurrentChannelStructure = &Bluetooth_Connection.Channels[i];
\r
+
Bluetooth_Channel_t*
CurrentChannelStructure = &Bluetooth_Connection.Channels[i];
\r
\r
\r
- uint16_t CurrentChannelNumber = ((SearchBySource) ? CurrentChannelStructure->RemoteNumber : CurrentChannelStructure->LocalNumber);
\r
+ uint16_t CurrentChannelNumber = (SearchBySource) ? CurrentChannelStructure->RemoteNumber :
\r
+ CurrentChannelStructure->LocalNumber;
\r
\r
if (CurrentChannelNumber == ChannelNumber)
\r
return CurrentChannelStructure;
\r
\r
if (CurrentChannelNumber == ChannelNumber)
\r
return CurrentChannelStructure;
\r
@@
-79,11
+72,9
@@
Bluetooth_Channel_t* Bluetooth_GetChannelData(uint16_t ChannelNumber, bool Searc
\r
Bluetooth_Channel_t* Bluetooth_InitChannelData(uint16_t RemoteChannelNumber, uint16_t PSM)
\r
{
\r
\r
Bluetooth_Channel_t* Bluetooth_InitChannelData(uint16_t RemoteChannelNumber, uint16_t PSM)
\r
{
\r
- Bluetooth_Channel_t* CurrentChannelStructure;
\r
-
\r
for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++)
\r
{
\r
for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++)
\r
{
\r
- CurrentChannelStructure = &Bluetooth_Connection.Channels[i];
\r
+
Bluetooth_Channel_t*
CurrentChannelStructure = &Bluetooth_Connection.Channels[i];
\r
\r
if (CurrentChannelStructure->State == Channel_Closed)
\r
{
\r
\r
if (CurrentChannelStructure->State == Channel_Closed)
\r
{
\r