summaryrefslogtreecommitdiffstats
path: root/apps/osmocomBB/compat
diff options
context:
space:
mode:
Diffstat (limited to 'apps/osmocomBB/compat')
-rw-r--r--apps/osmocomBB/compat/compat.c19
-rw-r--r--apps/osmocomBB/compat/include/compat.h32
-rw-r--r--apps/osmocomBB/compat/include/dummy/memory.h3
3 files changed, 54 insertions, 0 deletions
diff --git a/apps/osmocomBB/compat/compat.c b/apps/osmocomBB/compat/compat.c
new file mode 100644
index 0000000000..9c5da58241
--- /dev/null
+++ b/apps/osmocomBB/compat/compat.c
@@ -0,0 +1,19 @@
+/* (C) 2014 by Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
+ *
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
diff --git a/apps/osmocomBB/compat/include/compat.h b/apps/osmocomBB/compat/include/compat.h
new file mode 100644
index 0000000000..5f2b6270be
--- /dev/null
+++ b/apps/osmocomBB/compat/include/compat.h
@@ -0,0 +1,32 @@
+/* (C) 2014 by Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
+ *
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#ifndef NUTTX_OSMOCOMBB_COMPAT_H
+#define NUTTX_OSMOCOMBB_COMPAT_H
+
+#define readb(a) getreg8(a)
+#define readw(a) getreg16(a)
+#define readl(a) getreg32(a)
+
+#define writeb(v,a) putreg8(v,a)
+#define writew(v,a) putreg16(v,a)
+#define writel(v,a) putreg32(v,a)
+
+#endif /* NUTTX_OSMOCOMBB_COMPAT_H */
diff --git a/apps/osmocomBB/compat/include/dummy/memory.h b/apps/osmocomBB/compat/include/dummy/memory.h
new file mode 100644
index 0000000000..0a5d81fe70
--- /dev/null
+++ b/apps/osmocomBB/compat/include/dummy/memory.h
@@ -0,0 +1,3 @@
+#ifndef NUTTX_OSMOCOMBB_COMPAT_DUMMY_H
+#define NUTTX_OSMOCOMBB_COMPAT_DUMMY_H
+#endif /* NUTTX_OSMOCOMBB_COMPAT_DUMMY_H */