From 6b108aa8856f44c3095b9dda702c96b3cfbb9677 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 23 Nov 2018 12:01:00 -0500 Subject: stm32f1: Move ADC and SPI code from gpio.c to spi.c and adc.c Signed-off-by: Kevin O'Connor --- src/stm32f1/internal.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/stm32f1/internal.h (limited to 'src/stm32f1/internal.h') 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 -- cgit v1.2.3-70-g09d2