16 lines
360 B
C
16 lines
360 B
C
#include "main.h"
|
|
#include "motor.h"
|
|
#include "tim.h"
|
|
uint8_t Motor_Speed = 0;
|
|
int Motor_time = -1, Motor_tag = -1, Motor_start = 0;
|
|
|
|
void Motor_reset_ornot(void)
|
|
{
|
|
if (Motor_Speed == Motor_time)
|
|
{
|
|
Motor_Speed = 0;
|
|
Motor_time = 0;
|
|
Motor_tag = -1;
|
|
}
|
|
__HAL_TIM_SET_COMPARE(&htim15, TIM_CHANNEL_1, MOTORCCR(Motor_Speed));
|
|
} |