Add en- and disable MMU to M709
Add X42 to erase the MMU eeprom
This commit is contained in:
parent
a76e1290e8
commit
69cb7add26
|
|
@ -8581,14 +8581,15 @@ Sigma_Exit:
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
### M709 - MMU reset <a href="https://reprap.org/wiki/G-code#M709:_MMU_reset">M709: MMU reset</a>
|
### M709 - MMU power & reset <a href="https://reprap.org/wiki/G-code#M709:_MMU_power_&_reset">M709: MMU power & reset</a>
|
||||||
The MK3S cannot not power off the MMU, for that reason the functionality is not supported.
|
The MK3S cannot not power off the MMU, but we can en- and disable the MMU.
|
||||||
#### Usage
|
#### Usage
|
||||||
|
|
||||||
M709 [ X ]
|
M709 [ S | X ]
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
- `X` - Reset MMU (0:soft reset | 1:hardware reset)
|
- `X` - Reset MMU (0:soft reset | 1:hardware reset | 42: erease MMU eeprom)
|
||||||
|
- `S` - En-/disable the MMU (0:off | 1:on)
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
|
|
@ -8596,9 +8597,28 @@ Sigma_Exit:
|
||||||
|
|
||||||
M709 X1 - toggle the MMU's reset pin (hardware reset)
|
M709 X1 - toggle the MMU's reset pin (hardware reset)
|
||||||
|
|
||||||
|
M709 S1 - enable MMU
|
||||||
|
|
||||||
|
M709 S0 - disable MMU
|
||||||
|
|
||||||
|
M709 - Serial message if en- or disabled
|
||||||
*/
|
*/
|
||||||
case 709:
|
case 709:
|
||||||
{
|
{
|
||||||
|
if (code_seen('S'))
|
||||||
|
{
|
||||||
|
switch (code_value_uint8())
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
MMU2::mmu2.Stop();
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
MMU2::mmu2.Start();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (MMU2::mmu2.Enabled() && code_seen('X'))
|
if (MMU2::mmu2.Enabled() && code_seen('X'))
|
||||||
{
|
{
|
||||||
switch (code_value_uint8())
|
switch (code_value_uint8())
|
||||||
|
|
@ -8609,10 +8629,14 @@ Sigma_Exit:
|
||||||
case 1:
|
case 1:
|
||||||
MMU2::mmu2.Reset(MMU2::MMU2::ResetPin);
|
MMU2::mmu2.Reset(MMU2::MMU2::ResetPin);
|
||||||
break;
|
break;
|
||||||
|
case 42:
|
||||||
|
MMU2::mmu2.Reset(MMU2::MMU2::EraseEEPROM);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
printf_P(_n("MMU state:%d\n"), MMU2::mmu2.Enabled());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue