[tlc59208f] Make mode constants inline constexpr (#14043)

This commit is contained in:
J. Nick Koston
2026-02-18 15:04:30 -06:00
committed by GitHub
parent 4a038978d2
commit 82cfa00a97
2 changed files with 8 additions and 18 deletions

View File

@@ -26,17 +26,7 @@ const uint8_t TLC59208F_MODE1_SUB3 = (1 << 1);
// 0: device doesn't respond to i2c all-call 3, 1*: responds to all-call
const uint8_t TLC59208F_MODE1_ALLCALL = (1 << 0);
// 0*: Group dimming, 1: Group blinking
const uint8_t TLC59208F_MODE2_DMBLNK = (1 << 5);
// 0*: Output change on Stop command, 1: Output change on ACK
const uint8_t TLC59208F_MODE2_OCH = (1 << 3);
// 0*: WDT disabled, 1: WDT enabled
const uint8_t TLC59208F_MODE2_WDTEN = (1 << 2);
// WDT timeouts
const uint8_t TLC59208F_MODE2_WDT_5MS = (0 << 0);
const uint8_t TLC59208F_MODE2_WDT_15MS = (1 << 0);
const uint8_t TLC59208F_MODE2_WDT_25MS = (2 << 0);
const uint8_t TLC59208F_MODE2_WDT_35MS = (3 << 0);
// TLC59208F MODE2 constants are now inline constexpr in tlc59208f_output.h
// --- Special function ---
// Call address to perform software reset, no devices will ACK

View File

@@ -9,16 +9,16 @@ namespace esphome {
namespace tlc59208f {
// 0*: Group dimming, 1: Group blinking
extern const uint8_t TLC59208F_MODE2_DMBLNK;
inline constexpr uint8_t TLC59208F_MODE2_DMBLNK = (1 << 5);
// 0*: Output change on Stop command, 1: Output change on ACK
extern const uint8_t TLC59208F_MODE2_OCH;
inline constexpr uint8_t TLC59208F_MODE2_OCH = (1 << 3);
// 0*: WDT disabled, 1: WDT enabled
extern const uint8_t TLC59208F_MODE2_WDTEN;
inline constexpr uint8_t TLC59208F_MODE2_WDTEN = (1 << 2);
// WDT timeouts
extern const uint8_t TLC59208F_MODE2_WDT_5MS;
extern const uint8_t TLC59208F_MODE2_WDT_15MS;
extern const uint8_t TLC59208F_MODE2_WDT_25MS;
extern const uint8_t TLC59208F_MODE2_WDT_35MS;
inline constexpr uint8_t TLC59208F_MODE2_WDT_5MS = (0 << 0);
inline constexpr uint8_t TLC59208F_MODE2_WDT_15MS = (1 << 0);
inline constexpr uint8_t TLC59208F_MODE2_WDT_25MS = (2 << 0);
inline constexpr uint8_t TLC59208F_MODE2_WDT_35MS = (3 << 0);
class TLC59208FOutput;