From e6cef3c547e8f73cbf2d3c7ba639cb7d9934c475 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 18 Jul 2022 11:25:27 +0200 Subject: Add Hercules RM46L8 Launchpad support (Cortex R4F) --- src/arch/rm46l8lp/driver/counter.cc | 8 ++++++++ src/arch/rm46l8lp/driver/gpio.cc | 8 ++++++++ src/arch/rm46l8lp/driver/stdout.cc | 23 +++++++++++++++++++++++ src/arch/rm46l8lp/driver/uptime.cc | 8 ++++++++ 4 files changed, 47 insertions(+) create mode 100644 src/arch/rm46l8lp/driver/counter.cc create mode 100644 src/arch/rm46l8lp/driver/gpio.cc create mode 100644 src/arch/rm46l8lp/driver/stdout.cc create mode 100644 src/arch/rm46l8lp/driver/uptime.cc (limited to 'src/arch/rm46l8lp/driver') diff --git a/src/arch/rm46l8lp/driver/counter.cc b/src/arch/rm46l8lp/driver/counter.cc new file mode 100644 index 0000000..4e0bb92 --- /dev/null +++ b/src/arch/rm46l8lp/driver/counter.cc @@ -0,0 +1,8 @@ +/* + * Copyright 2022 Daniel Friesel + * + * SPDX-License-Identifier: BSD-2-Clause + */ +#include "driver/counter.h" + +Counter counter; diff --git a/src/arch/rm46l8lp/driver/gpio.cc b/src/arch/rm46l8lp/driver/gpio.cc new file mode 100644 index 0000000..148bcdb --- /dev/null +++ b/src/arch/rm46l8lp/driver/gpio.cc @@ -0,0 +1,8 @@ +/* + * Copyright 2020 Daniel Friesel + * + * SPDX-License-Identifier: BSD-2-Clause + */ +#include "driver/gpio.h" + +GPIO gpio; diff --git a/src/arch/rm46l8lp/driver/stdout.cc b/src/arch/rm46l8lp/driver/stdout.cc new file mode 100644 index 0000000..9d5403c --- /dev/null +++ b/src/arch/rm46l8lp/driver/stdout.cc @@ -0,0 +1,23 @@ +/* + * Copyright 2022 Daniel Friesel + * + * SPDX-License-Identifier: BSD-2-Clause + */ +#include "driver/stdout.h" +#include "sci.h" + +void StandardOutput::setup() +{ + sciInit(); +} + +void StandardOutput::put(char c) +{ + while ((scilinREG->FLR & 0x04) == 0x04); + sciSendByte(scilinREG, c); + if (c == '\n') { + put('\r'); + } +} + +StandardOutput kout; diff --git a/src/arch/rm46l8lp/driver/uptime.cc b/src/arch/rm46l8lp/driver/uptime.cc new file mode 100644 index 0000000..8aaff8f --- /dev/null +++ b/src/arch/rm46l8lp/driver/uptime.cc @@ -0,0 +1,8 @@ +/* + * Copyright 2022 Daniel Friesel + * + * SPDX-License-Identifier: BSD-2-Clause + */ +#include "driver/uptime.h" + +Uptime uptime; -- cgit v1.2.3