Fixed HID Device Class Driver not allocating a temporary buffer when the host request...
[pub/lufa.git] / Demos / Host / Incomplete / BluetoothHost / Lib / BluetoothACLPackets.c
index 87ef652..1a8cf06 100644 (file)
@@ -90,7 +90,7 @@ void Bluetooth_ACLTask(void)
 \r
                        Bluetooth_SendPacket(&PacketData, sizeof(PacketData), NULL);\r
                        \r
-                       BT_ACL_DEBUG(1, ">> L2CAP Configuration Request", NULL);\r
+                       BT_ACL_DEBUG(1, ">> L2CAP Configuration Request");\r
                        BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", PacketData.ConfigurationRequest.DestinationChannel);\r
                }\r
        }\r
@@ -118,8 +118,8 @@ static void Bluetooth_ProcessIncommingACLPackets(void)
        Pipe_Read_Stream_LE(&ACLPacketHeader, sizeof(ACLPacketHeader));\r
        Pipe_Read_Stream_LE(&DataHeader, sizeof(DataHeader));\r
 \r
-       BT_ACL_DEBUG(2, "", NULL);\r
-       BT_ACL_DEBUG(2, "Packet Received", NULL);\r
+       BT_ACL_DEBUG(2, "");\r
+       BT_ACL_DEBUG(2, "Packet Received");\r
        BT_ACL_DEBUG(2, "-- Connection Handle: 0x%04X", (ACLPacketHeader.ConnectionHandle & 0x0FFF));\r
        BT_ACL_DEBUG(2, "-- Data Length: 0x%04X", ACLPacketHeader.DataLength);\r
        BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", DataHeader.DestinationChannel);\r
@@ -160,7 +160,7 @@ static void Bluetooth_ProcessIncommingACLPackets(void)
                                Bluetooth_Signal_InformationReq(&SignalCommandHeader);\r
                                break;\r
                        case BT_SIGNAL_COMMAND_REJECT:\r
-                               BT_ACL_DEBUG(1, "<< Command Reject", NULL);\r
+                               BT_ACL_DEBUG(1, "<< Command Reject");\r
                                \r
                                uint16_t RejectReason;\r
                                Pipe_Read_Stream_LE(&RejectReason, sizeof(RejectReason));\r
@@ -230,8 +230,8 @@ uint8_t Bluetooth_SendPacket(void* Data, const uint16_t DataLen, Bluetooth_Chann
        \r
        Pipe_Freeze();\r
        \r
-       BT_ACL_DEBUG(2, "", NULL);\r
-       BT_ACL_DEBUG(2, "Packet Sent", NULL);\r
+       BT_ACL_DEBUG(2, "");\r
+       BT_ACL_DEBUG(2, "Packet Sent");\r
        BT_ACL_DEBUG(2, "-- Connection Handle: 0x%04X", (ACLPacketHeader.ConnectionHandle & 0x0FFF));\r
        BT_ACL_DEBUG(2, "-- Data Length: 0x%04X", ACLPacketHeader.DataLength);\r
        BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", DataHeader.DestinationChannel);\r
@@ -296,7 +296,7 @@ Bluetooth_Channel_t* Bluetooth_OpenChannel(const uint16_t PSM)
        \r
        Bluetooth_SendPacket(&PacketData, sizeof(PacketData), NULL);\r
 \r
-       BT_ACL_DEBUG(1, ">> L2CAP Connection Request", NULL);\r
+       BT_ACL_DEBUG(1, ">> L2CAP Connection Request");\r
        BT_ACL_DEBUG(2, "-- PSM 0x%04X", PacketData.ConnectionRequest.PSM);\r
        BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", PacketData.ConnectionRequest.SourceChannel);\r
 \r
@@ -339,7 +339,7 @@ void Bluetooth_CloseChannel(Bluetooth_Channel_t* const Channel)
 \r
        Bluetooth_SendPacket(&PacketData, sizeof(PacketData), NULL);\r
        \r
-       BT_ACL_DEBUG(1, ">> L2CAP Disconnection Request", NULL);\r
+       BT_ACL_DEBUG(1, ">> L2CAP Disconnection Request");\r
        BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", PacketData.DisconnectionRequest.DestinationChannel);  \r
        BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", PacketData.DisconnectionRequest.SourceChannel);    \r
 }\r
