37 lines
888 B
C
37 lines
888 B
C
|
#ifndef __3626_MOTOR_H_
|
||
|
#define __3626_MOTOR_H_
|
||
|
#include "gd32f4xx_it.h"
|
||
|
#include "includes.h"
|
||
|
|
||
|
/* 水平电机正向旋转 */
|
||
|
#define H_Forward_Rotation gpio_bit_reset(GPIOC, GPIO_PIN_9)
|
||
|
/* 水平电机反向旋转 */
|
||
|
#define H_Reverse_Rotation gpio_bit_set(GPIOC, GPIO_PIN_9)
|
||
|
|
||
|
/* 垂直电机正向旋转 */
|
||
|
#define V_Forward_Rotation gpio_bit_reset(GPIOD, GPIO_PIN_10)
|
||
|
/* 垂直电机反向旋转 */
|
||
|
#define V_Reverse_Rotation gpio_bit_set(GPIOD, GPIO_PIN_10)
|
||
|
|
||
|
|
||
|
/* 驱动器电源控制引脚 */
|
||
|
#define H_BRIDGE_POWER_OFF gpio_bit_reset(GPIOE,GPIO_PIN_0)
|
||
|
#define H_BRIDGE_POWER_ON gpio_bit_set(GPIOE,GPIO_PIN_0)
|
||
|
|
||
|
#define V_BRIDGE_POWER_OFF gpio_bit_reset(GPIOE,GPIO_PIN_1)
|
||
|
#define V_BRIDGE_POWER_ON gpio_bit_set(GPIOE,GPIO_PIN_1)
|
||
|
|
||
|
|
||
|
void motor3606_io_Init();
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
#endif
|