bmp280/bme280: C port, C++ wraps C

Some private methods (relating to calibration/compensation) are no
longer exposed.  In addition, the driver auto-detects the chip (BMP280
or BME280) and acts accordingly, rather than requiring the
specification of a chip id in the ctor.

The getHumidity() method no longer accepts an arguement representing
pressure at sea level.  A new method is provided to specify this.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
Jon Trulson
2017-03-10 09:57:09 -07:00
parent 58cdfadf4e
commit c4a506f5a3
17 changed files with 1977 additions and 1215 deletions

View File

@ -1,5 +1,9 @@
set (libname "bmp280")
set (libdescription "Bosch Atmospheric Sensor Library (bmp280 and Bme280)")
set (module_src ${libname}.cxx bme280.cxx)
set (module_hpp ${libname}.hpp bme280.hpp)
upm_module_init(interfaces mraa)
upm_mixed_module_init (NAME bmp280
DESCRIPTION "Bosch Atmospheric Sensor Library (BMP280 and BME280)"
C_HDR bmp280.h bmp280_regs.h
C_SRC bmp280.c
CPP_HDR bmp280.hpp bme280.hpp
CPP_SRC bmp280.cxx bme280.cxx
CPP_WRAPS_C
REQUIRES mraa interfaces)
target_link_libraries(${libnamec} m)