diff options
Diffstat (limited to 'src/lib/gpio.c')
-rw-r--r-- | src/lib/gpio.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/lib/gpio.c b/src/lib/gpio.c index 1e42d4d..f03c4fa 100644 --- a/src/lib/gpio.c +++ b/src/lib/gpio.c @@ -23,10 +23,6 @@ * @brief GPIO initialization routine */ -#ifndef _GPIO_H_ -#define _GPIO_H_ - -#endif #include "libmaple.h" #include "stm32f10x_rcc.h" #include "gpio.h" @@ -36,11 +32,11 @@ void gpio_init(void) { RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC | - RCC_APB2Periph_AFIO, + RCC_APB2Periph_AFIO, ENABLE); } -void gpio_set_mode(GPIO_Port* port, uint8_t gpio_pin, uint8_t mode) { +void gpio_set_mode(GPIO_Port* port, uint8 gpio_pin, uint8 mode) { uint32_t tmp; uint32_t shift = POS(gpio_pin % 8); GPIOReg CR; |