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.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. #ifndef __ENUM_H__
  23. #define __ENUM_H__
  24. /**
  25. * Axis indices as enumerated constants
  26. *
  27. * Special axis:
  28. * - A_AXIS and B_AXIS are used by COREXY printers
  29. * - X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship
  30. * between X_AXIS and X Head movement, like CoreXY bots
  31. */
  32. enum AxisEnum {
  33. NO_AXIS = -1,
  34. X_AXIS = 0,
  35. A_AXIS = 0,
  36. Y_AXIS = 1,
  37. B_AXIS = 1,
  38. Z_AXIS = 2,
  39. C_AXIS = 2,
  40. E_AXIS = 3,
  41. X_HEAD = 4,
  42. Y_HEAD = 5,
  43. Z_HEAD = 6,
  44. ALL_AXES = 100
  45. };
  46. #define LOOP_S_LE_N(VAR, S, N) for (uint8_t VAR=S; VAR<=N; VAR++)
  47. #define LOOP_S_L_N(VAR, S, N) for (uint8_t VAR=S; VAR<N; VAR++)
  48. #define LOOP_LE_N(VAR, N) LOOP_S_LE_N(VAR, 0, N)
  49. #define LOOP_L_N(VAR, N) LOOP_S_L_N(VAR, 0, N)
  50. #define LOOP_NA(VAR) LOOP_L_N(VAR, NUM_AXIS)
  51. #define LOOP_XYZ(VAR) LOOP_S_LE_N(VAR, X_AXIS, Z_AXIS)
  52. #define LOOP_XYZE(VAR) LOOP_S_LE_N(VAR, X_AXIS, E_AXIS)
  53. #define LOOP_XYZE_N(VAR) LOOP_S_L_N(VAR, X_AXIS, XYZE_N)
  54. #define LOOP_ABC(VAR) LOOP_S_LE_N(VAR, A_AXIS, C_AXIS)
  55. #define LOOP_ABCE(VAR) LOOP_S_LE_N(VAR, A_AXIS, E_AXIS)
  56. #define LOOP_ABCE_N(VAR) LOOP_S_L_N(VAR, A_AXIS, XYZE_N)
  57. typedef enum {
  58. LINEARUNIT_MM,
  59. LINEARUNIT_INCH
  60. } LinearUnit;
  61. typedef enum {
  62. TEMPUNIT_C,
  63. TEMPUNIT_K,
  64. TEMPUNIT_F
  65. } TempUnit;
  66. /**
  67. * SD Card
  68. */
  69. enum LsAction { LS_SerialPrint, LS_Count, LS_GetFilename };
  70. /**
  71. * Ultra LCD
  72. */
  73. enum LCDViewAction {
  74. LCDVIEW_NONE,
  75. LCDVIEW_REDRAW_NOW,
  76. LCDVIEW_CALL_REDRAW_NEXT,
  77. LCDVIEW_CLEAR_CALL_REDRAW,
  78. LCDVIEW_CALL_NO_REDRAW
  79. };
  80. #endif // __ENUM_H__