\hypertarget{usart2_8h}{
\section{usart2.h File Reference}
\label{usart2_8h}\index{usart2.h@{usart2.h}}
}
{\tt \#include $<$avr/io.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{usart2_8h_4bfe3d8ca04b2d9d1ac05bc17fd6fe86}{USART0\_\-init} (uint16\_\-t baudval)
\begin{CompactList}\small\item\em Initialise USART0 and set baud rate. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_f0a2e795e45f3746e03e0f6e45d6a90e}{USART1\_\-init} (uint16\_\-t baudval)
\begin{CompactList}\small\item\em Initialise USART1 and set baud rate. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_dc9abd390e3809207e46650e9ac6a44d}{USART0\_\-transmit\_\-string} (const unsigned char $\ast$data)
\begin{CompactList}\small\item\em Transmit a string via USART0 at currently set baud rate. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_0c700b6fb1b1e334e9c16484284bad39}{USART1\_\-transmit\_\-string} (const unsigned char $\ast$data)
\begin{CompactList}\small\item\em Transmit a string via USART1 at currently set baud rate. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_cd65f891dae08d1c36311f35279f82cd}{USART0\_\-transmit} (unsigned char data)
\begin{CompactList}\small\item\em Transmit a character via USART0 at currently set baud rate. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_264927bab7aed29509ce608f621361ee}{USART1\_\-transmit} (unsigned char data)
\begin{CompactList}\small\item\em Transmit a character via USART1 at currently set baud rate. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_6bb4d94e5ff4cdad3f4dcc1df8944eb0}{USART0\_\-transmit\_\-uint8} (uint8\_\-t val)
\begin{CompactList}\small\item\em Transmit an 8 bit unsigned integer via USART0 at currently set baud rate. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_2b23af6851e45cadf220c46774e80e5c}{USART1\_\-transmit\_\-uint8} (uint8\_\-t val)
\begin{CompactList}\small\item\em Transmit an 8 bit unsigned integer via USART1 at currently set baud rate. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_c4fb0043cd69cb3f28dbc84d23653b90}{USART0\_\-transmit\_\-int8} (int8\_\-t val)
\begin{CompactList}\small\item\em Transmit an 8 bit signed integer via USART0 at currently set baud rate. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_25a22f9c7ddcd9a0515ebb458688d976}{USART1\_\-transmit\_\-int8} (int8\_\-t val)
\begin{CompactList}\small\item\em Transmit an 8 bit signed integer via USART1 at currently set baud rate. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_9e1fb07ae77c403bac7ddfe2ffb00568}{USART0\_\-transmit\_\-uint16} (uint16\_\-t val)
\begin{CompactList}\small\item\em Transmit a 16 bit unsigned integer via USART0 at currently set baud rate. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_10914147884978f70cb02f2e7b92045e}{USART1\_\-transmit\_\-uint16} (uint16\_\-t val)
\begin{CompactList}\small\item\em Transmit a 16 bit unsigned integer via USART1 at currently set baud rate. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_44b49161eded2e6b93431c88769da690}{USART0\_\-transmit\_\-int16} (int16\_\-t val)
\begin{CompactList}\small\item\em Transmit a 16 bit signed integer via USART0 at currently set baud rate. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_c4cb5bba775f9e4da9e9b9c36489a20e}{USART1\_\-transmit\_\-int16} (int16\_\-t val)
\begin{CompactList}\small\item\em Transmit a 16 bit signed integer via USART1 at currently set baud rate. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_c422cb3d2e78b464f7e07a21fed13555}{USART0\_\-transmit\_\-bcd} (uint8\_\-t val)
\begin{CompactList}\small\item\em Interpret an 8 bit unsigned integer as a BCD value and transmit it as two ASCII characters via USART0. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_f9a9d2010d31bf50a3903195cfa2319b}{USART1\_\-transmit\_\-bcd} (uint8\_\-t val)
\begin{CompactList}\small\item\em Interpret an 8 bit unsigned integer as a BCD value and transmit it as two ASCII characters via USART1. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_60c9a719ae1c2f5f5e67ae98c47e20b5}{USART0\_\-transmit\_\-bin} (uint8\_\-t val)
\begin{CompactList}\small\item\em Transmit an 8 bit unsigned integer as eight ASCII characters 0 or 1 via USART0. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_5fdc03b620141dc4d87a17ca0212dd99}{USART1\_\-transmit\_\-bin} (uint8\_\-t val)
\begin{CompactList}\small\item\em Transmit an 8 bit unsigned integer as eight ASCII characters 0 or 1 via USART1. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_eb117c824721590b09f900210f171743}{USART0\_\-transmit\_\-nibble} (uint8\_\-t nibble)
\begin{CompactList}\small\item\em Transmit the lowest 4 bits of an 8 bit unsigned integer as a single ASCII character 0-9 or A-F on USART0. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_81dd9f67df6b96791b99c27d72a0abb6}{USART1\_\-transmit\_\-nibble} (uint8\_\-t nibble)
\begin{CompactList}\small\item\em Transmit the lowest 4 bits of an 8 bit unsigned integer as a single ASCII character 0-9 or A-F on USART1. \item\end{CompactList}\item 
uint8\_\-t \hyperlink{usart2_8h_cb300701f92a7f33a09e3fa3a56ce90d}{USART0\_\-receive} (void)
\begin{CompactList}\small\item\em Receive an 8 bit value from USART0 by polling. \item\end{CompactList}\item 
uint8\_\-t \hyperlink{usart2_8h_0ac4fa984a665cfa28369905ed9a2373}{USART1\_\-receive} (void)
\begin{CompactList}\small\item\em Receive an 8 bit value from USART1 by polling. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_961dc73e9f710523866937d69fd0c3a1}{USART0\_\-flush} (void)
\begin{CompactList}\small\item\em Repeatedly receive and discard values received by the USART0 until the input buffer empties. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_902e7bd6e8cb3445122208c7e129fceb}{USART1\_\-flush} (void)
\begin{CompactList}\small\item\em Repeatedly receive and discard values received by the USART1 until the input buffer empties. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_4eeef5b40a691ff0dbb1a7d638865689}{usart0\_\-out\_\-iso\_\-time} (uint8\_\-t $\ast$time\_\-store)
\begin{CompactList}\small\item\em Output a time value in ISO format to USART0, from data stored in memory. \item\end{CompactList}\item 
void \hyperlink{usart2_8h_996517eee455091d18d75b4583f7f7ad}{usart1\_\-out\_\-iso\_\-time} (uint8\_\-t $\ast$time\_\-store)
\begin{CompactList}\small\item\em Output a time value in ISO format to USART1, from data stored in memory. \item\end{CompactList}\end{CompactItemize}


