Add additional hooks for Community modules (#25050)

This commit is contained in:
Drashna Jaelre 2025-05-04 17:21:47 -07:00 committed by GitHub
parent bb9dd05c6a
commit 12caf0be4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 137 additions and 13 deletions

View file

@ -393,7 +393,12 @@ void rgb_matrix_task(void) {
}
}
__attribute__((weak)) bool rgb_matrix_indicators_modules(void) {
return true;
}
void rgb_matrix_indicators(void) {
rgb_matrix_indicators_modules();
rgb_matrix_indicators_kb();
}
@ -433,6 +438,10 @@ struct rgb_matrix_limits_t rgb_matrix_get_limits(uint8_t iter) {
return limits;
}
__attribute__((weak)) bool rgb_matrix_indicators_advanced_modules(uint8_t led_min, uint8_t led_max) {
return true;
}
void rgb_matrix_indicators_advanced(effect_params_t *params) {
/* special handling is needed for "params->iter", since it's already been incremented.
* Could move the invocations to rgb_task_render, but then it's missing a few checks
@ -440,6 +449,7 @@ void rgb_matrix_indicators_advanced(effect_params_t *params) {
* rgb_task_render, right before the iter++ line.
*/
RGB_MATRIX_USE_LIMITS_ITER(min, max, params->iter - 1);
rgb_matrix_indicators_advanced_modules(min, max);
rgb_matrix_indicators_advanced_kb(min, max);
}