stm32f1: Move ADC and SPI code from gpio.c to spi.c and adc.c

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2018-11-23 12:01:00 -05:00
parent 581b1439f3
commit 6b108aa885
5 changed files with 238 additions and 217 deletions

11
src/stm32f1/internal.h Normal file
View File

@@ -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