@@ -357,7 +357,7 @@ static inline void Bluetooth_Signal_ConnectionReq(const BT_Signal_Header_t* cons
        Pipe_ClearIN();\r
        Pipe_Freeze();\r
 \r
-       BT_ACL_DEBUG(1, "<< L2CAP Connection Request", NULL);\r
+       BT_ACL_DEBUG(1, "<< L2CAP Connection Request");\r
        BT_ACL_DEBUG(2, "-- PSM: 0x%04X", ConnectionRequest.PSM);\r
        BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", ConnectionRequest.SourceChannel);\r
        \r
@@ -422,7 +422,7 @@ static inline void Bluetooth_Signal_ConnectionReq(const BT_Signal_Header_t* cons
        \r
        Bluetooth_SendPacket(&ResponsePacket, sizeof(ResponsePacket), NULL);\r
 \r
-       BT_ACL_DEBUG(1, ">> L2CAP Connection Response", NULL);\r
+       BT_ACL_DEBUG(1, ">> L2CAP Connection Response");\r
        BT_ACL_DEBUG(2, "-- Result: 0x%02X", ResponsePacket.ConnectionResponse.Result);\r
        BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", ResponsePacket.ConnectionResponse.DestinationChannel);\r
        BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", ResponsePacket.ConnectionResponse.SourceChannel);\r
@@ -441,7 +441,7 @@ static inline void Bluetooth_Signal_ConnectionResp(const BT_Signal_Header_t* con
        Pipe_ClearIN();\r
        Pipe_Freeze();\r
 \r
-       BT_ACL_DEBUG(1, "<< L2CAP Connection Response", NULL);\r
+       BT_ACL_DEBUG(1, "<< L2CAP Connection Response");\r
        BT_ACL_DEBUG(2, "-- Result: 0x%02X", ConnectionResponse.Result);        \r
        BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", ConnectionResponse.SourceChannel); \r
        BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", ConnectionResponse.DestinationChannel);       \r
@@ -480,7 +480,7 @@ static inline void Bluetooth_Signal_ConfigurationReq(const BT_Signal_Header_t* c
        /* Search for the referenced channel in the channel information list */\r
        Bluetooth_Channel_t* ChannelData = Bluetooth_GetChannelData(ConfigurationRequest.DestinationChannel, false);\r
 \r
-       BT_ACL_DEBUG(1, "<< L2CAP Configuration Request", NULL);\r
+       BT_ACL_DEBUG(1, "<< L2CAP Configuration Request");\r
        BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", ConfigurationRequest.DestinationChannel);\r
        BT_ACL_DEBUG(2, "-- Remote MTU: 0x%04X", ChannelData->RemoteMTU);\r
        BT_ACL_DEBUG(2, "-- Options Len: 0x%04X", OptionsLen);\r
@@ -541,7 +541,7 @@ static inline void Bluetooth_Signal_ConfigurationReq(const BT_Signal_Header_t* c
                }\r
        }\r
 \r
-       BT_ACL_DEBUG(1, ">> L2CAP Configuration Response", NULL);\r
+       BT_ACL_DEBUG(1, ">> L2CAP Configuration Response");\r
        BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", ResponsePacket.ConfigurationResponse.SourceChannel);\r
        BT_ACL_DEBUG(2, "-- Result: 0x%02X", ResponsePacket.ConfigurationResponse.Result);\r
 }\r
@@ -559,7 +559,7 @@ static inline void Bluetooth_Signal_ConfigurationResp(const BT_Signal_Header_t*
        Pipe_ClearIN();\r
        Pipe_Freeze();\r
        \r
-       BT_ACL_DEBUG(1, "<< L2CAP Configuration Response", NULL);\r
+       BT_ACL_DEBUG(1, "<< L2CAP Configuration Response");\r
        BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", ConfigurationResponse.SourceChannel);\r
        BT_ACL_DEBUG(2, "-- Result: 0x%02X", ConfigurationResponse.Result);\r
 \r
@@ -600,7 +600,7 @@ static inline void Bluetooth_Signal_DisconnectionReq(const BT_Signal_Header_t* c
        \r
        Pipe_Read_Stream_LE(&DisconnectionRequest, sizeof(DisconnectionRequest));\r
 \r
-       BT_ACL_DEBUG(1, "<< L2CAP Disconnection Request", NULL);\r
+       BT_ACL_DEBUG(1, "<< L2CAP Disconnection Request");\r
        BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", DisconnectionRequest.DestinationChannel);\r
        BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", DisconnectionRequest.SourceChannel);\r
        \r
@@ -631,7 +631,7 @@ static inline void Bluetooth_Signal_DisconnectionReq(const BT_Signal_Header_t* c
        if (ChannelData != NULL)\r
          ChannelData->State = Channel_Closed;\r
 \r
-       BT_ACL_DEBUG(1, ">> L2CAP Disconnection Response", NULL);\r
+       BT_ACL_DEBUG(1, ">> L2CAP Disconnection Response");\r
        BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", ResponsePacket.DisconnectionResponse.SourceChannel);\r
        BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", ResponsePacket.DisconnectionResponse.DestinationChannel);\r
 }\r
@@ -646,7 +646,7 @@ static inline void Bluetooth_Signal_DisconnectionResp(const BT_Signal_Header_t*
        \r
        Pipe_Read_Stream_LE(&DisconnectionResponse, sizeof(DisconnectionResponse));\r
 \r
-       BT_ACL_DEBUG(1, "<< L2CAP Disconnection Response", NULL);\r
+       BT_ACL_DEBUG(1, "<< L2CAP Disconnection Response");\r
        BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", DisconnectionResponse.DestinationChannel);\r
        BT_ACL_DEBUG(2, "-- Source Channel: 0x%04X", DisconnectionResponse.SourceChannel);\r
        \r
@@ -667,7 +667,7 @@ static inline void Bluetooth_Signal_DisconnectionResp(const BT_Signal_Header_t*
  */\r
 static inline void Bluetooth_Signal_EchoReq(const BT_Signal_Header_t* const SignalCommandHeader)\r
 {\r
-       BT_ACL_DEBUG(1, "<< L2CAP Echo Request", NULL);\r
+       BT_ACL_DEBUG(1, "<< L2CAP Echo Request");\r
        \r
        Pipe_ClearIN();\r
        Pipe_Freeze();\r
@@ -684,7 +684,7 @@ static inline void Bluetooth_Signal_EchoReq(const BT_Signal_Header_t* const Sign
        \r
        Bluetooth_SendPacket(&ResponsePacket, sizeof(ResponsePacket), NULL);\r
 \r
-       BT_ACL_DEBUG(1, ">> L2CAP Echo Response", NULL);\r
+       BT_ACL_DEBUG(1, ">> L2CAP Echo Response");\r
 }\r
 \r
 /** Internal Bluetooth stack Signal Command processing routine for an Information Request command.\r
@@ -697,7 +697,7 @@ static inline void Bluetooth_Signal_InformationReq(const BT_Signal_Header_t* con
 \r
        Pipe_Read_Stream_LE(&InformationRequest, sizeof(InformationRequest));\r
 \r
-       BT_ACL_DEBUG(1, "<< L2CAP Information Request", NULL);\r
+       BT_ACL_DEBUG(1, "<< L2CAP Information Request");\r
        BT_ACL_DEBUG(2, "-- Info Type: 0x%04X", InformationRequest.InfoType);\r
        \r
        Pipe_ClearIN();\r
@@ -744,6 +744,6 @@ static inline void Bluetooth_Signal_InformationReq(const BT_Signal_Header_t* con
        \r
        Bluetooth_SendPacket(&ResponsePacket, (sizeof(ResponsePacket) - sizeof(ResponsePacket.Data) + DataLen), NULL);\r
 \r
-       BT_ACL_DEBUG(1, ">> L2CAP Information Response", NULL); \r
+       BT_ACL_DEBUG(1, ">> L2CAP Information Response");       \r
        BT_ACL_DEBUG(2, "-- Result: 0x%02X", ResponsePacket.InformationResponse.Result);\r
 }\r