\r
/** \file\r
*\r
- * Driver for the USART subsystem on supported USB AVRs.\r
+ * ADC driver for the 8-bit AVRs.\r
+ *\r
+ * \note This file should not be included directly. It is automatically included as needed by the USART driver\r
+ * dispatch header located in LUFA/Drivers/Peripheral/Serial.h.\r
*/\r
\r
-/** \ingroup Group_PeripheralDrivers\r
- * @defgroup Group_Serial Serial USART Driver - LUFA/Drivers/Peripheral/Serial.h\r
+/** \ingroup Group_Serial\r
+ * @defgroup Group_Serial_AVR8 8-Bit AVR Serial Driver\r
*\r
- * \section Sec_Dependencies Module Source Dependencies\r
- * The following files must be built with any user project that uses this module:\r
- * - LUFA/Drivers/Peripheral/Serial.c\r
+ * Serial driver for the 8-bit AVRs.\r
*\r
- * \section Module Description\r
- * Hardware serial USART driver. This module provides an easy to use driver for\r
- * the setup of and transfer of data over the AVR's USART port.\r
+ * \note This file should not be included directly. It is automatically included as needed by the ADC driver\r
+ * dispatch header located in LUFA/Drivers/Peripheral/USART.h.\r
*\r
* @{\r
*/\r
\r
-#ifndef __SERIAL_H__\r
-#define __SERIAL_H__\r
+#ifndef __SERIAL_AVR8_H__\r
+#define __SERIAL_AVR8_H__\r
\r
/* Includes: */\r
#include <avr/io.h>\r
#include <avr/pgmspace.h>\r
#include <stdbool.h>\r
\r
- #include "../../Common/Common.h"\r
- #include "../Misc/TerminalCodes.h"\r
-\r
- /* Enable C linkage for C++ Compilers: */\r
- #if defined(__cplusplus)\r
- extern "C" {\r
+ /* Preprocessor Checks: */\r
+ #if !defined(__INCLUDE_FROM_SERIAL_H)\r
+ #error Do not include this file directly. Include LUFA/Drivers/Peripheral/Serial.h instead.\r
#endif\r
\r
/* Public Interface - May be used in end-application: */\r
#define Serial_IsCharReceived() ((UCSR1A & (1 << RXC1)) ? true : false)\r
#endif\r
\r
- /* Function Prototypes: */\r
- /** Transmits a given string located in program space (FLASH) through the USART.\r
- *\r
- * \param[in] FlashStringPtr Pointer to a string located in program space\r
- */\r
- void Serial_TxString_P(const char *FlashStringPtr) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
- /** Transmits a given string located in SRAM memory through the USART.\r
- *\r
- * \param[in] StringPtr Pointer to a string located in SRAM space\r
- */\r
- void Serial_TxString(const char *StringPtr) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
/* Inline Functions: */\r
/** Initializes the USART, ready for serial data transmission and reception. This initializes the interface to\r
* standard 8-bit, no parity, 1 stop bit settings suitable for most applications.\r
*\r
* \return Byte received from the USART\r
*/\r
- static inline char Serial_RxByte(void)\r
+ static inline uint8_t Serial_RxByte(void)\r
{\r
while (!(UCSR1A & (1 << RXC1)));\r
return UDR1; \r