1. SensorPosition_cfg.c:
void SensorPosition_ReadRequiredPorts ( Spo_RequiredPortsT * aps_RequiredPorts )
{
/* SwcCddHallSensor A+B */
SCI_Read_HallSensor_PulseCounter (&aps_RequiredPorts->u16_PulsCounter [E_SPO_SPINDLE_PRIMARY] , E_SHA_HALL_SECONDARY);
SCI_Read_HallSensor_Rpm (&aps_RequiredPorts->u16_RPM [E_SPO_SPINDLE_PRIMARY] , E_SHA_HALL_SECONDARY);
SCI_Read_HallSensor_Moving (&aps_RequiredPorts->b_Moving [E_SPO_SPINDLE_PRIMARY] , E_SHA_HALL_SECONDARY);
SCI_Read_HallSensor_ErrorStuck (&aps_RequiredPorts->b_ErrorStuckHall [E_SPO_SPINDLE_PRIMARY] , E_SHA_HALL_SECONDARY);
SCI_Read_HallSensor_Direction (&aps_RequiredPorts->e_Direction [E_SPO_SPINDLE_PRIMARY] , E_SHA_HALL_SECONDARY);
just make right work, do not consider hardware
原文:https://www.cnblogs.com/dannykong/p/10930737.html