8000 Bugfix: attach interrupt (#6049) by dok-net · Pull Request #6048 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Bugfix: attach interrupt (#6049) #6048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 4, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use RAII idiom
(cherry picked from commit 15c0b5b356aad0c3032b96ed6db0ec70cbf719d3)

# Conflicts:
#	cores/esp8266/core_esp8266_wiring_digital.cpp
  • Loading branch information
dok-net committed Jun 27, 2019
commit e0e81593011d17d58f9d5e95dc2c38b8d5b5d4aa
4 changes: 2 additions & 2 deletions cores/esp8266/core_esp8266_wiring_digital.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "ets_sys.h"
#include "user_interface.h"
#include "core_esp8266_waveform.h"
#include "interrupts.h"

extern "C" {

Expand Down Expand Up @@ -147,7 +148,7 @@ void ICACHE_RAM_ATTR interrupt_handler(void*)
(handler->mode & 1) == !!(levels & (1 << i)))) {
// to make ISR compatible to Arduino AVR model where interrupts are disabled
// we disable them before we call the client ISR
uint32_t savedPS = xt_rsil(15); // stop other interrupts
esp8266::InterruptLock irqLock; // stop other interrupts
if (handler->functional)
{
ArgStructure* localArg = (ArgStructure*)handler->arg;
Expand All @@ -166,7 +167,6 @@ void ICACHE_RAM_ATTR interrupt_handler(void*)
{
handler->fn();
}
xt_wsr_ps(savedPS);
}
}
ETS_GPIO_INTR_ENABLE();
Expand Down
0