\subsection{Function Documentation}
\hypertarget{usart2_8h_961dc73e9f710523866937d69fd0c3a1}{
\index{usart2.h@{usart2.h}!USART0\_\-flush@{USART0\_\-flush}}
\index{USART0\_\-flush@{USART0\_\-flush}!usart2.h@{usart2.h}}
\subsubsection[{USART0\_\-flush}]{\setlength{\rightskip}{0pt plus 5cm}void USART0\_\-flush (void)}}
\label{usart2_8h_961dc73e9f710523866937d69fd0c3a1}


Repeatedly receive and discard values received by the USART0 until the input buffer empties. 

Uses polling.

Note that in the event of continuous input, this function may never complete. \hypertarget{usart2_8h_4bfe3d8ca04b2d9d1ac05bc17fd6fe86}{
\index{usart2.h@{usart2.h}!USART0\_\-init@{USART0\_\-init}}
\index{USART0\_\-init@{USART0\_\-init}!usart2.h@{usart2.h}}
\subsubsection[{USART0\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void USART0\_\-init (uint16\_\-t {\em baudval})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{usart2_8h_4bfe3d8ca04b2d9d1ac05bc17fd6fe86}


Initialise USART0 and set baud rate. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em baudval}]Value to put in UBRR0 to selectbaud rate.\end{description}
\end{Desc}
Initialise USART0 on microcontrollers where there are two USARTs which use the newer register and bit position names which include a USART number

The baudval parameter will depend on the CPU clock frequency see the tables in the microcontroller documentation for suitable values

Clears any existing transmissions, turns off double speed, enables transmitter and receiver.

Note that this initialisation DOESN'T enable the interrupts Rx complete and Tx Complete \hypertarget{usart2_8h_4eeef5b40a691ff0dbb1a7d638865689}{
\index{usart2.h@{usart2.h}!usart0\_\-out\_\-iso\_\-time@{usart0\_\-out\_\-iso\_\-time}}
\index{usart0\_\-out\_\-iso\_\-time@{usart0\_\-out\_\-iso\_\-time}!usart2.h@{usart2.h}}
\subsubsection[{usart0\_\-out\_\-iso\_\-time}]{\setlength{\rightskip}{0pt plus 5cm}void usart0\_\-out\_\-iso\_\-time (uint8\_\-t $\ast$ {\em time\_\-store})}}
\label{usart2_8h_4eeef5b40a691ff0dbb1a7d638865689}


