summaryrefslogtreecommitdiff
path: root/src/arch/rm46l8lp/driver
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2022-07-18 11:25:27 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2022-07-18 11:25:27 +0200
commite6cef3c547e8f73cbf2d3c7ba639cb7d9934c475 (patch)
treeb38bf797c9cd5c226de250e8f569031ebc6131d0 /src/arch/rm46l8lp/driver
parent4da20a683273f252940ff2752d2f497040800b3d (diff)
Add Hercules RM46L8 Launchpad support (Cortex R4F)
Diffstat (limited to 'src/arch/rm46l8lp/driver')
-rw-r--r--src/arch/rm46l8lp/driver/counter.cc8
-rw-r--r--src/arch/rm46l8lp/driver/gpio.cc8
-rw-r--r--src/arch/rm46l8lp/driver/stdout.cc23
-rw-r--r--src/arch/rm46l8lp/driver/uptime.cc8
4 files changed, 47 insertions, 0 deletions
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;