Convert over internal pseudo-function macros to true inline functions for added type...
[pub/USBasp.git] / LUFA / Drivers / Peripheral / AVRU4U6U7 / TWI.h
index 8b289fb..e2c3d6a 100644 (file)
                #endif
 
        /* Public Interface - May be used in end-application: */
-               /* Pseudo-Function Macros: */
-                       #if defined(__DOXYGEN__)
-                               /** Initializes the TWI hardware into master mode, ready for data transmission and reception. This must be
-                                *  before any other TWI operations.
-                                */
-                               static inline void TWI_Init(void);
-                               
-                               /** Turns off the TWI driver hardware. If this is called, any further TWI operations will require a call to
-                                *  \ref TWI_Init() before the TWI can be used again.
-                                */                             
-                               static inline void TWI_ShutDown(void);
-                       #else
-                               #define TWI_Init()        MACROS{ TWCR |=  (1 << TWEN); }MACROE
-                               #define TWI_ShutDown()    MACROS{ TWCR &= ~(1 << TWEN); }MACROE
-                       #endif
-
                /* Inline Functions: */
+                       /** Initializes the TWI hardware into master mode, ready for data transmission and reception. This must be
+                        *  before any other TWI operations.
+                        */
+                       static inline void TWI_Init(void) ATTR_ALWAYS_INLINE;
+                       static inline void TWI_Init(void)
+                       {
+                               TWCR |=  (1 << TWEN);
+                       }
+                       
+                       /** Turns off the TWI driver hardware. If this is called, any further TWI operations will require a call to
+                        *  \ref TWI_Init() before the TWI can be used again.
+                        */                             
+                       static inline void TWI_ShutDown(void) ATTR_ALWAYS_INLINE;
+                       static inline void TWI_ShutDown(void)
+                       {
+                               TWCR &= ~(1 << TWEN);
+                       }
+
                        /** Sends a TWI STOP onto the TWI bus, terminating communication with the currently addressed device. */
+                       static inline void TWI_StopTransmission(void) ATTR_ALWAYS_INLINE;
                        static inline void TWI_StopTransmission(void)
                        {
                                TWCR = ((1 << TWINT) | (1 << TWSTO) | (1 << TWEN));