rmt helper to function

This commit is contained in:
Wizmo2
2023-09-28 07:34:58 -04:00
parent 60bd591bf8
commit f33cb569ce
5 changed files with 6 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_NEXT_RX_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);