support for c3 and s3 channel restrictions

This commit is contained in:
Wizmo2
2023-09-25 19:32:13 -04:00
parent 53fa83b2dd
commit 60bd591bf8
6 changed files with 11 additions and 6 deletions

View File

@@ -241,7 +241,7 @@ bool led_config(int idx, gpio_num_t gpio, int color, int bright, led_type_t type
for (const struct rmt_led_param_s *p = rmt_led_param; !leds[idx].rmt && p->type >= 0; p++) if (p->type == type) leds[idx].rmt = p;
if (!leds[idx].rmt) return false;
if (led_rmt_channel < 0) led_rmt_channel = rmt_system_base_channel++;
if (led_rmt_channel < 0) led_rmt_channel = RMT_NEXT_TX_CHANNEL;
leds[idx].channel = led_rmt_channel;
leds[idx].bright = bright > 0 ? bright : 100;