Output a time value in ISO format to USART0, from data stored in memory. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em time\_\-store}]Pointer to 7 BCD values representing in order seconds,minutes,hours,day,month,day of week(ignored),year.\end{description}
\end{Desc}
Takes a set of values representing a time (typically in the order received from a RTC chip) and outputs them via the USART in an ISO like format:

15:23:00 on 3rd April 2010 would be \char`\"{}2010-04-03	15:23:00\char`\"{}

Uses polling. Calls USART\_\-transmit and USART\_\-transmit\_\-hex \hypertarget{usart2_8h_cb300701f92a7f33a09e3fa3a56ce90d}{
\index{usart2.h@{usart2.h}!USART0\_\-receive@{USART0\_\-receive}}
\index{USART0\_\-receive@{USART0\_\-receive}!usart2.h@{usart2.h}}
\subsubsection[{USART0\_\-receive}]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t USART0\_\-receive (void)}}
\label{usart2_8h_cb300701f92a7f33a09e3fa3a56ce90d}


Receive an 8 bit value from USART0 by polling. 

\begin{Desc}
\item[Returns:]value Value received.\end{Desc}
Uses polling, so waits for receive buffer to fill before returning. \hypertarget{usart2_8h_cd65f891dae08d1c36311f35279f82cd}{
\index{usart2.h@{usart2.h}!USART0\_\-transmit@{USART0\_\-transmit}}
\index{USART0\_\-transmit@{USART0\_\-transmit}!usart2.h@{usart2.h}}
\subsubsection[{USART0\_\-transmit}]{\setlength{\rightskip}{0pt plus 5cm}void USART0\_\-transmit (unsigned char {\em data})}}
\label{usart2_8h_cd65f891dae08d1c36311f35279f82cd}


Transmit a character via USART0 at currently set baud rate. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]Character to transmit.\end{description}
\end{Desc}
Transmit a character via USART0, using polling, not interrutps. Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty \hypertarget{usart2_8h_c422cb3d2e78b464f7e07a21fed13555}{
\index{usart2.h@{usart2.h}!USART0\_\-transmit\_\-bcd@{USART0\_\-transmit\_\-bcd}}
\index{USART0\_\-transmit\_\-bcd@{USART0\_\-transmit\_\-bcd}!usart2.h@{usart2.h}}
\subsubsection[{USART0\_\-transmit\_\-bcd}]{\setlength{\rightskip}{0pt plus 5cm}void USART0\_\-transmit\_\-bcd (uint8\_\-t {\em val})}}
\label{usart2_8h_c422cb3d2e78b464f7e07a21fed13555}


Interpret an 8 bit unsigned integer as a BCD value and transmit it as two ASCII characters via USART0. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]Value to transmit.\end{description}
\end{Desc}
Interpret an 8 bit unsigned integer as a BCD value and transmit it via the USART as exactly 2 characters. Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty before appending new characters \hypertarget{usart2_8h_60c9a719ae1c2f5f5e67ae98c47e20b5}{
\index{usart2.h@{usart2.h}!USART0\_\-transmit\_\-bin@{USART0\_\-transmit\_\-bin}}
\index{USART0\_\-transmit\_\-bin@{USART0\_\-transmit\_\-bin}!usart2.h@{usart2.h}}
\subsubsection[{USART0\_\-transmit\_\-bin}]{\setlength{\rightskip}{0pt plus 5cm}void USART0\_\-transmit\_\-bin (uint8\_\-t {\em val})}}
\label{usart2_8h_60c9a719ae1c2f5f5e67ae98c47e20b5}


Transmit an 8 bit unsigned integer as eight ASCII characters 0 or 1 via USART0. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]Value to transmit.\end{description}
\end{Desc}
Transmit an 8 bit unsigned integer as eight ASCII characters 0 or 1.

Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty before appending new characters \hypertarget{usart2_8h_44b49161eded2e6b93431c88769da690}{
\index{usart2.h@{usart2.h}!USART0\_\-transmit\_\-int16@{USART0\_\-transmit\_\-int16}}
\index{USART0\_\-transmit\_\-int16@{USART0\_\-transmit\_\-int16}!usart2.h@{usart2.h}}
\subsubsection[{USART0\_\-transmit\_\-int16}]{\setlength{\rightskip}{0pt plus 5cm}void USART0\_\-transmit\_\-int16 (int16\_\-t {\em val})}}
\label{usart2_8h_44b49161eded2e6b93431c88769da690}


