mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-26 16:14:00 -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
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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,))
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue