From 066e8d60faa19878982a7562de42e0203776d3af Mon Sep 17 00:00:00 2001 From: devsaurus Date: Fri, 14 Apr 2017 19:55:08 +0200 Subject: [PATCH] install rmt isr as shared for dht and onewire --- components/platform/dht.c | 2 +- components/platform/onewire.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/platform/dht.c b/components/platform/dht.c index 7bb21a34..050fdc33 100644 --- a/components/platform/dht.c +++ b/components/platform/dht.c @@ -91,7 +91,7 @@ static int dht_init( uint8_t gpio_num ) rmt_rx.rx_config.filter_ticks_thresh = 30; rmt_rx.rx_config.idle_threshold = DHT_DURATION_RX_IDLE; if (rmt_config( &rmt_rx ) == ESP_OK) { - if (rmt_driver_install( rmt_rx.channel, 512, 0 ) == ESP_OK) { + if (rmt_driver_install( rmt_rx.channel, 512, ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_SHARED ) == ESP_OK) { rmt_get_ringbuf_handler( dht_rmt.channel, &dht_rmt.rb ); diff --git a/components/platform/onewire.c b/components/platform/onewire.c index 19ca15e4..74150815 100644 --- a/components/platform/onewire.c +++ b/components/platform/onewire.c @@ -127,7 +127,7 @@ static int onewire_rmt_init( uint8_t gpio_num ) rmt_tx.tx_config.idle_output_en = true; rmt_tx.rmt_mode = RMT_MODE_TX; if (rmt_config( &rmt_tx ) == ESP_OK) { - if (rmt_driver_install( rmt_tx.channel, 0, 0 ) == ESP_OK) { + if (rmt_driver_install( rmt_tx.channel, 0, ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_SHARED ) == ESP_OK) { rmt_config_t rmt_rx; rmt_rx.channel = ow_rmt.rx; @@ -139,7 +139,7 @@ static int onewire_rmt_init( uint8_t gpio_num ) rmt_rx.rx_config.filter_ticks_thresh = 30; rmt_rx.rx_config.idle_threshold = OW_DURATION_RX_IDLE; if (rmt_config( &rmt_rx ) == ESP_OK) { - if (rmt_driver_install( rmt_rx.channel, 512, 0 ) == ESP_OK) { + if (rmt_driver_install( rmt_rx.channel, 512, ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_SHARED ) == ESP_OK) { rmt_get_ringbuf_handler( ow_rmt.rx, &ow_rmt.rb );