diff options
Diffstat (limited to 'src/lib/gpio.c')
-rw-r--r-- | src/lib/gpio.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/gpio.c b/src/lib/gpio.c new file mode 100644 index 0000000..db511c4 --- /dev/null +++ b/src/lib/gpio.c @@ -0,0 +1,14 @@ +#include "wiring.h" +#include "stm32f10x_rcc.h" +#include "gpio.h" +#include "util.h" + +void gpio_init(void) { + /* Turn on clocks for GPIO */ + RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | + RCC_APB2Periph_GPIOB | + RCC_APB2Periph_GPIOC | + RCC_APB2Periph_AFIO, + ENABLE); +} + |