You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
1.1 KiB

2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
  1. #pragma once
  2. #include <stdint.h>
  3. #include <functional>
  4. #include "apibasic/basic.hpp"
  5. namespace iflytop {
  6. using namespace std;
  7. class ZIStepMotor {
  8. public:
  9. virtual ~ZIStepMotor() {}
  10. virtual int32_t step_motor_enable(int32_t enable) = 0;
  11. virtual int32_t step_motor_stop(int32_t breakstop) = 0;
  12. virtual int32_t step_motor_read_pos(int32_t* pos) = 0;
  13. virtual int32_t step_motor_easy_rotate(int32_t direction) = 0;
  14. virtual int32_t step_motor_easy_move_by(int32_t distance) = 0;
  15. virtual int32_t step_motor_easy_move_to(int32_t position) = 0;
  16. virtual int32_t step_motor_easy_move_to_zero() = 0;
  17. virtual int32_t step_motor_easy_set_current_pos(int32_t pos) = 0;
  18. virtual int32_t step_motor_easy_move_to_io(int32_t ioindex, int32_t direction) = 0;
  19. virtual int32_t step_motor_active_cfg() = 0;
  20. virtual int32_t step_motor_read_io_state(int32_t ioindex, int32_t* state) = 0;
  21. };
  22. } // namespace iflytop