Transmit a 16 bit signed integer via USART0 at currently set baud rate. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]value to transmit.\end{description}
\end{Desc}
Transmit a 16 bit signed integer via the USART, as an optional minus sign followed by up to five decimal characters, using polling, not interrutps. Doesn't output leading zeroes, so number of characters transmitted may vary. Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty before appending new characters \hypertarget{usart2_8h_c4fb0043cd69cb3f28dbc84d23653b90}{
\index{usart2.h@{usart2.h}!USART0\_\-transmit\_\-int8@{USART0\_\-transmit\_\-int8}}
\index{USART0\_\-transmit\_\-int8@{USART0\_\-transmit\_\-int8}!usart2.h@{usart2.h}}
\subsubsection[{USART0\_\-transmit\_\-int8}]{\setlength{\rightskip}{0pt plus 5cm}void USART0\_\-transmit\_\-int8 (int8\_\-t {\em val})}}
\label{usart2_8h_c4fb0043cd69cb3f28dbc84d23653b90}


Transmit an 8 bit signed integer via USART0 at currently set baud rate. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]Value to transmit.\end{description}
\end{Desc}
Transmit an 8 bit signed integer via USART0, as an optional minus sign followed by up to three decimal characters, using polling, not interrutps. Doesn't output leading zeroes, so number of characters transmitted may vary. Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty before appending new characters \hypertarget{usart2_8h_eb117c824721590b09f900210f171743}{
\index{usart2.h@{usart2.h}!USART0\_\-transmit\_\-nibble@{USART0\_\-transmit\_\-nibble}}
\index{USART0\_\-transmit\_\-nibble@{USART0\_\-transmit\_\-nibble}!usart2.h@{usart2.h}}
\subsubsection[{USART0\_\-transmit\_\-nibble}]{\setlength{\rightskip}{0pt plus 5cm}void USART0\_\-transmit\_\-nibble (uint8\_\-t {\em nibble})}}
\label{usart2_8h_eb117c824721590b09f900210f171743}


Transmit the lowest 4 bits of an 8 bit unsigned integer as a single ASCII character 0-9 or A-F on USART0. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em nibble}]Value to transmit.\end{description}
\end{Desc}
Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty before appending new characters \hypertarget{usart2_8h_dc9abd390e3809207e46650e9ac6a44d}{
\index{usart2.h@{usart2.h}!USART0\_\-transmit\_\-string@{USART0\_\-transmit\_\-string}}
\index{USART0\_\-transmit\_\-string@{USART0\_\-transmit\_\-string}!usart2.h@{usart2.h}}
\subsubsection[{USART0\_\-transmit\_\-string}]{\setlength{\rightskip}{0pt plus 5cm}void USART0\_\-transmit\_\-string (const unsigned char $\ast$ {\em data})}}
\label{usart2_8h_dc9abd390e3809207e46650e9ac6a44d}


Transmit a string via USART0 at currently set baud rate. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]Pointer to start of string.\end{description}
\end{Desc}
Transmit a string via USART0, using polling, not interrutps. Doesn't change baud rate. Doesn't interrupt any existing transmit already in progress. Uses polling, so waits for transmit buffer to be empty \hypertarget{usart2_8h_9e1fb07ae77c403bac7ddfe2ffb00568}{
\index{usart2.h@{usart2.h}!USART0\_\-transmit\_\-uint16@{USART0\_\-transmit\_\-uint16}}
\index{USART0\_\-transmit\_\-uint16@{USART0\_\-transmit\_\-uint16}!usart2.h@{usart2.h}}
\subsubsection[{USART0\_\-transmit\_\-uint16}]{\setlength{\rightskip}{0pt plus 5cm}void USART0\_\-transmit\_\-uint16 (uint16\_\-t {\em val})}}
\label{usart2_8h_9e1fb07ae77c403bac7ddfe2ffb00568}


