My Marlin configs for Fabrikator Mini and CTC i3 Pro B
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. /**
  23. stepper.h - stepper motor driver: executes motion plans of planner.c using the stepper motors
  24. Part of Grbl
  25. Copyright (c) 2009-2011 Simen Svale Skogsrud
  26. Grbl is free software: you can redistribute it and/or modify
  27. it under the terms of the GNU General Public License as published by
  28. the Free Software Foundation, either version 3 of the License, or
  29. (at your option) any later version.
  30. Grbl is distributed in the hope that it will be useful,
  31. but WITHOUT ANY WARRANTY; without even the implied warranty of
  32. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  33. GNU General Public License for more details.
  34. You should have received a copy of the GNU General Public License
  35. along with Grbl. If not, see <http://www.gnu.org/licenses/>.
  36. */
  37. #ifndef stepper_h
  38. #define stepper_h
  39. #include "planner.h"
  40. #include "stepper_indirection.h"
  41. #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
  42. extern bool abort_on_endstop_hit;
  43. #endif
  44. // Initialize and start the stepper motor subsystem
  45. void st_init();
  46. // Block until all buffered steps are executed
  47. void st_synchronize();
  48. // Set current position in steps
  49. void st_set_position(const long& x, const long& y, const long& z, const long& e);
  50. void st_set_e_position(const long& e);
  51. // Get current position in steps
  52. long st_get_position(uint8_t axis);
  53. // Get current axis position in mm
  54. float st_get_axis_position_mm(AxisEnum axis);
  55. // The stepper subsystem goes to sleep when it runs out of things to execute. Call this
  56. // to notify the subsystem that it is time to go to work.
  57. void st_wake_up();
  58. void checkHitEndstops(); //call from somewhere to create an serial error message with the locations the endstops where hit, in case they were triggered
  59. void endstops_hit_on_purpose(); //avoid creation of the message, i.e. after homing and before a routine call of checkHitEndstops();
  60. void enable_endstops(bool check); // Enable/disable endstop checking
  61. void enable_endstops_globally(bool check);
  62. void endstops_not_homing();
  63. void checkStepperErrors(); //Print errors detected by the stepper
  64. void finishAndDisableSteppers();
  65. extern block_t* current_block; // A pointer to the block currently being traced
  66. void quickStop();
  67. #if HAS_DIGIPOTSS
  68. void digitalPotWrite(int address, int value);
  69. #endif
  70. void microstep_ms(uint8_t driver, int8_t ms1, int8_t ms2);
  71. void microstep_mode(uint8_t driver, uint8_t stepping);
  72. void digipot_init();
  73. void digipot_current(uint8_t driver, int current);
  74. void microstep_init();
  75. void microstep_readings();
  76. #if ENABLED(Z_DUAL_ENDSTOPS)
  77. void In_Homing_Process(bool state);
  78. void Lock_z_motor(bool state);
  79. void Lock_z2_motor(bool state);
  80. #endif
  81. #if ENABLED(BABYSTEPPING)
  82. void babystep(const uint8_t axis, const bool direction); // perform a short step with a single stepper motor, outside of any convention
  83. #endif
  84. #endif