Fixed Pipe_IsEndpointBound() function not taking the endpoint's direction into account.
[pub/USBasp.git] / Demos / Host / Incomplete / BluetoothHost / Lib / BluetoothACLPackets.c
index d86b99d..3292a53 100644 (file)
@@ -1,21 +1,21 @@
 /*\r
              LUFA Library\r
 /*\r
              LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
+     Copyright (C) Dean Camera, 2010.\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
+  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, distribute, and sell this \r
+  software and its documentation for any purpose is hereby granted\r
+  without fee, provided that the above copyright notice appear in \r
+  all copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting \r
+  documentation, and that the name of the author not be used in \r
+  advertising or publicity pertaining to distribution of the \r
   software without specific, written prior permission.\r
 \r
   The author disclaim all warranties with regard to this\r
   software without specific, written prior permission.\r
 \r
   The author disclaim all warranties with regard to this\r
@@ -37,7 +37,7 @@ void Bluetooth_ProcessACLPackets(void)
        Bluetooth_DataPacket_Header_t DataHeader;\r
 \r
        Pipe_SelectPipe(BLUETOOTH_DATA_IN_PIPE);\r
        Bluetooth_DataPacket_Header_t DataHeader;\r
 \r
        Pipe_SelectPipe(BLUETOOTH_DATA_IN_PIPE);\r
-       Pipe_SetToken(PIPE_TOKEN_IN);\r
+       Pipe_SetPipeToken(PIPE_TOKEN_IN);\r
        Pipe_Unfreeze();\r
        \r
        if (!(Pipe_IsReadWriteAllowed()))\r
        Pipe_Unfreeze();\r
        \r
        if (!(Pipe_IsReadWriteAllowed()))\r
@@ -76,7 +76,7 @@ void Bluetooth_ProcessACLPackets(void)
                                Pipe_Freeze();\r
                                break;\r
                        default:\r
                                Pipe_Freeze();\r
                                break;\r
                        default:\r
-                               BT_DEBUG("(ACL) >> Unknown Signalling Command 0x%02X", SignalCommandHeader.Code);\r
+                               BT_DEBUG("(ACL) >> Unknown Signaling Command 0x%02X", SignalCommandHeader.Code);\r
                                        \r
                                Pipe_Discard_Stream(ACLPacketHeader.DataLength);\r
                                Pipe_ClearIN();         \r
                                        \r
                                Pipe_Discard_Stream(ACLPacketHeader.DataLength);\r
                                Pipe_ClearIN();         \r
@@ -116,7 +116,7 @@ static inline void Bluetooth_ProcessSignalPacket_ConnectionRequest(Bluetooth_ACL
        Pipe_ClearIN();\r
        Pipe_Freeze();\r
        Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE);\r
        Pipe_ClearIN();\r
        Pipe_Freeze();\r
        Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE);\r
-       Pipe_SetToken(PIPE_TOKEN_OUT);\r
+       Pipe_SetPipeToken(PIPE_TOKEN_OUT);\r
        Pipe_Unfreeze();\r
        \r
        Bluetooth_SignalCommand_ConnectionResponse_t ConnectionResponse;\r
        Pipe_Unfreeze();\r
        \r
        Bluetooth_SignalCommand_ConnectionResponse_t ConnectionResponse;\r
@@ -167,7 +167,7 @@ static inline void Bluetooth_ProcessSignalPacket_ConfigurationRequest(Bluetooth_
        Pipe_ClearIN();\r
        Pipe_Freeze();\r
        Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE);\r
        Pipe_ClearIN();\r
        Pipe_Freeze();\r
        Pipe_SelectPipe(BLUETOOTH_DATA_OUT_PIPE);\r
-       Pipe_SetToken(PIPE_TOKEN_OUT);\r
+       Pipe_SetPipeToken(PIPE_TOKEN_OUT);\r
        Pipe_Unfreeze();\r
        \r
        Bluetooth_SignalCommand_ConfigurationResponse_t ConfigurationResponse;\r
        Pipe_Unfreeze();\r
        \r
        Bluetooth_SignalCommand_ConfigurationResponse_t ConfigurationResponse;\r