From 1b921b246b873c0548c7625c57491c7d7b36fd5a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 13 Aug 2018 02:40:22 -0500 Subject: [PATCH] Fix pca9632_set_led_color MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …when used with an I2C screen. Co-Authored-By: soimy --- Marlin/src/feature/leds/pca9632.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/feature/leds/pca9632.cpp b/Marlin/src/feature/leds/pca9632.cpp index a95a48190a..11298f4efe 100644 --- a/Marlin/src/feature/leds/pca9632.cpp +++ b/Marlin/src/feature/leds/pca9632.cpp @@ -100,9 +100,9 @@ static void PCA9632_WriteAllRegisters(const byte addr, const byte regadd, const #endif void pca9632_set_led_color(const LEDColor &color) { + Wire.begin(); if (!PCA_init) { PCA_init = 1; - Wire.begin(); PCA9632_WriteRegister(PCA9632_ADDRESS,PCA9632_MODE1, PCA9632_MODE1_VALUE); PCA9632_WriteRegister(PCA9632_ADDRESS,PCA9632_MODE2, PCA9632_MODE2_VALUE); }