From 14ee8decf7dab46940e57ac2a6a708e0a40e6bcb Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 1 Jan 2023 14:29:41 +0100 Subject: [PATCH] Update changelogs Add support for PCA9632 4-channel 8-bit PWM driver as light driver by Pascal Heinrich (#17557) --- CHANGELOG.md | 1 + CODE_OWNERS.md | 1 + I2CDEVICES.md | 2 +- RELEASENOTES.md | 1 + tasmota/my_user_config.h | 2 +- tasmota/tasmota_support/support_features.ino | 5 +++-- .../{xdrv_91_pca9632.ino => xdrv_64_pca9632.ino} | 12 ++++++------ tools/decode-status.py | 5 +++-- 8 files changed, 17 insertions(+), 12 deletions(-) rename tasmota/tasmota_xdrv_driver/{xdrv_91_pca9632.ino => xdrv_64_pca9632.ino} (97%) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa65860d4..40027b536 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. ## [12.3.1.3] ### Added +- Support for PCA9632 4-channel 8-bit PWM driver as light driver by Pascal Heinrich (#17557) ### Breaking Changed diff --git a/CODE_OWNERS.md b/CODE_OWNERS.md index b2c3231cb..b5c0577fc 100644 --- a/CODE_OWNERS.md +++ b/CODE_OWNERS.md @@ -72,6 +72,7 @@ In addition to @arendst the following code is mainly owned by: | xdrv_61_ds3502 | f-reiling | xdrv_62_improv | @arendst | xdrv_63_modbus_bridge | @jeroenst +| xdrv_64_pca9632 | Pascal Heinrich | | | xdrv_79_esp32_ble | @staars, @btsimonh | xdrv_81_esp32_webcam | @gemu, @philrich diff --git a/I2CDEVICES.md b/I2CDEVICES.md index 9c9da3c0d..6523d9117 100644 --- a/I2CDEVICES.md +++ b/I2CDEVICES.md @@ -109,4 +109,4 @@ Index | Define | Driver | Device | Address(es) | Description 72 | USE_INA3221 | xsns_100 | INA3221 | 0x40-0x43 | 3-channels Voltage and Current sensor 73 | USE_HMC5883L | xsns_101 | HMC5883L | 0x1E | 3-channels Magnetic Field Sensor 74 | USE_DISPLAY_TM1650 | xdsp_20 | TM1650 | 0x24 - 0x27, 0x34 - 0x37 | Four-digit seven-segment LED controller - 75 | USE_PCA9632 | xdrv_91 | PCA9632 | 0x60 | 4-channel 4-bit pwm driver + 75 | USE_PCA9632 | xdrv_64 | PCA9632 | 0x60 | 4-channel 4-bit pwm driver diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 45d675c60..7c2b9fbde 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -113,6 +113,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm - Support for IPv6 DNS records (AAAA) and IPv6 ``Ping`` for ESP32 and ESP8266 [#17417](https://github.com/arendst/Tasmota/issues/17417) - Support for IPv6 only networks on Ethernet (not yet Wifi) - Support for TM1650 display as used in some clocks by Stefan Oskamp [#17594](https://github.com/arendst/Tasmota/issues/17594) +- Support for PCA9632 4-channel 8-bit PWM driver as light driver by Pascal Heinrich [#17557](https://github.com/arendst/Tasmota/issues/17557) - Berry support for ``crypto.SHA256`` [#17430](https://github.com/arendst/Tasmota/issues/17430) - Berry crypto add ``EC_P256`` and ``PBKDF2_HMAC_SHA256`` algorithms required by Matter protocol [#17473](https://github.com/arendst/Tasmota/issues/17473) - Berry crypto add ``random`` to generate series of random bytes diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index e95f42e14..4216d088d 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -632,7 +632,7 @@ // #define USE_PCA9685 // [I2cDriver1] Enable PCA9685 I2C HW PWM Driver - Must define I2C Address in #define USE_PCA9685_ADDR below - range 0x40 - 0x47 (+1k4 code) // #define USE_PCA9685_ADDR 0x40 // Enable PCA9685 I2C Address to use (Must be within range 0x40 through 0x47 - set according to your wired setup) // #define USE_PCA9685_FREQ 50 // Define default PWM frequency in Hz to be used (must be within 24 to 1526) - If other value is used, it will rever to 50Hz -// #define USE_PCA9632 // [I2cDriver75] Enable PCA9632 I2C HW PWM Driver +// #define USE_PCA9632 // [I2cDriver75] Enable PCA9632 I2C HW PWM Driver (+1k8 code) // #define USE_PCA9632_ADDR 0x60 // Define PCA9685 I2C Address to use (Must be within range 0x60 through 0x63 - set according to your wired setup) // #define USE_PCA9632_CM_0 0 // Mapping for channel 0 // #define USE_PCA9632_CM_1 1 // Mapping for channel 1 diff --git a/tasmota/tasmota_support/support_features.ino b/tasmota/tasmota_support/support_features.ino index bf698bbbb..78a1d7d74 100644 --- a/tasmota/tasmota_support/support_features.ino +++ b/tasmota/tasmota_support/support_features.ino @@ -864,8 +864,9 @@ void ResponseAppendFeatures(void) #if defined(USE_I2C) && defined(USE_DISPLAY) && defined(USE_DISPLAY_TM1650) feature9 |= 0x00001000; // xdsp_20_tm1650.ino #endif - -// feature9 |= 0x00002000; +#if defined(USE_I2C) && defined(USE_PCA9632) + feature9 |= 0x00002000; +#endif // feature9 |= 0x00004000; // feature9 |= 0x00008000; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_91_pca9632.ino b/tasmota/tasmota_xdrv_driver/xdrv_64_pca9632.ino similarity index 97% rename from tasmota/tasmota_xdrv_driver/xdrv_91_pca9632.ino rename to tasmota/tasmota_xdrv_driver/xdrv_64_pca9632.ino index acf7d1c60..7c36c6ab3 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_91_pca9632.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_64_pca9632.ino @@ -1,5 +1,5 @@ /* - xdrv_91_pca9632.ino - Support for I2C PCA9632 4-channel 8-bit hardware PWM driver on Tasmota + xdrv_64_pca9632.ino - Support for I2C PCA9632 4-channel 8-bit hardware PWM driver on Tasmota Copyright (C) 2022 Pascal Heinrich @@ -25,7 +25,7 @@ * I2C Address: 0x60 .. 0x63 \*********************************************************************************************/ -#define XDRV_91 91 +#define XDRV_64 64 #define XI2C_75 75 // See I2CDEVICES.md #define PCA9632_REG_MODE1 0x00 @@ -41,7 +41,7 @@ #define PCA9632_AUTO_INC 0x80 #ifndef USE_PCA9632_ADDR - #define USE_PCA9632_ADDR 0x62 + #define USE_PCA9632_ADDR 0x60 #endif #ifndef USE_PCA9632_CM_0 @@ -109,7 +109,7 @@ bool PCA9632_SetInvert(bool on) { } bool PCA9632_SetPWM(uint8_t pin, uint8_t pwm) { - + uint8_t pin_mapping = PCA9632_PinMapping(pin); I2cWrite8(USE_PCA9632_ADDR, PCA9632_REG_PWM_BASE + pin_mapping, pwm); pca9632_pin_pwm_value[pin_mapping] = pwm; @@ -244,7 +244,7 @@ uint8_t PCA9632_PinMapping(uint8_t pin) { } } -bool Xdrv91(uint32_t function) { +bool Xdrv64(uint32_t function) { if (!I2cEnabled(XI2C_75)) { return false; } bool result = false; @@ -262,7 +262,7 @@ bool Xdrv91(uint32_t function) { } break; case FUNC_COMMAND_DRIVER: - if (XDRV_91 == XdrvMailbox.index) { + if (XDRV_64 == XdrvMailbox.index) { result = PCA9632_Command(); } break; diff --git a/tools/decode-status.py b/tools/decode-status.py index 64177ba48..efc5d0d48 100755 --- a/tools/decode-status.py +++ b/tools/decode-status.py @@ -203,7 +203,8 @@ a_setoption = [[ ],[ "(ESP32) Show ESP32 internal temperature sensor", "(MQTT) Disable publish SSerialReceived MQTT messages, you must use event trigger rules instead", - "","", + "(Light) start DMX ArtNet at boot, listen to UDP port as soon as network is up", + "(Wifi) prefer IPv6 DNS resolution to IPv4 address when available. Requires `#define USE_IPV6`", "","","","", "","","","", "","","","", @@ -289,7 +290,7 @@ a_features = [[ "USE_SGP40","USE_LUXV30B","USE_CANSNIFFER","USE_QMC5883L", "USE_MODBUS_ENERGY","USE_SHELLY_PRO","USE_DALI","USE_BP1658CJ", "USE_DINGTIAN_RELAY","USE_HMC5883L","USE_LD2410","USE_ME007", - "USE_DISPLAY_TM1650","","","", + "USE_DISPLAY_TM1650","USE_PCA9632","","", "","","","", "","","","", "","","","",