来源:电机控制 查看:1561 回复:0
uint8 motorstepbuf[4][4] = { {50,0,0,0}, {0,50,0,0}, {0,0,50,0}, {0,0,0,50}};#pragma vector=TIM4_OVR_UIF_vector__interrupt void TIM4_OVR_UIF(void) { static uint8 step = 0; if(++step > 3) { step = 0; } TIM1_CCR1L = motorstepbuf[step][0]; TIM1_CCR3L = motorstepbuf[step][1]; TIM1_CCR2L = motorstepbuf[step][2]; &nbs ...