添加cmakelists的支持,修复了一些静态检查warning

This commit is contained in:
NeoZng
2023-07-26 14:31:49 +08:00
parent 668848a1e8
commit cb3aeb4063
10 changed files with 147 additions and 36 deletions

View File

@@ -36,11 +36,11 @@ void LEDSwitch(LEDInstance *_led, uint8_t led_switch)
void LEDShow(uint32_t aRGB)
{
static uint8_t alpha;
static uint16_t red, green, blue;
// static uint8_t alpha;
// static uint16_t red, green, blue;
alpha = (aRGB & 0xFF000000) >> 24;
red = ((aRGB & 0x00FF0000) >> 16) * alpha;
green = ((aRGB & 0x0000FF00) >> 8) * alpha;
blue = ((aRGB & 0x000000FF) >> 0) * alpha;
// alpha = (aRGB & 0xFF000000) >> 24;
// red = ((aRGB & 0x00FF0000) >> 16) * alpha;
// green = ((aRGB & 0x0000FF00) >> 8) * alpha;
// blue = ((aRGB & 0x000000FF) >> 0) * alpha;
}