Transmit a 16 bit unsigned integer via USART0 at currently set baud rate. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]Value to transmit.\end{description}
\end{Desc}
Transmit a 16 bit unsigned integer via USART0, as a series of up to five decimal characters, using polling, not interrutps. Doesn't output leading zeroes, so number of characters transmitted may vary. Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty before appending new characters \hypertarget{usart2_8h_6bb4d94e5ff4cdad3f4dcc1df8944eb0}{
\index{usart2.h@{usart2.h}!USART0\_\-transmit\_\-uint8@{USART0\_\-transmit\_\-uint8}}
\index{USART0\_\-transmit\_\-uint8@{USART0\_\-transmit\_\-uint8}!usart2.h@{usart2.h}}
\subsubsection[{USART0\_\-transmit\_\-uint8}]{\setlength{\rightskip}{0pt plus 5cm}void USART0\_\-transmit\_\-uint8 (uint8\_\-t {\em val})}}
\label{usart2_8h_6bb4d94e5ff4cdad3f4dcc1df8944eb0}


Transmit an 8 bit unsigned integer via USART0 at currently set baud rate. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]Character to transmit.\end{description}
\end{Desc}
Transmit an 8 bit unsigned integer via USART0, as a series of up to three decimal characters, using polling, not interrutps. Doesn't output leading zeroes, so number of characters transmitted may vary. Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty before appending new characters \hypertarget{usart2_8h_902e7bd6e8cb3445122208c7e129fceb}{
\index{usart2.h@{usart2.h}!USART1\_\-flush@{USART1\_\-flush}}
\index{USART1\_\-flush@{USART1\_\-flush}!usart2.h@{usart2.h}}
\subsubsection[{USART1\_\-flush}]{\setlength{\rightskip}{0pt plus 5cm}void USART1\_\-flush (void)}}
\label{usart2_8h_902e7bd6e8cb3445122208c7e129fceb}


Repeatedly receive and discard values received by the USART1 until the input buffer empties. 

Uses polling.

Note that in the event of continuous input, this function may never complete. \hypertarget{usart2_8h_f0a2e795e45f3746e03e0f6e45d6a90e}{
\index{usart2.h@{usart2.h}!USART1\_\-init@{USART1\_\-init}}
\index{USART1\_\-init@{USART1\_\-init}!usart2.h@{usart2.h}}
\subsubsection[{USART1\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void USART1\_\-init (uint16\_\-t {\em baudval})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{usart2_8h_f0a2e795e45f3746e03e0f6e45d6a90e}


Initialise USART1 and set baud rate. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em baudval}]Value to put in UBRR1 to selectbaud rate.\end{description}
\end{Desc}
Initialise USART1 on microcontrollers where there are two USARTs which use the newer register and bit position names which include a USART number

The baudval parameter will depend on the CPU clock frequency see the tables in the microcontroller documentation for suitable values

Clears any existing transmissions, turns off double speed, enables transmitter and receiver.

Note that this initialisation DOESN'T enable the interrupts Rx complete and Tx Complete \hypertarget{usart2_8h_996517eee455091d18d75b4583f7f7ad}{
\index{usart2.h@{usart2.h}!usart1\_\-out\_\-iso\_\-time@{usart1\_\-out\_\-iso\_\-time}}
\index{usart1\_\-out\_\-iso\_\-time@{usart1\_\-out\_\-iso\_\-time}!usart2.h@{usart2.h}}
\subsubsection[{usart1\_\-out\_\-iso\_\-time}]{\setlength{\rightskip}{0pt plus 5cm}void usart1\_\-out\_\-iso\_\-time (uint8\_\-t $\ast$ {\em time\_\-store})}}
\label{usart2_8h_996517eee455091d18d75b4583f7f7ad}


Output a time value in ISO format to USART1, from data stored in memory. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em time\_\-store}]Pointer to 7 BCD values representing in order seconds,minutes,hours,day,month,day of week(ignored),year.\end{description}
\end{Desc}
Takes a set of values representing a time (typically in the order received from a RTC chip) and outputs them via the USART in an ISO like format:

15:23:00 on 3rd April 2010 would be \char`\"{}2010-04-03	15:23:00\char`\"{}

Uses polling. Calls USART\_\-transmit and USART\_\-transmit\_\-hex \hypertarget{usart2_8h_0ac4fa984a665cfa28369905ed9a2373}{
\index{usart2.h@{usart2.h}!USART1\_\-receive@{USART1\_\-receive}}
\index{USART1\_\-receive@{USART1\_\-receive}!usart2.h@{usart2.h}}
\subsubsection[{USART1\_\-receive}]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t USART1\_\-receive (void)}}
\label{usart2_8h_0ac4fa984a665cfa28369905ed9a2373}


