Browse Source

Tiny improvement to M7219

The registers within the Max7219 can get corrupted a number of ways.  This allows the Max7219 to be reset and fully initialized.
And...  it also allows the user to see the initialization pattern.
pull/1/head
Roxy-3D 7 years ago
committed by GitHub
parent
commit
7c54c4ed27
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Marlin/src/gcode/feature/leds/M7219.cpp

2
Marlin/src/gcode/feature/leds/M7219.cpp

@ -39,7 +39,7 @@
*/ */
void GcodeSuite::M7219() { void GcodeSuite::M7219() {
if (parser.seen('I')) if (parser.seen('I'))
for (uint8_t r = 0; r < 8; r++) Max7219_Set_Row(r, 0); Max7219_init();
else if (parser.seenval('R')) { else if (parser.seenval('R')) {
const uint8_t r = parser.value_int(); const uint8_t r = parser.value_int();
Max7219_Set_Row(r, parser.byteval('V')); Max7219_Set_Row(r, parser.byteval('V'));

Loading…
Cancel
Save