12345678910111213141516171819202122232425262728293031323334 |
- #include "mmu2_power.h"
- #include "Configuration_prusa.h"
- #include "pins.h"
- #include "fastio.h"
- #include <util/delay.h>
- #include "mmu2.h"
- #include "eeprom.h"
- namespace MMU2 {
- void power_on()
- {
- eeprom_update_byte((uint8_t *)EEPROM_MMU_ENABLED, true);
- }
- void power_off()
- {
- eeprom_update_byte((uint8_t *)EEPROM_MMU_ENABLED, false);
- }
- void reset() {
- #ifdef MMU_HWRESET
- WRITE(MMU_RST_PIN, 0);
- _delay_us(100);
- WRITE(MMU_RST_PIN, 1);
- #else
- mmu2.Reset(MMU2::Software);
- #endif
-
- }
- }
|