|
@@ -1,4 +1,8 @@
|
|
|
#include "mmu2_power.h"
|
|
|
+#include "Configuration_prusa.h"
|
|
|
+#include "pins.h"
|
|
|
+#include "fastio.h"
|
|
|
+#include <util/delay.h>
|
|
|
|
|
|
namespace MMU2 {
|
|
|
|
|
@@ -7,6 +11,15 @@ void power_on() { }
|
|
|
|
|
|
void power_off() { }
|
|
|
|
|
|
-void reset() { }
|
|
|
+void reset() {
|
|
|
+#ifdef MMU_HWRESET // HW - pulse reset pin
|
|
|
+ WRITE(MMU_RST_PIN, 0);
|
|
|
+ _delay_us(100);
|
|
|
+ WRITE(MMU_RST_PIN, 1);
|
|
|
+#else // SW - send X0 command
|
|
|
+ // mmu_puts_P(PSTR("X0\n"));
|
|
|
+ #error todo send command if hardware pin not available
|
|
|
+#endif
|
|
|
+}
|
|
|
|
|
|
} // namespace MMU2
|