X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/3eb81df998349e90c3d973e6301f19382c5b2e84..ceb16ee24f1e6add5e2ad0398369c24d2d868cd8:/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c index f96e10c37..8c417ff56 100644 --- a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c +++ b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c @@ -28,6 +28,12 @@ this software. */ +/* + TODO: Make SendPacket respect receiver's MTU + TODO: Make ReceivePacket stitch together MTU fragments (?) + TODO: Add channel opened/closed callbacks + */ + #define INCLUDE_FROM_BLUETOOTH_ACLPACKETS_C #include "BluetoothACLPackets.h" @@ -90,7 +96,7 @@ void Bluetooth_ACLTask(void) Bluetooth_SendPacket(&PacketData, sizeof(PacketData), NULL); - BT_ACL_DEBUG(1, ">> L2CAP Configuration Request", NULL); + BT_ACL_DEBUG(1, ">> L2CAP Configuration Request"); BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", PacketData.ConfigurationRequest.DestinationChannel); } } @@ -118,8 +124,8 @@ static void Bluetooth_ProcessIncommingACLPackets(void) Pipe_Read_Stream_LE(&ACLPacketHeader, sizeof(ACLPacketHeader)); Pipe_Read_Stream_LE(&DataHeader, sizeof(DataHeader)); - BT_ACL_DEBUG(2, "", NULL); - BT_ACL_DEBUG(2, "Packet Received", NULL); + BT_ACL_DEBUG(2, ""); + BT_ACL_DEBUG(2, "Packet Received"); BT_ACL_DEBUG(2, "-- Connection Handle: 0x%04X", (ACLPacketHeader.ConnectionHandle & 0x0FFF)); BT_ACL_DEBUG(2, "-- Data Length: 0x%04X", ACLPacketHeader.DataLength); BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", DataHeader.DestinationChannel); @@ -160,7 +166,7 @@ static void Bluetooth_ProcessIncommingACLPackets(void) Bluetooth_Signal_InformationReq(&SignalCommandHeader); break; case BT_SIGNAL_COMMAND_REJECT: - BT_ACL_DEBUG(1, "<< Command Reject", NULL); + BT_ACL_DEBUG(1, "<< Command Reject"); uint16_t RejectReason; Pipe_Read_Stream_LE(&RejectReason, sizeof(RejectReason)); @@ -187,20 +193,21 @@ static void Bluetooth_ProcessIncommingACLPackets(void) Pipe_ClearIN(); Pipe_Freeze(); - Bluetooth_PacketReceived(PacketData, DataHeader.PayloadLength, Bluetooth_GetChannelData(DataHeader.DestinationChannel, false)); + Bluetooth_PacketReceived(PacketData, DataHeader.PayloadLength, + Bluetooth_GetChannelData(DataHeader.DestinationChannel, CHANNEL_SEARCH_LOCALNUMBER)); } } /** Sends a packet to the remote device on the specified channel. * - * \param Data Pointer to a buffer where the data is to be sourced from - * \param DataLen Length of the data to send - * \param Channel Channel information structure containing the destination channel's information, NULL to send - * to the remote device's signalling channel + * \param[in] Data Pointer to a buffer where the data is to be sourced from + * \param[in] DataLen Length of the data to send + * \param[in] Channel Channel information structure containing the destination channel's information, NULL to send + * to the remote device's signalling channel * * \return A value from the \ref BT_SendPacket_ErrorCodes_t enum */ -uint8_t Bluetooth_SendPacket(void* Data, uint16_t DataLen, Bluetooth_Channel_t* Channel) +uint8_t Bluetooth_SendPacket(void* Data, const uint16_t DataLen, Bluetooth_Channel_t* const Channel) { BT_ACL_Header_t ACLPacketHeader; BT_DataPacket_Header_t DataHeader; @@ -230,8 +237,8 @@ uint8_t Bluetooth_SendPacket(void* Data, uint16_t DataLen, Bluetooth_Channel_t* Pipe_Freeze(); - BT_ACL_DEBUG(2, "", NULL); - BT_ACL_DEBUG(2, "Packet Sent", NULL); + BT_ACL_DEBUG(2, ""); + BT_ACL_DEBUG(2, "Packet Sent"); BT_ACL_DEBUG(2, "-- Connection Handle: 0x%04X", (ACLPacketHeader.ConnectionHandle & 0x0FFF)); BT_ACL_DEBUG(2, "-- Data Length: 0x%04X", ACLPacketHeader.DataLength); BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", DataHeader.DestinationChannel); @@ -247,11 +254,11 @@ uint8_t Bluetooth_SendPacket(void* Data, uint16_t DataLen, Bluetooth_Channel_t* * repeatedly called. The returned channel is unusable by the user application until its State * element has progressed to the Open state. * - * \param PSM PSM of the service that the channel is to be opened for + * \param[in] PSM PSM of the service that the channel is to be opened for * * \return Pointer to the channel information structure of the opened channel, or NULL if no free channels */ -Bluetooth_Channel_t* Bluetooth_OpenChannel(uint16_t PSM) +Bluetooth_Channel_t* Bluetooth_OpenChannel(const uint16_t PSM) { Bluetooth_Channel_t* ChannelData = NULL; @@ -296,7 +303,7 @@ Bluetooth_Channel_t* Bluetooth_OpenChannel(uint16_t PSM) Bluetooth_SendPacket(&PacketData, sizeof(PacketData), NULL); - BT_ACL_DEBUG(1, ">> L2CAP Connection Request", NULL); + BT_ACL_DEBUG(1, ">> L2CAP Connection Request"); BT_ACL_DEBUG(2, "-- PSM 0x%04X", PacketData.ConnectionRequest.PSM); BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", PacketData.ConnectionRequest.SourceChannel); @@ -311,9 +318,9 @@ Bluetooth_Channel_t* Bluetooth_OpenChannel(uint16_t PSM) * returned channel is unusable by the user application upon return however the channel is not completely * closed until its State element has progressed to the Closed state. * - * \param Channel Channel information structure of the channel to close + * \param[in,out] Channel Channel information structure of the channel to close */ -void Bluetooth_CloseChannel(Bluetooth_Channel_t* Channel) +void Bluetooth_CloseChannel(Bluetooth_Channel_t* const Channel) { /* Don't try to close a non-existing or already closed channel */ if ((Channel == NULL) || (Channel->State == Channel_Closed)) @@ -339,16 +346,16 @@ void Bluetooth_CloseChannel(Bluetooth_Channel_t* Channel) Bluetooth_SendPacket(&PacketData, sizeof(PacketData), NULL); - BT_ACL_DEBUG(1, ">> L2CAP Disconnection Request", NULL); + BT_ACL_DEBUG(1, ">> L2CAP Disconnection Request"); BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", PacketData.DisconnectionRequest.DestinationChannel); BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", PacketData.DisconnectionRequest.SourceChannel); } /** Internal Bluetooth stack Signal Command processing routine for a Connection Request command. * - * \param SignalCommandHeader Pointer to the start of the received packet's Signal Command header + * \param[in] SignalCommandHeader Pointer to the start of the received packet's Signal Command header */ -static inline void Bluetooth_Signal_ConnectionReq(BT_Signal_Header_t* SignalCommandHeader) +static inline void Bluetooth_Signal_ConnectionReq(const BT_Signal_Header_t* const SignalCommandHeader) { BT_Signal_ConnectionReq_t ConnectionRequest; @@ -357,12 +364,12 @@ static inline void Bluetooth_Signal_ConnectionReq(BT_Signal_Header_t* SignalComm Pipe_ClearIN(); Pipe_Freeze(); - BT_ACL_DEBUG(1, "<< L2CAP Connection Request", NULL); + BT_ACL_DEBUG(1, "<< L2CAP Connection Request"); BT_ACL_DEBUG(2, "-- PSM: 0x%04X", ConnectionRequest.PSM); BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", ConnectionRequest.SourceChannel); /* Try to retrieve the existing channel's information structure if it exists */ - Bluetooth_Channel_t* ChannelData = Bluetooth_GetChannelData(ConnectionRequest.SourceChannel, true); + Bluetooth_Channel_t* ChannelData = Bluetooth_GetChannelData(ConnectionRequest.SourceChannel, CHANNEL_SEARCH_REMOTENUMBER); /* If an existing channel item with the correct remote channel number was not found, find a free channel entry */ if (ChannelData == NULL) @@ -381,14 +388,26 @@ static inline void Bluetooth_Signal_ConnectionReq(BT_Signal_Header_t* SignalComm } } } + + uint8_t ChannelStatus = BT_CONNECTION_REFUSED_RESOURCES; /* Reset the channel item contents only if a channel entry was found for it */ if (ChannelData != NULL) { - ChannelData->RemoteNumber = ConnectionRequest.SourceChannel; - ChannelData->PSM = ConnectionRequest.PSM; - ChannelData->LocalMTU = MAXIMUM_CHANNEL_MTU; - ChannelData->State = Channel_Config_WaitConfig; + /* Check if the user application will allow the connection based on its PSM */ + if (Bluetooth_ChannelConnectionRequest(ConnectionRequest.PSM)) + { + ChannelData->RemoteNumber = ConnectionRequest.SourceChannel; + ChannelData->PSM = ConnectionRequest.PSM; + ChannelData->LocalMTU = MAXIMUM_CHANNEL_MTU; + ChannelData->State = Channel_Config_WaitConfig; + + ChannelStatus = BT_CONNECTION_SUCCESSFUL; + } + else + { + ChannelStatus = BT_CONNECTION_REFUSED_PSM; + } } struct @@ -405,13 +424,12 @@ static inline void Bluetooth_Signal_ConnectionReq(BT_Signal_Header_t* SignalComm /* Fill out the Connection Response in the response packet */ ResponsePacket.ConnectionResponse.DestinationChannel = ChannelData->LocalNumber; ResponsePacket.ConnectionResponse.SourceChannel = ChannelData->RemoteNumber; - ResponsePacket.ConnectionResponse.Result = (ChannelData == NULL) ? BT_CONNECTION_REFUSED_RESOURCES : - BT_CONNECTION_SUCCESSFUL; + ResponsePacket.ConnectionResponse.Result = ChannelStatus; ResponsePacket.ConnectionResponse.Status = 0x00; Bluetooth_SendPacket(&ResponsePacket, sizeof(ResponsePacket), NULL); - BT_ACL_DEBUG(1, ">> L2CAP Connection Response", NULL); + BT_ACL_DEBUG(1, ">> L2CAP Connection Response"); BT_ACL_DEBUG(2, "-- Result: 0x%02X", ResponsePacket.ConnectionResponse.Result); BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", ResponsePacket.ConnectionResponse.DestinationChannel); BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", ResponsePacket.ConnectionResponse.SourceChannel); @@ -419,9 +437,9 @@ static inline void Bluetooth_Signal_ConnectionReq(BT_Signal_Header_t* SignalComm /** Internal Bluetooth stack Signal Command processing routine for a Connection Response command. * - * \param SignalCommandHeader Pointer to the start of the received packet's Signal Command header + * \param[in] SignalCommandHeader Pointer to the start of the received packet's Signal Command header */ -static inline void Bluetooth_Signal_ConnectionResp(BT_Signal_Header_t* SignalCommandHeader) +static inline void Bluetooth_Signal_ConnectionResp(const BT_Signal_Header_t* const SignalCommandHeader) { BT_Signal_ConnectionResp_t ConnectionResponse; @@ -430,13 +448,13 @@ static inline void Bluetooth_Signal_ConnectionResp(BT_Signal_Header_t* SignalCom Pipe_ClearIN(); Pipe_Freeze(); - BT_ACL_DEBUG(1, "<< L2CAP Connection Response", NULL); + BT_ACL_DEBUG(1, "<< L2CAP Connection Response"); BT_ACL_DEBUG(2, "-- Result: 0x%02X", ConnectionResponse.Result); BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", ConnectionResponse.SourceChannel); BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", ConnectionResponse.DestinationChannel); /* Search for the referenced channel in the channel information list */ - Bluetooth_Channel_t* ChannelData = Bluetooth_GetChannelData(ConnectionResponse.SourceChannel, false); + Bluetooth_Channel_t* ChannelData = Bluetooth_GetChannelData(ConnectionResponse.SourceChannel, CHANNEL_SEARCH_LOCALNUMBER); /* Only progress if the referenced channel data was found */ if (ChannelData != NULL) @@ -450,9 +468,9 @@ static inline void Bluetooth_Signal_ConnectionResp(BT_Signal_Header_t* SignalCom /** Internal Bluetooth stack Signal Command processing routine for a Configuration Request command. * - * \param SignalCommandHeader Pointer to the start of the received packet's Signal Command header + * \param[in] SignalCommandHeader Pointer to the start of the received packet's Signal Command header */ -static inline void Bluetooth_Signal_ConfigurationReq(BT_Signal_Header_t* SignalCommandHeader) +static inline void Bluetooth_Signal_ConfigurationReq(const BT_Signal_Header_t* const SignalCommandHeader) { BT_Signal_ConfigurationReq_t ConfigurationRequest; @@ -467,9 +485,9 @@ static inline void Bluetooth_Signal_ConfigurationReq(BT_Signal_Header_t* SignalC Pipe_Freeze(); /* Search for the referenced channel in the channel information list */ - Bluetooth_Channel_t* ChannelData = Bluetooth_GetChannelData(ConfigurationRequest.DestinationChannel, false); + Bluetooth_Channel_t* ChannelData = Bluetooth_GetChannelData(ConfigurationRequest.DestinationChannel, CHANNEL_SEARCH_LOCALNUMBER); - BT_ACL_DEBUG(1, "<< L2CAP Configuration Request", NULL); + BT_ACL_DEBUG(1, "<< L2CAP Configuration Request"); BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", ConfigurationRequest.DestinationChannel); BT_ACL_DEBUG(2, "-- Remote MTU: 0x%04X", ChannelData->RemoteMTU); BT_ACL_DEBUG(2, "-- Options Len: 0x%04X", OptionsLen); @@ -482,17 +500,17 @@ static inline void Bluetooth_Signal_ConfigurationReq(BT_Signal_Header_t* SignalC while (OptionPos < OptionsLen) { BT_Config_Option_Header_t* OptionHeader = (BT_Config_Option_Header_t*)&Options[OptionPos]; - void* OptionData = &Options[OptionPos + sizeof(*OptionHeader)]; + void* OptionData = &Options[OptionPos + sizeof(BT_Config_Option_Header_t)]; BT_ACL_DEBUG(2, "-- Option Type: 0x%04X", OptionHeader->Type); - BT_ACL_DEBUG(2, "-- Option Length: 0x%04X", (sizeof(*OptionHeader) + OptionHeader->Length)); + BT_ACL_DEBUG(2, "-- Option Length: 0x%04X", (sizeof(BT_Config_Option_Header_t) + OptionHeader->Length)); /* Store the remote MTU option's value if present */ if (OptionHeader->Type == BT_CONFIG_OPTION_MTU) ChannelData->RemoteMTU = *((uint16_t*)OptionData); /* Progress to the next option in the packet */ - OptionPos += (sizeof(*OptionHeader) + OptionHeader->Length); + OptionPos += (sizeof(BT_Config_Option_Header_t) + OptionHeader->Length); } } @@ -530,16 +548,16 @@ static inline void Bluetooth_Signal_ConfigurationReq(BT_Signal_Header_t* SignalC } } - BT_ACL_DEBUG(1, ">> L2CAP Configuration Response", NULL); + BT_ACL_DEBUG(1, ">> L2CAP Configuration Response"); BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", ResponsePacket.ConfigurationResponse.SourceChannel); BT_ACL_DEBUG(2, "-- Result: 0x%02X", ResponsePacket.ConfigurationResponse.Result); } /** Internal Bluetooth stack Signal Command processing routine for a Configuration Response command. * - * \param SignalCommandHeader Pointer to the start of the received packet's Signal Command header + * \param[in] SignalCommandHeader Pointer to the start of the received packet's Signal Command header */ -static inline void Bluetooth_Signal_ConfigurationResp(BT_Signal_Header_t* SignalCommandHeader) +static inline void Bluetooth_Signal_ConfigurationResp(const BT_Signal_Header_t* const SignalCommandHeader) { BT_Signal_ConfigurationResp_t ConfigurationResponse; @@ -548,12 +566,12 @@ static inline void Bluetooth_Signal_ConfigurationResp(BT_Signal_Header_t* Signal Pipe_ClearIN(); Pipe_Freeze(); - BT_ACL_DEBUG(1, "<< L2CAP Configuration Response", NULL); + BT_ACL_DEBUG(1, "<< L2CAP Configuration Response"); BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", ConfigurationResponse.SourceChannel); BT_ACL_DEBUG(2, "-- Result: 0x%02X", ConfigurationResponse.Result); /* Search for the referenced channel in the channel information list */ - Bluetooth_Channel_t* ChannelData = Bluetooth_GetChannelData(ConfigurationResponse.SourceChannel, true); + Bluetooth_Channel_t* ChannelData = Bluetooth_GetChannelData(ConfigurationResponse.SourceChannel, CHANNEL_SEARCH_REMOTENUMBER); /* Only update the channel's state if it was found in the channel list */ if (ChannelData != NULL) @@ -581,15 +599,15 @@ static inline void Bluetooth_Signal_ConfigurationResp(BT_Signal_Header_t* Signal /** Internal Bluetooth stack Signal Command processing routine for a Disconnection Request command. * - * \param SignalCommandHeader Pointer to the start of the received packet's Signal Command header + * \param[in] SignalCommandHeader Pointer to the start of the received packet's Signal Command header */ -static inline void Bluetooth_Signal_DisconnectionReq(BT_Signal_Header_t* SignalCommandHeader) +static inline void Bluetooth_Signal_DisconnectionReq(const BT_Signal_Header_t* const SignalCommandHeader) { BT_Signal_DisconnectionReq_t DisconnectionRequest; Pipe_Read_Stream_LE(&DisconnectionRequest, sizeof(DisconnectionRequest)); - BT_ACL_DEBUG(1, "<< L2CAP Disconnection Request", NULL); + BT_ACL_DEBUG(1, "<< L2CAP Disconnection Request"); BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", DisconnectionRequest.DestinationChannel); BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", DisconnectionRequest.SourceChannel); @@ -597,7 +615,7 @@ static inline void Bluetooth_Signal_DisconnectionReq(BT_Signal_Header_t* SignalC Pipe_Freeze(); /* Search for the referenced channel in the channel information list */ - Bluetooth_Channel_t* ChannelData = Bluetooth_GetChannelData(DisconnectionRequest.SourceChannel, true); + Bluetooth_Channel_t* ChannelData = Bluetooth_GetChannelData(DisconnectionRequest.SourceChannel, CHANNEL_SEARCH_REMOTENUMBER); struct { @@ -620,22 +638,22 @@ static inline void Bluetooth_Signal_DisconnectionReq(BT_Signal_Header_t* SignalC if (ChannelData != NULL) ChannelData->State = Channel_Closed; - BT_ACL_DEBUG(1, ">> L2CAP Disconnection Response", NULL); + BT_ACL_DEBUG(1, ">> L2CAP Disconnection Response"); BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", ResponsePacket.DisconnectionResponse.SourceChannel); BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", ResponsePacket.DisconnectionResponse.DestinationChannel); } /** Internal Bluetooth stack Signal Command processing routine for a Disconnection Response command. * - * \param SignalCommandHeader Pointer to the start of the received packet's Signal Command header + * \param[in] SignalCommandHeader Pointer to the start of the received packet's Signal Command header */ -static inline void Bluetooth_Signal_DisconnectionResp(BT_Signal_Header_t* SignalCommandHeader) +static inline void Bluetooth_Signal_DisconnectionResp(const BT_Signal_Header_t* const SignalCommandHeader) { BT_Signal_DisconnectionResp_t DisconnectionResponse; Pipe_Read_Stream_LE(&DisconnectionResponse, sizeof(DisconnectionResponse)); - BT_ACL_DEBUG(1, "<< L2CAP Disconnection Response", NULL); + BT_ACL_DEBUG(1, "<< L2CAP Disconnection Response"); BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", DisconnectionResponse.DestinationChannel); BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", DisconnectionResponse.SourceChannel); @@ -643,7 +661,7 @@ static inline void Bluetooth_Signal_DisconnectionResp(BT_Signal_Header_t* Signal Pipe_Freeze(); /* Search for the referenced channel in the channel information list */ - Bluetooth_Channel_t* ChannelData = Bluetooth_GetChannelData(DisconnectionResponse.SourceChannel, true); + Bluetooth_Channel_t* ChannelData = Bluetooth_GetChannelData(DisconnectionResponse.SourceChannel, CHANNEL_SEARCH_REMOTENUMBER); /* If the channel was found in the channel list, close it */ if (ChannelData != NULL) @@ -652,11 +670,11 @@ static inline void Bluetooth_Signal_DisconnectionResp(BT_Signal_Header_t* Signal /** Internal Bluetooth stack Signal Command processing routine for an Echo Request command. * - * \param SignalCommandHeader Pointer to the start of the received packet's Signal Command header + * \param[in] SignalCommandHeader Pointer to the start of the received packet's Signal Command header */ -static inline void Bluetooth_Signal_EchoReq(BT_Signal_Header_t* SignalCommandHeader) +static inline void Bluetooth_Signal_EchoReq(const BT_Signal_Header_t* const SignalCommandHeader) { - BT_ACL_DEBUG(1, "<< L2CAP Echo Request", NULL); + BT_ACL_DEBUG(1, "<< L2CAP Echo Request"); Pipe_ClearIN(); Pipe_Freeze(); @@ -673,20 +691,20 @@ static inline void Bluetooth_Signal_EchoReq(BT_Signal_Header_t* SignalCommandHea Bluetooth_SendPacket(&ResponsePacket, sizeof(ResponsePacket), NULL); - BT_ACL_DEBUG(1, ">> L2CAP Echo Response", NULL); + BT_ACL_DEBUG(1, ">> L2CAP Echo Response"); } /** Internal Bluetooth stack Signal Command processing routine for an Information Request command. * - * \param SignalCommandHeader Pointer to the start of the received packet's Signal Command header + * \param[in] SignalCommandHeader Pointer to the start of the received packet's Signal Command header */ -static inline void Bluetooth_Signal_InformationReq(BT_Signal_Header_t* SignalCommandHeader) +static inline void Bluetooth_Signal_InformationReq(const BT_Signal_Header_t* const SignalCommandHeader) { BT_Signal_InformationReq_t InformationRequest; Pipe_Read_Stream_LE(&InformationRequest, sizeof(InformationRequest)); - BT_ACL_DEBUG(1, "<< L2CAP Information Request", NULL); + BT_ACL_DEBUG(1, "<< L2CAP Information Request"); BT_ACL_DEBUG(2, "-- Info Type: 0x%04X", InformationRequest.InfoType); Pipe_ClearIN(); @@ -733,6 +751,6 @@ static inline void Bluetooth_Signal_InformationReq(BT_Signal_Header_t* SignalCom Bluetooth_SendPacket(&ResponsePacket, (sizeof(ResponsePacket) - sizeof(ResponsePacket.Data) + DataLen), NULL); - BT_ACL_DEBUG(1, ">> L2CAP Information Response", NULL); + BT_ACL_DEBUG(1, ">> L2CAP Information Response"); BT_ACL_DEBUG(2, "-- Result: 0x%02X", ResponsePacket.InformationResponse.Result); }