aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2025-07-14 12:58:38 -0400
committerKevin O'Connor <kevin@koconnor.net>2025-07-22 14:04:50 -0400
commit354b1e666b92d1b51bf19b3d834848d6ce1639df (patch)
tree8d86a63f2333759da563fc01cb5794a551dcbc11
parent46912431794c02e468d4bcb2ccd3b41ab6911ba7 (diff)
downloadkutter-354b1e666b92d1b51bf19b3d834848d6ce1639df.tar.gz
kutter-354b1e666b92d1b51bf19b3d834848d6ce1639df.tar.xz
kutter-354b1e666b92d1b51bf19b3d834848d6ce1639df.zip
pca9632: Remove custom software i2c - use normal mcu software i2c instead
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--docs/Config_Changes.md4
-rw-r--r--docs/Config_Reference.md5
-rw-r--r--klippy/extras/pca9632.py7
-rw-r--r--test/klippy/led.cfg4
4 files changed, 8 insertions, 12 deletions
diff --git a/docs/Config_Changes.md b/docs/Config_Changes.md
index 87bcc971..00179192 100644
--- a/docs/Config_Changes.md
+++ b/docs/Config_Changes.md
@@ -8,6 +8,10 @@ All dates in this document are approximate.
## Changes
+20250721: The `[pca9632]` module no longer accepts the `scl_pin` and
+`sda_pin` options. Use `i2c_software_scl_pin` and
+`i2c_software_sda_pin` instead.
+
20250428: The maximum `cycle_time` for pwm `[output_pin]`,
`[pwm_cycle_time]`, `[pwm_tool]`, and similar config sections is now 3
seconds (reduced from 5 seconds). The `maximum_mcu_duration` in
diff --git a/docs/Config_Reference.md b/docs/Config_Reference.md
index d9125d47..bc99bd94 100644
--- a/docs/Config_Reference.md
+++ b/docs/Config_Reference.md
@@ -3477,11 +3477,6 @@ PCA9632 LED support. The PCA9632 is used on the FlashForge Dreamer.
#i2c_speed:
# See the "common I2C settings" section for a description of the
# above parameters.
-#scl_pin:
-#sda_pin:
-# Alternatively, if the pca9632 is not connected to a hardware I2C
-# bus, then one may specify the "clock" (scl_pin) and "data"
-# (sda_pin) pins. The default is to use hardware I2C.
#color_order: RGBW
# Set the pixel order of the LED (using a string containing the
# letters R, G, B, W). The default is RGBW.
diff --git a/klippy/extras/pca9632.py b/klippy/extras/pca9632.py
index 8a3551cf..b8a813c3 100644
--- a/klippy/extras/pca9632.py
+++ b/klippy/extras/pca9632.py
@@ -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,))
diff --git a/test/klippy/led.cfg b/test/klippy/led.cfg
index d134490f..c7f685d7 100644
--- a/test/klippy/led.cfg
+++ b/test/klippy/led.cfg
@@ -25,8 +25,8 @@ initial_GREEN: 0.2
initial_BLUE: 0.3
[pca9632 p6led]
-scl_pin: PB1
-sda_pin: PB2
+i2c_software_scl_pin: PB1
+i2c_software_sda_pin: PB2
initial_RED: 0.4
initial_GREEN: 0.5
initial_BLUE: 0.6