Added V2Protocol handlers to the AVRISP project to enter/exit programming mode, and...
[pub/USBasp.git] / LUFA / Drivers / Peripheral / Serial.h
index e688cfc..bde1449 100644 (file)
                                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