aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32f1/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stm32f1/internal.h')
-rw-r--r--src/stm32f1/internal.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/stm32f1/internal.h b/src/stm32f1/internal.h
new file mode 100644
index 00000000..be9ea4d0
--- /dev/null
+++ b/src/stm32f1/internal.h
@@ -0,0 +1,11 @@
+#ifndef __STM32F1_INTERNAL_H
+#define __STM32F1_INTERNAL_H
+// Local definitions for STM32F1 code
+
+#define GPIO(PORT, NUM) (((PORT)-'A') * 16 + (NUM))
+#define GPIO2PORT(PIN) ((PIN) / 16)
+
+extern GPIO_TypeDef *const digital_regs[];
+extern uint32_t const digital_pins[];
+
+#endif // internal.h