feat: Support for WS2812 RGB LEDs (#3909)

Co-authored-by: 3djc <lesitewebdejc@hotmail.com>
This commit is contained in:
Raphael Coeffic
2023-10-14 14:06:55 +10:00
committed by GitHub
co-authored by 3djc
parent f8ad3a7bda
commit b22a1b5d32
60 changed files with 788 additions and 122 deletions
@@ -90,6 +90,7 @@ const struct YamlIdStr enum_Functions[] = {
{ FUNC_SCREENSHOT, "SCREENSHOT" },
{ FUNC_RACING_MODE, "RACING_MODE" },
{ FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" },
{ FUNC_RGB_LED, "RGB_LED" },
{ 0, NULL }
};
const struct YamlIdStr enum_TimerModes[] = {
@@ -1433,6 +1433,7 @@ static void r_customFn(void* user, uint8_t* data, uint32_t bitoffs,
case FUNC_PLAY_TRACK:
case FUNC_BACKGND_MUSIC:
case FUNC_PLAY_SCRIPT:
case FUNC_RGB_LED:
strncpy(cfn->play.name, val, std::min<uint8_t>(l_sep, LEN_FUNCTION_NAME));
break;
@@ -1639,6 +1640,7 @@ static bool w_customFn(void* user, uint8_t* data, uint32_t bitoffs,
case FUNC_PLAY_TRACK:
case FUNC_BACKGND_MUSIC:
case FUNC_PLAY_SCRIPT:
case FUNC_RGB_LED:
if (!wf(opaque, cfn->play.name, strnlen(cfn->play.name, LEN_FUNCTION_NAME)))
return false;
break;
@@ -92,6 +92,7 @@ const struct YamlIdStr enum_Functions[] = {
{ FUNC_DISABLE_TOUCH, "DISABLE_TOUCH" },
{ FUNC_SET_SCREEN, "SET_SCREEN" },
{ FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" },
{ FUNC_RGB_LED, "RGB_LED" },
{ 0, NULL }
};
const struct YamlIdStr enum_TimerModes[] = {
@@ -90,6 +90,7 @@ const struct YamlIdStr enum_Functions[] = {
{ FUNC_SCREENSHOT, "SCREENSHOT" },
{ FUNC_RACING_MODE, "RACING_MODE" },
{ FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" },
{ FUNC_RGB_LED, "RGB_LED" },
{ 0, NULL }
};
const struct YamlIdStr enum_TimerModes[] = {
@@ -90,6 +90,7 @@ const struct YamlIdStr enum_Functions[] = {
{ FUNC_SCREENSHOT, "SCREENSHOT" },
{ FUNC_RACING_MODE, "RACING_MODE" },
{ FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" },
{ FUNC_RGB_LED, "RGB_LED" },
{ 0, NULL }
};
const struct YamlIdStr enum_TimerModes[] = {
@@ -92,6 +92,7 @@ const struct YamlIdStr enum_Functions[] = {
{ FUNC_DISABLE_TOUCH, "DISABLE_TOUCH" },
{ FUNC_SET_SCREEN, "SET_SCREEN" },
{ FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" },
{ FUNC_RGB_LED, "RGB_LED" },
{ 0, NULL }
};
const struct YamlIdStr enum_TimerModes[] = {
@@ -92,6 +92,7 @@ const struct YamlIdStr enum_Functions[] = {
{ FUNC_DISABLE_TOUCH, "DISABLE_TOUCH" },
{ FUNC_SET_SCREEN, "SET_SCREEN" },
{ FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" },
{ FUNC_RGB_LED, "RGB_LED" },
{ 0, NULL }
};
const struct YamlIdStr enum_TimerModes[] = {
@@ -90,6 +90,7 @@ const struct YamlIdStr enum_Functions[] = {
{ FUNC_SCREENSHOT, "SCREENSHOT" },
{ FUNC_RACING_MODE, "RACING_MODE" },
{ FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" },
{ FUNC_RGB_LED, "RGB_LED" },
{ 0, NULL }
};
const struct YamlIdStr enum_TimerModes[] = {
@@ -90,6 +90,7 @@ const struct YamlIdStr enum_Functions[] = {
{ FUNC_SCREENSHOT, "SCREENSHOT" },
{ FUNC_RACING_MODE, "RACING_MODE" },
{ FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" },
{ FUNC_RGB_LED, "RGB_LED" },
{ 0, NULL }
};
const struct YamlIdStr enum_TimerModes[] = {
@@ -90,6 +90,7 @@ const struct YamlIdStr enum_Functions[] = {
{ FUNC_SCREENSHOT, "SCREENSHOT" },
{ FUNC_RACING_MODE, "RACING_MODE" },
{ FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" },
{ FUNC_RGB_LED, "RGB_LED" },
{ 0, NULL }
};
const struct YamlIdStr enum_TimerModes[] = {
@@ -90,6 +90,7 @@ const struct YamlIdStr enum_Functions[] = {
{ FUNC_SCREENSHOT, "SCREENSHOT" },
{ FUNC_RACING_MODE, "RACING_MODE" },
{ FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" },
{ FUNC_RGB_LED, "RGB_LED" },
{ 0, NULL }
};
const struct YamlIdStr enum_TimerModes[] = {