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.

enum.h 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2019 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. #pragma once
  23. /**
  24. * Axis indices as enumerated constants
  25. *
  26. * - X_AXIS, Y_AXIS, and Z_AXIS should be used for axes in Cartesian space
  27. * - A_AXIS, B_AXIS, and C_AXIS should be used for Steppers, corresponding to XYZ on Cartesians
  28. * - X_HEAD, Y_HEAD, and Z_HEAD should be used for Steppers on Core kinematics
  29. */
  30. enum AxisEnum : unsigned char {
  31. X_AXIS = 0,
  32. A_AXIS = 0,
  33. Y_AXIS = 1,
  34. B_AXIS = 1,
  35. Z_AXIS = 2,
  36. C_AXIS = 2,
  37. E_AXIS = 3,
  38. X_HEAD = 4,
  39. Y_HEAD = 5,
  40. Z_HEAD = 6,
  41. ALL_AXES = 0xFE,
  42. NO_AXIS = 0xFF
  43. };
  44. #if HAS_DRIVER(L6470)
  45. enum L6470_driver_enum : unsigned char { X, Y, Z, X2, Y2, Z2, Z3, E0, E1, E2, E3, E4, E5 };
  46. #endif
  47. #define LOOP_S_LE_N(VAR, S, N) for (uint8_t VAR=(S); VAR<=(N); VAR++)
  48. #define LOOP_S_L_N(VAR, S, N) for (uint8_t VAR=(S); VAR<(N); VAR++)
  49. #define LOOP_LE_N(VAR, N) LOOP_S_LE_N(VAR, 0, N)
  50. #define LOOP_L_N(VAR, N) LOOP_S_L_N(VAR, 0, N)
  51. #define LOOP_NA(VAR) LOOP_L_N(VAR, NUM_AXIS)
  52. #define LOOP_XYZ(VAR) LOOP_S_LE_N(VAR, X_AXIS, Z_AXIS)
  53. #define LOOP_XYZE(VAR) LOOP_S_LE_N(VAR, X_AXIS, E_AXIS)
  54. #define LOOP_XYZE_N(VAR) LOOP_S_L_N(VAR, X_AXIS, XYZE_N)
  55. #define LOOP_ABC(VAR) LOOP_S_LE_N(VAR, A_AXIS, C_AXIS)
  56. #define LOOP_ABCE(VAR) LOOP_S_LE_N(VAR, A_AXIS, E_AXIS)
  57. #define LOOP_ABCE_N(VAR) LOOP_S_L_N(VAR, A_AXIS, XYZE_N)
  58. typedef enum {
  59. LINEARUNIT_MM,
  60. LINEARUNIT_INCH
  61. } LinearUnit;
  62. typedef enum {
  63. TEMPUNIT_C,
  64. TEMPUNIT_K,
  65. TEMPUNIT_F
  66. } TempUnit;