diff --git a/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp b/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp index 802cde9..6b57c71 100644 --- a/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp +++ b/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp @@ -210,6 +210,13 @@ int32_t StepMotorCtrlModule::step_motor_read_tmc2160_state(int32_t* status) { return 0; }; +int32_t StepMotorCtrlModule::step_motor_read_io_index_in_stm32(int32_t ioindex, int32_t* index_in_stm32) { + if (ioindex < 0 || ioindex >= m_nio) { + return err::kstep_motor_ioindex_out_of_range; + } + return 0; +} + /*********************************************************************************************************************** * INTER * ***********************************************************************************************************************/ diff --git a/components/step_motor_ctrl_module/step_motor_ctrl_module.hpp b/components/step_motor_ctrl_module/step_motor_ctrl_module.hpp index 01d059f..7da3094 100644 --- a/components/step_motor_ctrl_module/step_motor_ctrl_module.hpp +++ b/components/step_motor_ctrl_module/step_motor_ctrl_module.hpp @@ -93,6 +93,8 @@ class StepMotorCtrlModule : public ZIModule, public ZIStepMotor { virtual int32_t step_motor_read_tmc2160_status(int32_t* status) override; virtual int32_t step_motor_read_tmc2160_state(int32_t* status) override; + virtual int32_t step_motor_read_io_index_in_stm32(int32_t ioindex, int32_t* index_in_stm32) override; + public: IStepperMotor* getMotor() { return m_stepM1; } config_t* getCfg() { return &m_cfg; }