mmu2_power.cpp 506 B

12345678910111213141516171819202122232425
  1. #include "mmu2_power.h"
  2. #include "Configuration_prusa.h"
  3. #include "pins.h"
  4. #include "fastio.h"
  5. #include <util/delay.h>
  6. namespace MMU2 {
  7. // sadly, on MK3 we cannot do this on HW
  8. void power_on() { }
  9. void power_off() { }
  10. void reset() {
  11. #ifdef MMU_HWRESET // HW - pulse reset pin
  12. WRITE(MMU_RST_PIN, 0);
  13. _delay_us(100);
  14. WRITE(MMU_RST_PIN, 1);
  15. #else // SW - send X0 command
  16. // mmu_puts_P(PSTR("X0\n"));
  17. #error todo send command if hardware pin not available
  18. #endif
  19. }
  20. } // namespace MMU2