AVRTools
A Library for the AVR ATmega328 and ATmega2560 Microcontrollers
USART3Minimal.h
Go to the documentation of this file.
1 /*
2  USART3Minimal.h - Minimal, light-weight functions to use
3  USART3 available on ATMega2560 (Arduino Mega) processors (no buffering).
4  This is part of the AVRTools library.
5  Copyright (c) 2015 Igor Mikolic-Torreira. All right reserved.
6  Functions readlong() and readFloat() adapted from Arduino code that
7  is Copyright (c) 2005-2006 David A. Mellis and licensed under LGPL.
8 
9  This program is free software: you can redistribute it and/or modify
10  it under the terms of the GNU Lesser General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public License
20  along with this program. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 
24 
47 #ifndef USART3Minimal_h
48 #define USART3Minimal_h
49 
50 
51 
52 #if defined(__AVR_ATmega2560__)
53 
54 
55 
70 void initUSART3( unsigned long baudRate );
71 
72 
85 void transmitUSART3( unsigned char data );
86 
87 
100 void transmitUSART3( const char* data );
101 
102 
115 unsigned char receiveUSART3();
116 
117 
127 void releaseUSART3();
128 
129 #endif
130 
131 
132 
133 #endif
void transmitUSART3(unsigned char data)
Transmit a single byte on USART3.
Definition: USART3Minimal.cpp:50
void releaseUSART3()
Release USART3, making pins 0 and 1 again available for non-USART use.
Definition: USART3Minimal.cpp:80
unsigned char receiveUSART3()
Receive a byte on USART3.
Definition: USART3Minimal.cpp:72
void initUSART3(unsigned long baudRate)
Initialize USART3 for serial receive and transmit.
Definition: USART3Minimal.cpp:39