tmc2130.h 1006 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef TMC2130_H
  2. #define TMC2130_H
  3. //holding and running currents
  4. extern uint8_t tmc2130_current_h[4];
  5. extern uint8_t tmc2130_current_r[4];
  6. //flags for axis stall detection
  7. extern uint8_t tmc2130_axis_stalled[4];
  8. extern uint8_t sg_homing_delay;
  9. //initialize tmc2130
  10. extern void tmc2130_init();
  11. //update stall guard (called from st_synchronize inside the loop)
  12. extern bool tmc2130_update_sg();
  13. //temperature watching (called from )
  14. extern void tmc2130_check_overtemp();
  15. //enter homing (called from homeaxis before homing starts)
  16. extern void tmc2130_home_enter(uint8_t axis);
  17. //exit homing (called from homeaxis after homing ends)
  18. extern void tmc2130_home_exit();
  19. //
  20. extern uint8_t tmc2130_didLastHomingStall();
  21. //set holding current for any axis (G911)
  22. extern void tmc2130_set_current_h(uint8_t axis, uint8_t current);
  23. //set running current for any axis (G912)
  24. extern void tmc2130_set_current_r(uint8_t axis, uint8_t current);
  25. //print currents
  26. extern void tmc2130_print_currents();
  27. #endif //TMC2130_H