X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/5712b8dff669dc1947cd7d6f34f13eb9fe6a8d0a..a504a3a010ec2441dda0209f195492fb36e7c97b:/LUFA/Drivers/Peripheral/Serial.h?ds=sidebyside diff --git a/LUFA/Drivers/Peripheral/Serial.h b/LUFA/Drivers/Peripheral/Serial.h index d83761f3f..a50456b37 100644 --- a/LUFA/Drivers/Peripheral/Serial.h +++ b/LUFA/Drivers/Peripheral/Serial.h @@ -33,9 +33,14 @@ * Driver for the USART subsystem on supported USB AVRs. */ -/** \ingroup Group_SubsystemDrivers +/** \ingroup Group_PeripheralDrivers * @defgroup Group_Serial Serial USART Driver - LUFA/Drivers/Peripheral/Serial.h * + * \section Sec_Dependencies Module Source Dependencies + * The following files must be built with any user project that uses this module: + * - LUFA/Drivers/Peripheral/Serial.c + * + * \section Module Description * Functions, macros, variables, enums and types related to the setup of the USART for serial communications. * * @{ @@ -59,11 +64,6 @@ /* Public Interface - May be used in end-application: */ /* Macros: */ - /** Indicates whether a character has been received through the USART - boolean false if no character - * has been received, or non-zero if a character is waiting to be read from the reception buffer. - */ - #define Serial_IsCharReceived() ((UCSR1A & (1 << RXC1)) ? true : false) - /** Macro for calculating the baud value from a given baud rate when the U2X (double speed) bit is * not set. */ @@ -74,6 +74,17 @@ */ #define SERIAL_2X_UBBRVAL(baud) (((F_CPU / 8) / baud) - 1) + /* Pseudo-Function Macros: */ + #if defined(__DOXYGEN__) + /** Indicates whether a character has been received through the USART. + * + * \return Boolean true if a character has been received, false otherwise + */ + static inline bool Serial_IsCharReceived(void); + #else + #define Serial_IsCharReceived() ((UCSR1A & (1 << RXC1)) ? true : false) + #endif + /* Function Prototypes: */ /** Initializes the USART, ready for serial data transmission and reception. *