30 lines
391 B
C
30 lines
391 B
C
|
#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;
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|