Add bluetooth channel connection callback to the incomplete BluetoothHost demo.
[pub/USBasp.git] / LUFA / Drivers / USB / LowLevel / Pipe.h
index 3e25d49..c16822b 100644 (file)
   this software.\r
 */\r
  \r
+/** \file\r
+ *  \brief USB host pipe management definitions.\r
+ *\r
+ *  This file contains structures, function prototypes and macros related to the management of the device's\r
+ *  data pipes when the library is initialized in USB host mode.\r
+ *\r
+ *  \note This file should not be included directly. It is automatically included as needed by the USB driver\r
+ *        dispatch header located in LUFA/Drivers/USB/USB.h.\r
+ */ \r
+\r
 /** \ingroup Group_USB\r
  *  @defgroup Group_PipeManagement Pipe Management\r
  *\r
 \r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
-                       #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.\r
+                       #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
                #endif\r
                \r
        /* Public Interface - May be used in end-application: */\r
 \r
                                #define Pipe_IsSETUPSent()             ((UPINTX & (1 << TXSTPI)) ? true : false)\r
 \r
-                               #define Pipe_ClearIN()                 MACROS{ uint8_t Temp = UPINTX; UPINTX = (Temp & ~(1 << RXINI)); \\r
-                                                                              UPINTX = (Temp & ~(1 << FIFOCON)); }MACROE\r
+                               #define Pipe_ClearIN()                 MACROS{ UPINTX &= ~((1 << RXINI) | (1 << FIFOCON)); }MACROE\r
 \r
-                               #define Pipe_ClearOUT()                MACROS{ uint8_t Temp = UPINTX; UPINTX = (Temp & ~(1 << TXOUTI)); \\r
-                                                                              UPINTX = (Temp & ~(1 << FIFOCON)); }MACROE\r
+                               #define Pipe_ClearOUT()                MACROS{ UPINTX &= ~((1 << TXOUTI) | (1 << FIFOCON)); }MACROE\r
                                \r
-                               #define Pipe_ClearSETUP()              MACROS{ uint8_t Temp = UPINTX; UPINTX = (Temp & ~(1 << TXSTPI)); \\r
-                                                                              UPINTX = (Temp & ~(1 << FIFOCON)); }MACROE\r
+                               #define Pipe_ClearSETUP()              MACROS{ UPINTX &= ~((1 << TXSTPI) | (1 << FIFOCON)); }MACROE\r
 \r
                                #define Pipe_IsNAKReceived()           ((UPINTX & (1 << NAKEDI)) ? true : false)\r
 \r
                         *  \ref Pipe_SetFiniteINRequests().\r
                         *\r
                         *  \note The default control pipe does not have to be manually configured, as it is automatically\r
-                        *  configured by the library internally.\r
+                        *        configured by the library internally.\r
+                        *        \n\n\r
                         *\r
                         *  \note This routine will select the specified pipe, and the pipe will remain selected once the\r
                         *        routine completes regardless of if the pipe configuration succeeds.\r