aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32f4/internal.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-07-28 17:55:57 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-07-28 17:57:02 -0400
commitbc9c8cd7a052c03301995edafde62385ec7fb8a8 (patch)
tree5f1b176e9844e96de3ed686e53ce476de5f29b50 /src/stm32f4/internal.h
parentef0784afe6f142b8549ecf7630cbbd5ed627bd36 (diff)
downloadkutter-bc9c8cd7a052c03301995edafde62385ec7fb8a8.tar.gz
kutter-bc9c8cd7a052c03301995edafde62385ec7fb8a8.tar.xz
kutter-bc9c8cd7a052c03301995edafde62385ec7fb8a8.zip
stm32f4: Only enable peripherals once
Add is_enabled_pclock() and only initialize spi and adc once during configuration. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/stm32f4/internal.h')
-rw-r--r--src/stm32f4/internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/stm32f4/internal.h b/src/stm32f4/internal.h
index f1c2fd66..062d7c65 100644
--- a/src/stm32f4/internal.h
+++ b/src/stm32f4/internal.h
@@ -14,6 +14,7 @@
#define GPIO_ANALOG 3
void enable_pclock(uint32_t periph_base);
+int is_enabled_pclock(uint32_t periph_base);
uint32_t get_pclock_frequency(uint32_t periph_base);
void clock_setup(void);
void gpio_peripheral(uint32_t gpio, uint32_t mode, int pullup);