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

@@ -491,7 +491,7 @@ int8_t infrared_gpio(void) {
*
*/
void infrared_init(RingbufHandle_t *rb, int gpio, infrared_mode_t mode) {
int rmt_channel = rmt_system_base_channel++;
int rmt_channel = RMT_NEXT_RX_CHANNEL;
rmt_config_t rmt_rx_config = RMT_DEFAULT_CONFIG_RX(gpio, rmt_channel);
rmt_config(&rmt_rx_config);
rmt_driver_install(rmt_rx_config.channel, 1000, 0);