Implement MMU hw reset
This commit is contained in:
parent
cc177ec5ad
commit
c201a5791a
|
|
@ -98,6 +98,11 @@ MMU2::MMU2()
|
||||||
}
|
}
|
||||||
|
|
||||||
void MMU2::Start() {
|
void MMU2::Start() {
|
||||||
|
#ifdef MMU_HWRESET
|
||||||
|
WRITE(MMU_RST_PIN, 1);
|
||||||
|
SET_OUTPUT(MMU_RST_PIN); // setup reset pin
|
||||||
|
#endif //MMU_HWRESET
|
||||||
|
|
||||||
mmu2Serial.begin(MMU_BAUD);
|
mmu2Serial.begin(MMU_BAUD);
|
||||||
|
|
||||||
PowerOn();
|
PowerOn();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
#include "mmu2_power.h"
|
#include "mmu2_power.h"
|
||||||
|
#include "Configuration_prusa.h"
|
||||||
|
#include "pins.h"
|
||||||
|
#include "fastio.h"
|
||||||
|
#include <util/delay.h>
|
||||||
|
|
||||||
namespace MMU2 {
|
namespace MMU2 {
|
||||||
|
|
||||||
|
|
@ -7,6 +11,15 @@ void power_on() { }
|
||||||
|
|
||||||
void power_off() { }
|
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
|
} // namespace MMU2
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue