Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
uart_terminal_device.hpp
Go to the documentation of this file.
1/*****************************************************************************/
2/********** !!! WARNING: CODE GENERATED BY TAPROOT. DO NOT EDIT !!! **********/
3/*****************************************************************************/
4
5/*
6 * Copyright (c) 2020-2021 Advanced Robotics at the University of Washington <robomstr@uw.edu>
7 *
8 * This file is part of Taproot.
9 *
10 * Taproot is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU 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 * Taproot 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 General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with Taproot. If not, see <https://www.gnu.org/licenses/>.
22 */
23
24#ifndef TAPROOT_UART_TERMINAL_DEVICE_HPP_
25#define TAPROOT_UART_TERMINAL_DEVICE_HPP_
26
28
29#include "modm/io/iodevice.hpp"
30
32
33namespace tap
34{
35class Drivers;
36}
37
39{
45class UartTerminalDevice : public ::modm::IODevice
46{
47public:
50 virtual ~UartTerminalDevice() = default;
51
52 void initialize();
53
59 bool read(char &c) override;
60
61 using IODevice::write;
67 void write(char c) override;
68
72 void flush() override;
73
74private:
75 static constexpr uint32_t UART_BAUDE_RATE = 115200;
76
78
79 static constexpr Uart::UartPort TERMINAL_UART_PORT = bound_ports::TERMINAL_SERIAL_UART_PORT;
80}; // class UartTerminalDevice
81} // namespace tap::communication::serial
82
83#endif // TAPROOT_UART_TERMINAL_DEVICE_HPP_
Definition drivers.hpp:70
Definition uart_terminal_device.hpp:46
bool read(char &c) override
Definition uart_terminal_device.cpp:34
void flush() override
Definition uart_terminal_device.cpp:41
void initialize()
Definition uart_terminal_device.cpp:32
void write(char c) override
Definition uart_terminal_device.cpp:39
UartPort
Definition uart.hpp:51
Definition dji_serial.cpp:41
Definition ballistics.cpp:29
tap::Drivers Drivers
Definition drivers.hpp:11
fang::Drivers & drivers
Definition robot_singleton.cpp:45