-
Notifications
You must be signed in to change notification settings - Fork 0
/
GPIO.c
14 lines (12 loc) · 719 Bytes
/
GPIO.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "GPIO.h"
void init_gpio(void) {
//GPIO_Init(GPIOD, GPIO_PIN_0, GPIO_MODE_OUT_PP_HIGH_FAST);
//GPIO_Init(Scan_GPIO_PORT, Scan_GPIO_PINS, GPIO_MODE_OUT_PP_HIGH_FAST);
GPIO_Init(Scan_GPIO_PORT, (GPIO_Pin_TypeDef)Scan_GPIO_PINS, GPIO_MODE_OUT_PP_LOW_FAST);
GPIO_Init(Control1_GPIO_PORT, (GPIO_Pin_TypeDef)Control1_GPIO_PINS, GPIO_MODE_OUT_PP_LOW_SLOW);
GPIO_Init(Control2_GPIO_PORT, (GPIO_Pin_TypeDef)Control2_GPIO_PINS, GPIO_MODE_OUT_PP_LOW_SLOW);
GPIO_Init(LED1_GPIO_PORT, (GPIO_Pin_TypeDef)LED1_GPIO_PINS, GPIO_MODE_OUT_OD_LOW_FAST);
GPIO_Init(LED2_GPIO_PORT, (GPIO_Pin_TypeDef)LED2_GPIO_PINS, GPIO_MODE_OUT_PP_HIGH_FAST);
//ADC
GPIO_Init(Adc_GPIO_PORT, Adc_GPIO_PINS, GPIO_MODE_IN_FL_NO_IT);
}