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
7140894f
Commit
7140894f
authored
May 10, 2020
by
galjonsfigur
Committed by
Marcel Stör
Jun 09, 2020
Browse files
Update hook after updating GPIO bits (#3091)
Fixes #3089
parent
7a77d764
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/platform/platform.c
View file @
7140894f
...
@@ -307,6 +307,10 @@ int platform_gpio_register_intr_hook(uint32_t bits, platform_hook_function hook)
...
@@ -307,6 +307,10 @@ int platform_gpio_register_intr_hook(uint32_t bits, platform_hook_function hook)
uint32_t
old_bits
=
oh
.
entry
[
i
].
bits
;
uint32_t
old_bits
=
oh
.
entry
[
i
].
bits
;
*
(
volatile
uint32_t
*
)
&
oh
.
entry
[
i
].
bits
=
bits
;
*
(
volatile
uint32_t
*
)
&
oh
.
entry
[
i
].
bits
=
bits
;
*
(
volatile
uint32_t
*
)
&
oh
.
all_bits
=
(
oh
.
all_bits
&
~
old_bits
)
|
bits
;
*
(
volatile
uint32_t
*
)
&
oh
.
all_bits
=
(
oh
.
all_bits
&
~
old_bits
)
|
bits
;
ETS_GPIO_INTR_DISABLE
();
// This is a structure copy, so interrupts need to be disabled
platform_gpio_hook
=
oh
;
ETS_GPIO_INTR_ENABLE
();
return
1
;
return
1
;
}
}
}
}
...
...
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