MCPcopy Create free account
hub / github.com/BruceDevices/firmware / alterOneColorChannel

Function alterOneColorChannel

src/core/led_control.cpp:69–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69uint32_t alterOneColorChannel(uint32_t color, uint16_t newR, uint16_t newG, uint16_t newB) {
70 uint8_t r = ((color >> 16) & 0xFF);
71 uint8_t g = ((color >> 8) & 0xFF);
72 uint8_t b = (color & 0xFF);
73
74 if (newR != 256) r = newR;
75 if (newG != 256) g = newG;
76 if (newB != 256) b = newB;
77
78 return ((r << 16) | (g << 8) | b);
79}
80
81TaskHandle_t ledEffectTaskHandle = NULL;
82

Callers 3

Calls

no outgoing calls

Tested by

no test coverage detected