Add board MKS_BASE_HEROIC (#9924)

Followup to #9008

- Don't define micro-stepping pins for boards that lack them.
- Allow setting of 128 microsteps with `M350`.
This commit is contained in:
Scott Lahteine 2018-03-03 23:14:28 -06:00 committed by GitHub
parent b6fa55aa37
commit 1f488292cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 62 additions and 22 deletions

View file

@ -1594,10 +1594,15 @@ void Stepper::report_positions() {
void Stepper::microstep_mode(const uint8_t driver, const uint8_t stepping_mode) {
switch (stepping_mode) {
case 1: microstep_ms(driver, MICROSTEP1); break;
case 2: microstep_ms(driver, MICROSTEP2); break;
case 4: microstep_ms(driver, MICROSTEP4); break;
#if ENABLED(HEROIC_STEPPER_DRIVERS)
case 128: microstep_ms(driver, MICROSTEP128); break;
#else
case 2: microstep_ms(driver, MICROSTEP2); break;
case 4: microstep_ms(driver, MICROSTEP4); break;
#endif
case 8: microstep_ms(driver, MICROSTEP8); break;
case 16: microstep_ms(driver, MICROSTEP16); break;
default: SERIAL_ERROR_START(); SERIAL_ERRORLNPGM("Microsteps unavailable"); break;
}
}