summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2017-03-25 10:54:23 +0000
committerTomasz Kramkowski <tk@the-tk.com>2017-03-25 10:54:23 +0000
commit2d6bf67be33c28991fc9ab439a9fa28962ec8dd8 (patch)
tree15444e76f3c3122471c9231d29f1a0f849a1588d /lib
parentf45edd4bb3ee0d81a8faae98933566231b1566f4 (diff)
downloadfmk-2d6bf67be33c28991fc9ab439a9fa28962ec8dd8.tar.gz
fmk-2d6bf67be33c28991fc9ab439a9fa28962ec8dd8.tar.xz
fmk-2d6bf67be33c28991fc9ab439a9fa28962ec8dd8.zip
usb: cleanup usb.c
Diffstat (limited to 'lib')
-rw-r--r--lib/cm4.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/cm4.h b/lib/cm4.h
new file mode 100644
index 0000000..7c1c774
--- /dev/null
+++ b/lib/cm4.h
@@ -0,0 +1,10 @@
+#ifndef LIB_CM4_H
+#define LIB_CM4_H
+
+#define CLRPEND(n) REG_32(0xE000E280 + 4 * (n))
+#define ISR_CLRPEND(i) CLRPEND((i) / 32) = BV((i) % 32);
+
+#define SETENA(n) REG_32(0xE000E100 + 4 * (n))
+#define ISR_SETENA(i) SETENA((i) / 32) = BV((i) % 32);
+
+#endif /* LIB_CM4_H */