RP-01/cva_asw_m0146/src/MotorCtrl.c

30 lines
391 B
C
Raw Normal View History

2024-05-14 16:05:43 +08:00
#include "MotorCtrl.h"
#include "hwctrl.h"
void MotorCtrl_Init(McuType *obj)
{
for (uint8_t i = 0; i < 6; i++)
{
hw_MotorCtrl(obj, i, Motor_ACT_NOACT);
}
}
void MotorCtrl_Maintask(McuType *obj)//10ms task
{
static uint8_t motor_cnt = 0,motor_act=0,run_count=0;
run_count++;
if (run_count > 100)
{
run_count = 0;
}
}