From 7b0a8e85ba624431a01951a9f7583513ef720008 Mon Sep 17 00:00:00 2001 From: Shen Yiming Date: Mon, 13 Aug 2018 07:05:00 +0800 Subject: [PATCH] Fix pca9632_set_led_color lost i2c connection (#11530) --- Marlin/pca9632.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/pca9632.cpp b/Marlin/pca9632.cpp index 2b4ee7f40..4c339f460 100644 --- a/Marlin/pca9632.cpp +++ b/Marlin/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); }