mmu.h 2.2 KB

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