X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/b9c7d196152652df918a822522061c3fe193d273..c77f136661ae0fa779c02ef6efeab95aa4b92068:/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 5da4d0b16..1d3d19908 100644 --- a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c +++ b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c @@ -50,21 +50,20 @@ void Bluetooth_Stack_Init(void) void Bluetooth_Stack_USBTask(void) { - Bluetooth_ProcessHCICommands(); - Bluetooth_ProcessACLPackets(); + Bluetooth_HCITask(); + Bluetooth_ACLTask(); } Bluetooth_Channel_t* Bluetooth_GetChannelData(uint16_t ChannelNumber, bool SearchBySource) { for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++) { - Bluetooth_Channel_t* CurrentChannelStructure = &Bluetooth_Connection.Channels[i]; + Bluetooth_Channel_t* ChannelData = &Bluetooth_Connection.Channels[i]; - uint16_t CurrentChannelNumber = (SearchBySource) ? CurrentChannelStructure->RemoteNumber : - CurrentChannelStructure->LocalNumber; + uint16_t CurrentChannelNumber = (SearchBySource) ? ChannelData->RemoteNumber : ChannelData->LocalNumber; if (CurrentChannelNumber == ChannelNumber) - return CurrentChannelStructure; + return ChannelData; } return NULL; @@ -74,16 +73,16 @@ Bluetooth_Channel_t* Bluetooth_InitChannelData(uint16_t RemoteChannelNumber, uin { for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++) { - Bluetooth_Channel_t* CurrentChannelStructure = &Bluetooth_Connection.Channels[i]; + Bluetooth_Channel_t* ChannelData = &Bluetooth_Connection.Channels[i]; - if (CurrentChannelStructure->State == Channel_Closed) + if (ChannelData->State == Channel_Closed) { - CurrentChannelStructure->RemoteNumber = RemoteChannelNumber; - CurrentChannelStructure->LocalNumber = (BLUETOOTH_CHANNELNUMBER_BASEOFFSET + i); - CurrentChannelStructure->PSM = PSM; - CurrentChannelStructure->State = Channel_Config; + ChannelData->RemoteNumber = RemoteChannelNumber; + ChannelData->LocalNumber = (BLUETOOTH_CHANNELNUMBER_BASEOFFSET + i); + ChannelData->PSM = PSM; + ChannelData->State = Channel_Config_WaitConfig; - return CurrentChannelStructure; + return ChannelData; } }