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

Compilation error with ESP32 MSBFIRST #6

Closed
ThingEngineer opened this issue Oct 18, 2018 · 2 comments
Closed

Compilation error with ESP32 MSBFIRST #6

ThingEngineer opened this issue Oct 18, 2018 · 2 comments

Comments

@ThingEngineer
Copy link

Compilation on on the ESP32 results in this error:
'MSBFIRST' was not declared in this scope

<Arduino.h> must be included into SparkFunLSM6DS3.cpp

@ImaraSpeek
Copy link

This issue might just be a linking problem, but I'm having the same problem. I get an error saying there is no such file as Wire.h, and when trying to include <Arduino.h> it actually does the same. I added the lib folder of the LSM to the compiler.mk file and I have the arduino esp32 component in the project. Any idea on what may be wrong here?

@edspark
Copy link
Contributor

edspark commented Mar 12, 2019

Hey, thank you guys for filing an issue but in particular thank you @ThingEngineer for the pull request. The issue was that the library sets the SPI bit order using Arduino's MSBFIRST define, when ESP32 uses the define: SPI_MSBFIRST. I've added a check in the library for ESP32 to fix the issue. I've also included Arduino.h rather than just stdint.h. Changes can be found here: 9eb6464.

Thanks again for filing an issue and sorry for the late reply.

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

No branches or pull requests

4 participants