summaryrefslogtreecommitdiff
path: root/rcc
diff options
context:
space:
mode:
Diffstat (limited to 'rcc')
-rw-r--r--rcc/rcc.h3
-rw-r--r--rcc/syscfg.h19
2 files changed, 22 insertions, 0 deletions
diff --git a/rcc/rcc.h b/rcc/rcc.h
index 6307919..650e47d 100644
--- a/rcc/rcc.h
+++ b/rcc/rcc.h
@@ -187,6 +187,9 @@ struct RCC_t {
DMA1 = 1 << 21,
DMA2 = 1 << 22,
ETHMAC = 1 << 25,
+ ETHMACTX = 1 << 26,
+ ETHMACRX = 1 << 27,
+ ETHMACPTP = 1 << 28,
OTGHS = 1 << 29,
OTGHSULPI = 1 << 30,
};
diff --git a/rcc/syscfg.h b/rcc/syscfg.h
new file mode 100644
index 0000000..74c3a07
--- /dev/null
+++ b/rcc/syscfg.h
@@ -0,0 +1,19 @@
+#ifndef SYSCFG_H
+#define SYSCFG_H
+
+#include <stdint.h>
+
+struct SYSCFG_t {
+ volatile uint32_t MEMRM;
+ volatile uint32_t PMC;
+ volatile uint32_t EXTICR[4];
+ volatile uint32_t CMPCR;
+};
+
+#if defined(STM32F4)
+static SYSCFG_t& SYSCFG = *(SYSCFG_t*)0x40013800;
+#endif
+
+void rcc_init();
+
+#endif