X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/2a072db7030fa33be1e8dcf82ebf0b45cb4d77c1..8b0ec6c5cafe99595743725a20ad40ce4898de14:/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 7989063e8..ec1f637d7 100644 --- a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c +++ b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c @@ -54,13 +54,13 @@ void Bluetooth_Stack_USBTask(void) Bluetooth_ACLTask(); } -Bluetooth_Channel_t* Bluetooth_GetChannelData(uint16_t ChannelNumber, bool SearchBySource) +Bluetooth_Channel_t* Bluetooth_GetChannelData(uint16_t ChannelNumber, bool SearchByRemoteChannel) { for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++) { Bluetooth_Channel_t* ChannelData = &Bluetooth_Connection.Channels[i]; - uint16_t CurrentChannelNumber = (SearchBySource) ? ChannelData->RemoteNumber : ChannelData->LocalNumber; + uint16_t CurrentChannelNumber = (SearchByRemoteChannel) ? ChannelData->RemoteNumber : ChannelData->LocalNumber; if (CurrentChannelNumber == ChannelNumber) return ChannelData; @@ -68,24 +68,3 @@ Bluetooth_Channel_t* Bluetooth_GetChannelData(uint16_t ChannelNumber, bool Searc return NULL; } - -Bluetooth_Channel_t* Bluetooth_InitChannelData(uint16_t RemoteChannelNumber, uint16_t PSM) -{ - for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++) - { - Bluetooth_Channel_t* ChannelData = &Bluetooth_Connection.Channels[i]; - - if (ChannelData->State == Channel_Closed) - { - ChannelData->RemoteNumber = RemoteChannelNumber; - ChannelData->LocalNumber = (BLUETOOTH_CHANNELNUMBER_BASEOFFSET + i); - ChannelData->PSM = PSM; - ChannelData->LocalMTU = MAXIMUM_CHANNEL_MTU; - ChannelData->State = Channel_Config_WaitConfig; - - return ChannelData; - } - } - - return NULL; -}