Receive an 8 bit value from USART1 by polling. 

\begin{Desc}
\item[Returns:]value Value received.\end{Desc}
Uses polling, so waits for receive buffer to fill before returning. \hypertarget{usart2_8h_264927bab7aed29509ce608f621361ee}{
\index{usart2.h@{usart2.h}!USART1\_\-transmit@{USART1\_\-transmit}}
\index{USART1\_\-transmit@{USART1\_\-transmit}!usart2.h@{usart2.h}}
\subsubsection[{USART1\_\-transmit}]{\setlength{\rightskip}{0pt plus 5cm}void USART1\_\-transmit (unsigned char {\em data})}}
\label{usart2_8h_264927bab7aed29509ce608f621361ee}


Transmit a character via USART1 at currently set baud rate. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]Character to transmit.\end{description}
\end{Desc}
Transmit a character via USART1, using polling, not interrutps. Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty \hypertarget{usart2_8h_f9a9d2010d31bf50a3903195cfa2319b}{
\index{usart2.h@{usart2.h}!USART1\_\-transmit\_\-bcd@{USART1\_\-transmit\_\-bcd}}
\index{USART1\_\-transmit\_\-bcd@{USART1\_\-transmit\_\-bcd}!usart2.h@{usart2.h}}
\subsubsection[{USART1\_\-transmit\_\-bcd}]{\setlength{\rightskip}{0pt plus 5cm}void USART1\_\-transmit\_\-bcd (uint8\_\-t {\em val})}}
\label{usart2_8h_f9a9d2010d31bf50a3903195cfa2319b}


Interpret an 8 bit unsigned integer as a BCD value and transmit it as two ASCII characters via USART1. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]Value to transmit.\end{description}
\end{Desc}
Interpret an 8 bit unsigned integer as a BCD value and transmit it via the USART as exactly 2 characters. Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty before appending new characters \hypertarget{usart2_8h_5fdc03b620141dc4d87a17ca0212dd99}{
\index{usart2.h@{usart2.h}!USART1\_\-transmit\_\-bin@{USART1\_\-transmit\_\-bin}}
\index{USART1\_\-transmit\_\-bin@{USART1\_\-transmit\_\-bin}!usart2.h@{usart2.h}}
\subsubsection[{USART1\_\-transmit\_\-bin}]{\setlength{\rightskip}{0pt plus 5cm}void USART1\_\-transmit\_\-bin (uint8\_\-t {\em val})}}
\label{usart2_8h_5fdc03b620141dc4d87a17ca0212dd99}


Transmit an 8 bit unsigned integer as eight ASCII characters 0 or 1 via USART1. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]Value to transmit.\end{description}
\end{Desc}
Transmit an 8 bit unsigned integer as eight ASCII characters 0 or 1.

Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty before appending new characters \hypertarget{usart2_8h_c4cb5bba775f9e4da9e9b9c36489a20e}{
\index{usart2.h@{usart2.h}!USART1\_\-transmit\_\-int16@{USART1\_\-transmit\_\-int16}}
\index{USART1\_\-transmit\_\-int16@{USART1\_\-transmit\_\-int16}!usart2.h@{usart2.h}}
\subsubsection[{USART1\_\-transmit\_\-int16}]{\setlength{\rightskip}{0pt plus 5cm}void USART1\_\-transmit\_\-int16 (int16\_\-t {\em val})}}
\label{usart2_8h_c4cb5bba775f9e4da9e9b9c36489a20e}


Transmit a 16 bit signed integer via USART1 at currently set baud rate. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]value to transmit.\end{description}
\end{Desc}
Transmit a 16 bit signed integer via the USART, as an optional minus sign followed by up to five decimal characters, using polling, not interrutps. Doesn't output leading zeroes, so number of characters transmitted may vary. Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty before appending new characters \hypertarget{usart2_8h_25a22f9c7ddcd9a0515ebb458688d976}{
\index{usart2.h@{usart2.h}!USART1\_\-transmit\_\-int8@{USART1\_\-transmit\_\-int8}}
\index{USART1\_\-transmit\_\-int8@{USART1\_\-transmit\_\-int8}!usart2.h@{usart2.h}}
\subsubsection[{USART1\_\-transmit\_\-int8}]{\setlength{\rightskip}{0pt plus 5cm}void USART1\_\-transmit\_\-int8 (int8\_\-t {\em val})}}
\label{usart2_8h_25a22f9c7ddcd9a0515ebb458688d976}


