Browse Source

update

master
zhaohe 1 year ago
parent
commit
3f9c3c6526
  1. 6
      chip/zgpio.hpp
  2. 3
      components/step_motor_ctrl_module/step_motor_ctrl_module.cpp

6
chip/zgpio.hpp

@ -85,9 +85,11 @@ class ZGPIO {
bool setState(bool state);
void toggleState();
Pin_t getPin() { return m_pin; }
IRQn_Type getEXTIIRQn();
GPIO_TypeDef *getPort() { return m_gpio; }
uint16_t getPin() { return m_pinoff; }
GPIO_TypeDef *getHalPinPort() { return m_gpio; }
uint16_t getHalPin() { return m_pinoff; }
bool tryTriggerIRQ(uint16_t GPIO_Pin);

3
components/step_motor_ctrl_module/step_motor_ctrl_module.cpp

@ -389,6 +389,9 @@ int32_t StepMotorCtrlModule::step_motor_easy_move_to_zero() {
if (m_nio == 0) {
return err::kstep_motor_ioindex_out_of_range;
}
if(m_iotable[0].getHalPin())
return do_step_motor_easy_move_to_zero();
}
int32_t StepMotorCtrlModule::step_motor_easy_move_to_io(int32_t ioindex, int32_t direction) {

Loading…
Cancel
Save