modm API documentation
terminal.hpp
1 /*
2  * Copyright (c) 2009-2010, Martin Rosekeit
3  * Copyright (c) 2009-2011, Fabian Greif
4  * Copyright (c) 2012, 2014, 2019, Niklas Hauser
5  *
6  * This file is part of the modm project.
7  *
8  * This Source Code Form is subject to the terms of the Mozilla Public
9  * License, v. 2.0. If a copy of the MPL was not distributed with this
10  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11  */
12 // ----------------------------------------------------------------------------
13 
14 #pragma once
15 #include <modm/io/iodevice.hpp>
16 
17 namespace modm
18 {
19 
20 /**
21  * Standard text terminal
22  *
23  * Uses the STL IOStream for in- and output.
24  *
25  * @ingroup modm_platform_uart
26  */
27 class Terminal : public IODevice
28 {
29 public :
30  virtual void
31  write(char c);
32 
33  virtual void
34  write(const char* s);
35 
36  virtual void
37  flush();
38 
39  virtual bool
40  read(char& value);
41 };
42 
43 }
virtual bool read(char &value)
Read a single character.
Definition: terminal.cpp:39
virtual void write(char c)
Write a single character.
Definition: terminal.cpp:21
Definition: modm/src/modm/io/iodevice.hpp:26
Definition: terminal.hpp:27