aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32f1/internal.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-11-23 12:01:00 -0500
committerKevin O'Connor <kevin@koconnor.net>2018-11-30 11:42:54 -0500
commit6b108aa8856f44c3095b9dda702c96b3cfbb9677 (patch)
tree00593aa5419c3c5188300e64b9637af7121527fb /src/stm32f1/internal.h
parent581b1439f3666fce6db4fba466a79259f6c1b94f (diff)
downloadkutter-6b108aa8856f44c3095b9dda702c96b3cfbb9677.tar.gz
kutter-6b108aa8856f44c3095b9dda702c96b3cfbb9677.tar.xz
kutter-6b108aa8856f44c3095b9dda702c96b3cfbb9677.zip
stm32f1: Move ADC and SPI code from gpio.c to spi.c and adc.c
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
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