#ifndef APP_INC_GPIO_H
|
#define APP_INC_GPIO_H
|
|
/*
|
* 开关输入
|
*/
|
#define SW_IN_PORT GPIOF
|
#define SW_IN_PIN GPIO_PIN_0
|
/**
|
* @brief SDH2136使能引脚定义
|
* 高电平有效
|
*/
|
#define SDH2136EN_PORT (GPIOB)
|
#define SDH2136EN_PIN (GPIO_PIN_3)
|
|
#define SDH2136_FAULT_PORT GPIOB
|
#define SDH2136_FAULT_PIN GPIO_PIN_5
|
|
#define HALL_SENSOR_A_PORT GPIOD
|
#define HALL_SENSOR_A_PIN GPIO_PIN_0
|
#define HALL_SENSOR_B_PORT GPIOD
|
#define HALL_SENSOR_B_PIN GPIO_PIN_2
|
#define HALL_SENSOR_C_PORT GPIOD
|
#define HALL_SENSOR_C_PIN GPIO_PIN_3
|
|
//定义ADC引脚
|
#define CURRENT_AI_PORT GPIOB
|
#define CURRENT_AI_PIN GPIO_PIN_4
|
#define VOLTAGE_AI_PORT GPIOF
|
#define VOLTAGE_AI_PIN GPIO_PIN_4
|
|
//定义串口引脚
|
#define UART_TX_PORT GPIOD
|
#define UART_RX_PORT GPIOD
|
#define UART_TX_PIN GPIO_PIN_5
|
#define UART_RX_PIN GPIO_PIN_6
|
|
//定义PWM通道引脚
|
//TIME1 CH0
|
#define PWM_HIN1_PORT GPIOC
|
#define PWM_HIN1_PIN GPIO_PIN_1
|
//TIME1 CH1
|
#define PWM_HIN2_PORT GPIOC
|
#define PWM_HIN2_PIN GPIO_PIN_2
|
//TIME1 CH2
|
#define PWM_HIN3_PORT GPIOC
|
#define PWM_HIN3_PIN GPIO_PIN_3
|
|
//TIME1 CH0_N
|
#define PWM_LIN1_PORT GPIOB
|
#define PWM_LIN1_PIN GPIO_PIN_0
|
//TIME1 CH1_N
|
#define PWM_LIN2_PORT GPIOB
|
#define PWM_LIN2_PIN GPIO_PIN_1
|
//TIME1 CH2_N
|
#define PWM_LIN3_PORT GPIOB
|
#define PWM_LIN3_PIN GPIO_PIN_2
|
|
extern void GPIO_Config(void);
|
extern void GPIO_SetSDH2136Disbale(void);
|
extern void GPIO_SetSDH2136Enbale(void);
|
#endif
|