Changed HIDParser to only zero out important values in the Parsed HID Report Item...
[pub/USBasp.git] / LUFA / Drivers / Peripheral / Serial.h
index 82cbcfc..bde1449 100644 (file)
@@ -41,7 +41,8 @@
  *    - LUFA/Drivers/Peripheral/Serial.c\r
  *\r
  *  \section Module Description\r
  *    - LUFA/Drivers/Peripheral/Serial.c\r
  *\r
  *  \section Module Description\r
- *  Functions, macros, variables, enums and types related to the setup of the USART for serial communications.\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
  *\r
  *  @{\r
  */\r
  *\r
  *  @{\r
  */\r
                                UBRR1  = (DoubleSpeed ? SERIAL_2X_UBBRVAL(BaudRate) : SERIAL_UBBRVAL(BaudRate));\r
                        }\r
 \r
                                UBRR1  = (DoubleSpeed ? SERIAL_2X_UBBRVAL(BaudRate) : SERIAL_UBBRVAL(BaudRate));\r
                        }\r
 \r
+                       /** Turns off the USART driver, disabling and returning used hardware to their default configuration. */\r
+                       static inline void Serial_ShutDown(void)\r
+                       {\r
+                               UCSR1A = 0;\r
+                               UCSR1B = 0;\r
+                               UCSR1C = 0;\r
+                               \r
+                               DDRD  &= ~(1 << 3);     \r
+                               PORTD &= ~(1 << 2);\r
+                               \r
+                               UBRR1  = 0;\r
+                       }\r
+                       \r
                        /** Transmits a given byte through the USART.\r
                         *\r
                         *  \param[in] DataByte  Byte to transmit through the USART\r
                        /** Transmits a given byte through the USART.\r
                         *\r
                         *  \param[in] DataByte  Byte to transmit through the USART\r