41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
/* USER CODE BEGIN Header */
|
|
/**
|
|
******************************************************************************
|
|
* @file motor_driver.h
|
|
* @brief 电机驱动头文件 - 双路AT8236-MS H桥驱动
|
|
******************************************************************************
|
|
* @attention
|
|
*
|
|
* AT8236-MS 双路H桥电机驱动芯片
|
|
* - 芯片1: TIM4_CH1 -> AIN1, TIM4_CH2 -> AIN2
|
|
* - 芯片2: TIM4_CH3 -> BIN1, TIM4_CH4 -> BIN2
|
|
* - 两路电机同步控制:同时启动、同时停止
|
|
******************************************************************************
|
|
*/
|
|
/* USER CODE END Header */
|
|
|
|
#ifndef __MOTOR_DRIVER_H__
|
|
#define __MOTOR_DRIVER_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* Includes ------------------------------------------------------------------*/
|
|
#include "main.h"
|
|
|
|
void Motor_Init(void);
|
|
void Motor_Stop(void) ;
|
|
void Motor_StartupBoost(void);
|
|
void Motor_SetGear(uint8_t gear);
|
|
void Motor_NextGear(void);
|
|
void Motor_GearUp(void);
|
|
void Motor_GearDown(void);
|
|
uint8_t Motor_GetGear(void);
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
#endif
|
|
|
|
#endif /* __MOTOR_DRIVER_H__ */
|