Code: Select all
void IR_RMT_RX_INIT()
{
rmt_config_t rmt_rx;
rmt_rx.channel = IR_RMT_RX_CH;
rmt_rx.gpio_num =IR_RMT_RX_GPIO ;
rmt_rx.clk_div = IR_RMT_CLK_DIV;
rmt_rx.mem_block_num = 1;
rmt_rx.rmt_mode = RMT_MODE_RX;
rmt_rx.rx_config.filter_en = true;
rmt_rx.rx_config.filter_ticks_thresh = 255U;
rmt_rx.rx_config.idle_threshold = IR_RMT_RX_IDLE_TRSHLD;
rmt_config(&rmt_rx);
rmt_driver_install(rmt_rx.channel, 1000, 0);
}