\r
void Bluetooth_Stack_USBTask(void)\r
{\r
- Bluetooth_ProcessHCICommands();\r
- Bluetooth_ProcessACLPackets();\r
+ Bluetooth_HCITask();\r
+ Bluetooth_ACLTask();\r
}\r
\r
Bluetooth_Channel_t* Bluetooth_GetChannelData(uint16_t ChannelNumber, bool SearchBySource)\r
{\r
for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++)\r
{\r
- Bluetooth_Channel_t* CurrentChannelStructure = &Bluetooth_Connection.Channels[i];\r
+ Bluetooth_Channel_t* ChannelData = &Bluetooth_Connection.Channels[i];\r
\r
- uint16_t CurrentChannelNumber = (SearchBySource) ? CurrentChannelStructure->RemoteNumber :\r
- CurrentChannelStructure->LocalNumber;\r
+ uint16_t CurrentChannelNumber = (SearchBySource) ? ChannelData->RemoteNumber : ChannelData->LocalNumber;\r
\r
if (CurrentChannelNumber == ChannelNumber)\r
- return CurrentChannelStructure;\r
+ return ChannelData;\r
}\r
\r
return NULL;\r
{\r
for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++)\r
{\r
- Bluetooth_Channel_t* CurrentChannelStructure = &Bluetooth_Connection.Channels[i];\r
+ Bluetooth_Channel_t* ChannelData = &Bluetooth_Connection.Channels[i];\r
\r
- if (CurrentChannelStructure->State == Channel_Closed)\r
+ if (ChannelData->State == Channel_Closed)\r
{\r
- CurrentChannelStructure->RemoteNumber = RemoteChannelNumber;\r
- CurrentChannelStructure->LocalNumber = (BLUETOOTH_CHANNELNUMBER_BASEOFFSET + i);\r
- CurrentChannelStructure->PSM = PSM;\r
- CurrentChannelStructure->State = Channel_Config;\r
+ ChannelData->RemoteNumber = RemoteChannelNumber;\r
+ ChannelData->LocalNumber = (BLUETOOTH_CHANNELNUMBER_BASEOFFSET + i);\r
+ ChannelData->PSM = PSM;\r
+ ChannelData->State = Channel_Config_WaitConfig;\r
\r
- return CurrentChannelStructure;\r
+ return ChannelData;\r
} \r
}\r
\r