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.

Marlin.h 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #ifndef __MARLINH
  2. #define __MARLINH
  3. // Tonokip RepRap firmware rewrite based off of Hydra-mmm firmware.
  4. // Licence: GPL
  5. #include <WProgram.h>
  6. #include "fastio.h"
  7. #include "streaming.h"
  8. #define SERIAL_ECHO(x) Serial << "echo: " << x;
  9. #define SERIAL_ECHOLN(x) Serial << "echo: "<<x<<endl;
  10. #define SERIAL_ERROR(x) Serial << "echo: ERROR: " << x;
  11. #define SERIAL_ERRORLN(x) Serial << "echo: ERROR: " << x<<endl;
  12. void get_command();
  13. void process_commands();
  14. void manage_inactivity(byte debug);
  15. #if X_ENABLE_PIN > -1
  16. #define enable_x() WRITE(X_ENABLE_PIN, X_ENABLE_ON)
  17. #define disable_x() WRITE(X_ENABLE_PIN,!X_ENABLE_ON)
  18. #else
  19. #define enable_x() ;
  20. #define disable_x() ;
  21. #endif
  22. #if Y_ENABLE_PIN > -1
  23. #define enable_y() WRITE(Y_ENABLE_PIN, Y_ENABLE_ON)
  24. #define disable_y() WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON)
  25. #else
  26. #define enable_y() ;
  27. #define disable_y() ;
  28. #endif
  29. #if Z_ENABLE_PIN > -1
  30. #define enable_z() WRITE(Z_ENABLE_PIN, Z_ENABLE_ON)
  31. #define disable_z() WRITE(Z_ENABLE_PIN,!Z_ENABLE_ON)
  32. #else
  33. #define enable_z() ;
  34. #define disable_z() ;
  35. #endif
  36. #if E_ENABLE_PIN > -1
  37. #define enable_e() WRITE(E_ENABLE_PIN, E_ENABLE_ON)
  38. #define disable_e() WRITE(E_ENABLE_PIN,!E_ENABLE_ON)
  39. #else
  40. #define enable_e() ;
  41. #define disable_e() ;
  42. #endif
  43. enum AxisEnum {X_AXIS=0, Y_AXIS=1, Z_AXIS=2, E_AXIS=3};
  44. void FlushSerialRequestResend();
  45. void ClearToSend();
  46. void get_coordinates();
  47. void prepare_move();
  48. void kill();
  49. void enquecommand(const char *cmd); //put an ascii command at the end of the current buffer.
  50. #ifndef CRITICAL_SECTION_START
  51. #define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
  52. #define CRITICAL_SECTION_END SREG = _sreg;
  53. #endif //CRITICAL_SECTION_START
  54. extern float homing_feedrate[];
  55. extern bool axis_relative_modes[];
  56. #endif