Skip to content

Correct preprocessor directive syntax #10

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 1 commit into from
Sep 26, 2018
Merged

Correct preprocessor directive syntax #10

merged 1 commit into from
Sep 26, 2018

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Sep 20, 2018

The previous incorrect syntax caused compilation of the library to fail:

SparkFun_CCS811_Arduino_Library\src\SparkFunCCS811.cpp:61:8: error: macro names must be identifiers

 #ifdef (ARDUINO_ARCH_ESP32 ARDUINO_ARCH_ESP8266)

        ^

Note that, after this fix, compilation for ESP32 still fails with a different error:

SparkFun_CCS811_Arduino_Library\src\SparkFunCCS811.cpp:62:7: error: 'class TwoWire' has no member named 'setClockStretchLimit'

  Wire.setClockStretchLimit(200000);// was defautl 230 uS, now 200ms

       ^

From espressif/arduino-esp32#81, it's not clear whether there are plans to ever add the setClockStretchLimit function for ESP32. Perhaps @LGKev would care to comment on whether there is a good reason to call this function when compiling for ESP32.

Fixes #9

CC: @bfaliszek

The previous incorrect syntax cause compilation of the library to fail:

SparkFun_CCS811_Arduino_Library\src\SparkFunCCS811.cpp:61:8: error: macro names must be identifiers

 #ifdef (ARDUINO_ARCH_ESP32 ARDUINO_ARCH_ESP8266)

        ^

Note that compilation for ESP32 still fails with a different error:

SparkFun_CCS811_Arduino_Library\src\SparkFunCCS811.cpp:62:7: error: 'class TwoWire' has no member named 'setClockStretchLimit'

  Wire.setClockStretchLimit(200000);// was defautl 230 uS, now 200ms

       ^

From espressif/arduino-esp32#81, it's not clear whether there are plans to ever add the setClockStretchLimit function for ESP32.
@AndyEngland521 AndyEngland521 merged commit f2419e5 into sparkfun:master Sep 26, 2018
@per1234 per1234 mentioned this pull request Sep 27, 2018
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.

Error compiling on ESP8266(WeMos D1)
2 participants