mmu.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. //mmu.h
  2. #include <inttypes.h>
  3. extern bool mmu_enabled;
  4. extern int8_t mmu_state;
  5. extern uint8_t mmu_extruder;
  6. extern uint8_t tmp_extruder;
  7. extern int8_t mmu_finda;
  8. extern int16_t mmu_version;
  9. extern int16_t mmu_buildnr;
  10. #define MMU_CMD_NONE 0
  11. #define MMU_CMD_T0 0x10
  12. #define MMU_CMD_T1 0x11
  13. #define MMU_CMD_T2 0x12
  14. #define MMU_CMD_T3 0x13
  15. #define MMU_CMD_T4 0x14
  16. #define MMU_CMD_L0 0x20
  17. #define MMU_CMD_L1 0x21
  18. #define MMU_CMD_L2 0x22
  19. #define MMU_CMD_L3 0x23
  20. #define MMU_CMD_L4 0x24
  21. #define MMU_CMD_C0 0x30
  22. #define MMU_CMD_U0 0x40
  23. #define MMU_CMD_E0 0x50
  24. #define MMU_CMD_E1 0x51
  25. #define MMU_CMD_E2 0x52
  26. #define MMU_CMD_E3 0x53
  27. #define MMU_CMD_E4 0x54
  28. #define MMU_CMD_R0 0x60
  29. extern int mmu_puts_P(const char* str);
  30. extern int mmu_printf_P(const char* format, ...);
  31. extern int8_t mmu_rx_ok(void);
  32. extern void mmu_init(void);
  33. extern void mmu_loop(void);
  34. extern void mmu_reset(void);
  35. extern int8_t mmu_set_filament_type(uint8_t extruder, uint8_t filament);
  36. extern void mmu_command(uint8_t cmd);
  37. extern bool mmu_get_response(void);
  38. extern void manage_response(bool move_axes, bool turn_off_nozzle);
  39. extern void mmu_load_to_nozzle();
  40. extern void mmu_M600_load_filament(bool automatic);
  41. extern void mmu_M600_wait_and_beep();
  42. extern void extr_mov(float shift, float feed_rate);
  43. extern void change_extr(int extr);
  44. extern int get_ext_nr();
  45. extern void display_loading();
  46. extern void extr_adj(int extruder);
  47. extern void extr_unload();
  48. extern void extr_adj_0();
  49. extern void extr_adj_1();
  50. extern void extr_adj_2();
  51. extern void extr_adj_3();
  52. extern void extr_adj_4();
  53. extern void load_all();
  54. extern void extr_change_0();
  55. extern void extr_change_1();
  56. extern void extr_change_2();
  57. extern void extr_change_3();
  58. extern void extr_unload_all();
  59. extern void extr_unload_used();
  60. extern void extr_unload_0();
  61. extern void extr_unload_1();
  62. extern void extr_unload_2();
  63. extern void extr_unload_3();
  64. extern void extr_unload_4();
  65. extern bool mmu_check_version();
  66. extern void mmu_show_warning();
  67. extern void mmu_eject_filament(uint8_t filament, bool recover);
  68. extern void mmu_eject_fil_0();
  69. extern void mmu_eject_fil_1();
  70. extern void mmu_eject_fil_2();
  71. extern void mmu_eject_fil_3();
  72. extern void mmu_eject_fil_4();