Skip to content
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

Corrects conditional compilation problem on ESP8266 and ESP32 #284

Merged
merged 1 commit into from
Sep 1, 2019
Merged

Corrects conditional compilation problem on ESP8266 and ESP32 #284

merged 1 commit into from
Sep 1, 2019

Conversation

Paraphraser
Copy link
Contributor

Version 0.6.0 introduced a mechanism to supply the ICACHE_RAM_ATTR
prefix to the onDio0Rise() interrupt service routine when compiling
for ESP32 or ESP8266 boards. As written, "#ifdef ESP8266 || ESP32"
produces "warning: extra tokens at end of #ifdef directive" when
compiling in the Arduino IDE 1.8.9. If the board is an ESP8266 then
ISR_PREFIX has the value ICACHE_RAM_ATTR (correct) but if the board is
an ESP32, ISR_PREFIX is null (incorrect) This PR proposes alternative
syntax "#if (ESP8266 || ESP32)" which compiles without warning and
provides ICACHE_RAM_ATTR to both ESP8266 and ESP32 boards.

Version 0.6.0 introduced a mechanism to supply the ICACHE_RAM_ATTR
prefix to the onDio0Rise() interrupt service routine when compiling
for ESP32 or ESP8266 boards. As written, "#ifdef ESP8266 || ESP32"
produces "warning: extra tokens at end of #ifdef directive" when
compiling in the Arduino IDE 1.8.9. If the board is an ESP8266 then
ISR_PREFIX has the value ICACHE_RAM_ATTR (correct) but if the board is
an ESP32, ISR_PREFIX is null (incorrect) This PR proposes alternative
syntax "#if (ESP8266 || ESP32)" which compiles without warning and
provides ICACHE_RAM_ATTR to both ESP8266 and ESP32 boards.
@torntrousers
Copy link
Contributor

LGTM

@morganrallen morganrallen merged commit 5a26c32 into sandeepmistry:master Sep 1, 2019
@morganrallen
Copy link
Collaborator

Merged and 0.6.1 released.

@Paraphraser Paraphraser deleted the isr-prefix-fix branch February 9, 2020 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants