From 38f0e84d3b5da56c1441f2f779246ccf7b23d5c4 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 18 Feb 2021 23:01:57 +0100 Subject: add minimal LM4F120H5QR (LM4F120XL Stellaris Launchpad) support --- src/arch/lm4f120h5qr-stellaris/driver/stdout.cc | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/arch/lm4f120h5qr-stellaris/driver/stdout.cc (limited to 'src/arch/lm4f120h5qr-stellaris/driver/stdout.cc') diff --git a/src/arch/lm4f120h5qr-stellaris/driver/stdout.cc b/src/arch/lm4f120h5qr-stellaris/driver/stdout.cc new file mode 100644 index 0000000..18b6da4 --- /dev/null +++ b/src/arch/lm4f120h5qr-stellaris/driver/stdout.cc @@ -0,0 +1,26 @@ +/* + * Copyright 2021 Daniel Friesel + * + * SPDX-License-Identifier: BSD-2-Clause + */ +#include "driver/stdout.h" + +extern "C" { +#include "lm4f_cpp_wrapper.h" +}; + + +void StandardOutput::setup() +{ + mp_uart_setup(); +} + +void StandardOutput::put(char c) +{ + mp_uart_send_blocking(c); + if (c == '\n') { + put('\r'); + } +} + +StandardOutput kout; -- cgit v1.2.3