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

@@ -101,7 +101,8 @@ struct yas_vector fifo_vector_xyz;
* (Better case don't change the reference value of the parameter)
*
*/
BMI160_RETURN_FUNCTION_TYPE bmi160_init(struct bmi160_t *bmi160)
/* JET - renamed from bmi160_init to avoid conflict with UPM code */
BMI160_RETURN_FUNCTION_TYPE bmi160_init_bus(struct bmi160_t *bmi160)
{
/* variable used for return the status of communication result*/
BMI160_RETURN_FUNCTION_TYPE com_rslt = E_BMI160_COMM_RES;