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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 << "Error: " << x;
  11. #define SERIAL_ERRORLN(x) Serial << "Error: " << x<<endl;
  12. #define SERIAL_PROTOCOL(x) Serial << x;
  13. #define SERIAL_PROTOCOLLN(x) Serial << x<<endl;
  14. void get_command();
  15. void process_commands();
  16. void manage_inactivity(byte debug);
  17. #if X_ENABLE_PIN > -1
  18. #define enable_x() WRITE(X_ENABLE_PIN, X_ENABLE_ON)
  19. #define disable_x() WRITE(X_ENABLE_PIN,!X_ENABLE_ON)
  20. #else
  21. #define enable_x() ;
  22. #define disable_x() ;
  23. #endif
  24. #if Y_ENABLE_PIN > -1
  25. #define enable_y() WRITE(Y_ENABLE_PIN, Y_ENABLE_ON)
  26. #define disable_y() WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON)
  27. #else
  28. #define enable_y() ;
  29. #define disable_y() ;
  30. #endif
  31. #if Z_ENABLE_PIN > -1
  32. #define enable_z() WRITE(Z_ENABLE_PIN, Z_ENABLE_ON)
  33. #define disable_z() WRITE(Z_ENABLE_PIN,!Z_ENABLE_ON)
  34. #else
  35. #define enable_z() ;
  36. #define disable_z() ;
  37. #endif
  38. #if E_ENABLE_PIN > -1
  39. #define enable_e() WRITE(E_ENABLE_PIN, E_ENABLE_ON)
  40. #define disable_e() WRITE(E_ENABLE_PIN,!E_ENABLE_ON)
  41. #else
  42. #define enable_e() ;
  43. #define disable_e() ;
  44. #endif
  45. enum AxisEnum {X_AXIS=0, Y_AXIS=1, Z_AXIS=2, E_AXIS=3};
  46. void FlushSerialRequestResend();
  47. void ClearToSend();
  48. void get_coordinates();
  49. void prepare_move();
  50. void kill();
  51. void enquecommand(const char *cmd); //put an ascii command at the end of the current buffer.
  52. #ifndef CRITICAL_SECTION_START
  53. #define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
  54. #define CRITICAL_SECTION_END SREG = _sreg;
  55. #endif //CRITICAL_SECTION_START
  56. extern float homing_feedrate[];
  57. extern bool axis_relative_modes[];
  58. #endif