bmi160: add C driver and example. Add SPI support, other improvments.

This adds SPI support to the BMI160, as well as a C driver and a C
example.  In addition, some changes were made to more properly detect
and handle errors.

Functions supplied by the bosch_bmi160 driver source code is also
exported and made available to callers who want more than what the
basic driver support.  Bus access methods (I2C and SPI) are also now
exposed to both C and C++.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
Jon Trulson
2016-09-27 16:39:09 -06:00
parent e7c80217c2
commit 0086626173
12 changed files with 1203 additions and 547 deletions

View File

@@ -1,5 +1,9 @@
set (libname "bmi160")
set (libdescription "Bosch BMI160 Accelerometer, Gyroscope and BMM150 Magnetometer")
set (module_src ${libname}.cxx bosch_bmi160.c)
set (module_hpp ${libname}.hpp)
upm_module_init()
upm_mixed_module_init (NAME bmi160
DESCRIPTION "UPM driver for the BMI160 accel/gyro/mag"
C_HDR bmi160.h bosch_bmi160.h
C_SRC bmi160.c bosch_bmi160.c
CPP_HDR bmi160.hpp
CPP_SRC bmi160.cxx
# FTI_SRC bmi160_fti.c
CPP_WRAPS_C
REQUIRES mraa)