neopixel: Rework timing so that it works on AVR micro-controllers

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-08-07 15:34:08 -04:00
parent 383fb1dbfd
commit f6d1ab2ea2
2 changed files with 101 additions and 66 deletions

View file

@ -35,9 +35,6 @@ class PrinterNeoPixel:
self.cmd_SET_LED,
desc=self.cmd_SET_LED_help)
def build_config(self):
if self.mcu.get_constant_float('CLOCK_FREQ') <= 20000000:
raise self.printer.config_error(
"Neopixel is not supported on AVR micro-controllers")
cmd_queue = self.mcu.alloc_command_queue()
self.neopixel_send_cmd = self.mcu.lookup_command(
"neopixel_send oid=%c data=%*s", cq=cmd_queue)