Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
066e8d60
Commit
066e8d60
authored
Apr 14, 2017
by
devsaurus
Browse files
install rmt isr as shared for dht and onewire
parent
1866e6f4
Changes
2
Show whitespace changes
Inline
Side-by-side
components/platform/dht.c
View file @
066e8d60
...
@@ -91,7 +91,7 @@ static int dht_init( uint8_t gpio_num )
...
@@ -91,7 +91,7 @@ static int dht_init( uint8_t gpio_num )
rmt_rx
.
rx_config
.
filter_ticks_thresh
=
30
;
rmt_rx
.
rx_config
.
filter_ticks_thresh
=
30
;
rmt_rx
.
rx_config
.
idle_threshold
=
DHT_DURATION_RX_IDLE
;
rmt_rx
.
rx_config
.
idle_threshold
=
DHT_DURATION_RX_IDLE
;
if
(
rmt_config
(
&
rmt_rx
)
==
ESP_OK
)
{
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
);
rmt_get_ringbuf_handler
(
dht_rmt
.
channel
,
&
dht_rmt
.
rb
);
...
...
components/platform/onewire.c
View file @
066e8d60
...
@@ -127,7 +127,7 @@ static int onewire_rmt_init( uint8_t gpio_num )
...
@@ -127,7 +127,7 @@ static int onewire_rmt_init( uint8_t gpio_num )
rmt_tx
.
tx_config
.
idle_output_en
=
true
;
rmt_tx
.
tx_config
.
idle_output_en
=
true
;
rmt_tx
.
rmt_mode
=
RMT_MODE_TX
;
rmt_tx
.
rmt_mode
=
RMT_MODE_TX
;
if
(
rmt_config
(
&
rmt_tx
)
==
ESP_OK
)
{
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_config_t
rmt_rx
;
rmt_rx
.
channel
=
ow_rmt
.
rx
;
rmt_rx
.
channel
=
ow_rmt
.
rx
;
...
@@ -139,7 +139,7 @@ static int onewire_rmt_init( uint8_t gpio_num )
...
@@ -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
.
filter_ticks_thresh
=
30
;
rmt_rx
.
rx_config
.
idle_threshold
=
OW_DURATION_RX_IDLE
;
rmt_rx
.
rx_config
.
idle_threshold
=
OW_DURATION_RX_IDLE
;
if
(
rmt_config
(
&
rmt_rx
)
==
ESP_OK
)
{
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
);
rmt_get_ringbuf_handler
(
ow_rmt
.
rx
,
&
ow_rmt
.
rb
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment