bolderflight / bmi088-arduino

Arduino library for communicating with the Bosch BMI088 6 axis IMU
MIT License
40 stars 25 forks source link

cannot be used on esp32 #3

Open mikeleib opened 2 years ago

mikeleib commented 2 years ago

Due to definition of OPEN_DRAIN at https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-gpio.h#L50, this library cannot be compiled on an esp32.

flybrianfly commented 2 years ago

Can you bug the ESP32 Core Developers to scope this better? Using macros ignores scoping rules of the language and is causing this issue; if they had scoped it as a const or an enum, we wouldn't have a problem since OPEN_DRAIN is defined within the scope of the BMI088 class.

svetgeorgiev commented 1 year ago

What is the fix for this?

flybrianfly commented 1 year ago

Either get the ESP32 devs to not use macros or rename OPEN_DRAIN in this library to something else.