AVRTools
A Library for the AVR ATmega328 and ATmega2560 Microcontrollers
Loading...
Searching...
No Matches
USART0Minimal.h
Go to the documentation of this file.
1/*
2 USART0Minimal.h - Minimal, light-weight functions to use
3 USART0 available on AVR ATMega328p (Arduino Uno) and
4 ATMega2560 (Arduino Mega) processors (no buffering).
5 This is part of the AVRTools library.
6 Copyright (c) 2015 Igor Mikolic-Torreira. All right reserved.
7 Functions readlong() and readFloat() adapted from Arduino code that
8 is Copyright (c) 2005-2006 David A. Mellis and licensed under LGPL.
9
10 This program is free software: you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
22*/
23
24
25
48#ifndef USART0Minimal_h
49#define USART0Minimal_h
50
51
52
66void initUSART0( unsigned long baudRate );
67
68
79void transmitUSART0( unsigned char data );
80
81
92void transmitUSART0( const char* data );
93
94
105unsigned char receiveUSART0();
106
107
115void releaseUSART0();
116
117
118
119
120#endif
void initUSART0(unsigned long baudRate)
Initialize USART0 for serial receive and transmit.
Definition USART0Minimal.cpp:38
void releaseUSART0()
Release USART0, making pins 0 and 1 again available for non-USART use.
Definition USART0Minimal.cpp:79
void transmitUSART0(unsigned char data)
Transmit a single byte on USART0.
Definition USART0Minimal.cpp:49
unsigned char receiveUSART0()
Receive a byte on USART0.
Definition USART0Minimal.cpp:71