mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-02 03:24:02 -06:00
pca9632: Remove custom software i2c - use normal mcu software i2c instead
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
4691243179
commit
354b1e666b
4 changed files with 8 additions and 12 deletions
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 2022 Ricardo Alcantara <ricardo@vulcanolabs.com>
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
from . import bus, led, mcp4018
|
||||
from . import bus, led
|
||||
|
||||
BACKGROUND_PRIORITY_CLOCK = 0x7fffffff00000000
|
||||
|
||||
|
@ -25,10 +25,7 @@ PCA9632_LED3 = 0x06
|
|||
class PCA9632:
|
||||
def __init__(self, config):
|
||||
self.printer = printer = config.get_printer()
|
||||
if config.get("scl_pin", None) is not None:
|
||||
self.i2c = mcp4018.SoftwareI2C(config, 98)
|
||||
else:
|
||||
self.i2c = bus.MCU_I2C_from_config(config, default_addr=98)
|
||||
self.i2c = bus.MCU_I2C_from_config(config, default_addr=98)
|
||||
color_order = config.get("color_order", "RGBW")
|
||||
if sorted(color_order) != sorted("RGBW"):
|
||||
raise config.error("Invalid color_order '%s'" % (color_order,))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue