finitespace / BME280

Provides an Arduino library for reading and interpreting Bosch BME280 data over I2C, SPI or Sw SPI.
GNU General Public License v3.0
212 stars 105 forks source link

Include Arduino.h to fix compiler warnings #132

Open LuAPi opened 2 years ago

LuAPi commented 2 years ago

Related issue # and issue behavior

Compiler generates warnings

.arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined
 #define LITTLE_ENDIAN          1

.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/machine/endian.h:17:0: note: this is the location of the previous definition
 #define LITTLE_ENDIAN _LITTLE_ENDIAN

from files

BME280/src/BME280.cpp:31
BME280/src/BME280I2C.cpp:31

When building for Arduino Nano 33 IoT

Description of changes/fixes

Including Arduino.h stops these warnings being generated.

@mention a person to review

Steps to test

Build with and without these changes in an environment that doesn't supress warnings.

Any outstanding TODOs or known issues