Transmit an 8 bit signed integer via USART1 at currently set baud rate. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]Value to transmit.\end{description}
\end{Desc}
Transmit an 8 bit signed integer via USART1, as an optional minus sign followed by up to three decimal characters, using polling, not interrutps. Doesn't output leading zeroes, so number of characters transmitted may vary. Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty before appending new characters \hypertarget{usart2_8h_81dd9f67df6b96791b99c27d72a0abb6}{
\index{usart2.h@{usart2.h}!USART1\_\-transmit\_\-nibble@{USART1\_\-transmit\_\-nibble}}
\index{USART1\_\-transmit\_\-nibble@{USART1\_\-transmit\_\-nibble}!usart2.h@{usart2.h}}
\subsubsection[{USART1\_\-transmit\_\-nibble}]{\setlength{\rightskip}{0pt plus 5cm}void USART1\_\-transmit\_\-nibble (uint8\_\-t {\em nibble})}}
\label{usart2_8h_81dd9f67df6b96791b99c27d72a0abb6}


Transmit the lowest 4 bits of an 8 bit unsigned integer as a single ASCII character 0-9 or A-F on USART1. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em nibble}]Value to transmit.\end{description}
\end{Desc}
Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty before appending new characters \hypertarget{usart2_8h_0c700b6fb1b1e334e9c16484284bad39}{
\index{usart2.h@{usart2.h}!USART1\_\-transmit\_\-string@{USART1\_\-transmit\_\-string}}
\index{USART1\_\-transmit\_\-string@{USART1\_\-transmit\_\-string}!usart2.h@{usart2.h}}
\subsubsection[{USART1\_\-transmit\_\-string}]{\setlength{\rightskip}{0pt plus 5cm}void USART1\_\-transmit\_\-string (const unsigned char $\ast$ {\em data})}}
\label{usart2_8h_0c700b6fb1b1e334e9c16484284bad39}


Transmit a string via USART1 at currently set baud rate. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]Pointer to start of string.\end{description}
\end{Desc}
Transmit a string via USART1, using polling, not interrutps. Doesn't change baud rate. Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty \hypertarget{usart2_8h_10914147884978f70cb02f2e7b92045e}{
\index{usart2.h@{usart2.h}!USART1\_\-transmit\_\-uint16@{USART1\_\-transmit\_\-uint16}}
\index{USART1\_\-transmit\_\-uint16@{USART1\_\-transmit\_\-uint16}!usart2.h@{usart2.h}}
\subsubsection[{USART1\_\-transmit\_\-uint16}]{\setlength{\rightskip}{0pt plus 5cm}void USART1\_\-transmit\_\-uint16 (uint16\_\-t {\em val})}}
\label{usart2_8h_10914147884978f70cb02f2e7b92045e}


Transmit a 16 bit unsigned integer via USART1 at currently set baud rate. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]Value to transmit.\end{description}
\end{Desc}
Transmit a 16 bit unsigned integer via USART1, as a series of up to five decimal characters, using polling, not interrutps. Doesn't output leading zeroes, so number of characters transmitted may vary. Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty before appending new characters \hypertarget{usart2_8h_2b23af6851e45cadf220c46774e80e5c}{
\index{usart2.h@{usart2.h}!USART1\_\-transmit\_\-uint8@{USART1\_\-transmit\_\-uint8}}
\index{USART1\_\-transmit\_\-uint8@{USART1\_\-transmit\_\-uint8}!usart2.h@{usart2.h}}
\subsubsection[{USART1\_\-transmit\_\-uint8}]{\setlength{\rightskip}{0pt plus 5cm}void USART1\_\-transmit\_\-uint8 (uint8\_\-t {\em val})}}
\label{usart2_8h_2b23af6851e45cadf220c46774e80e5c}


Transmit an 8 bit unsigned integer via USART1 at currently set baud rate. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]Character to transmit.\end{description}
\end{Desc}
Transmit an 8 bit unsigned integer via USART1, as a series of up to three decimal characters, using polling, not interrutps. Doesn't output leading zeroes, so number of characters transmitted may vary. Doesn't interrupt any existing transmit already in progress.

Uses polling, so waits for transmit buffer to be empty before appending new characters 