You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2018/12/12 13:09:43 UTC
[mynewt-core] 05/06: hw/drivers/bmp280: Fix build for bus driver
This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 901dd08e42d2bf0d10b8a5450171be5338bec5cc
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Fri Dec 7 12:27:19 2018 +0100
hw/drivers/bmp280: Fix build for bus driver
struct bmp280 did not have bus driver fields by accident.
---
hw/drivers/sensors/bmp280/include/bmp280/bmp280.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/drivers/sensors/bmp280/include/bmp280/bmp280.h b/hw/drivers/sensors/bmp280/include/bmp280/bmp280.h
index 94d5ebe..271b6a6 100644
--- a/hw/drivers/sensors/bmp280/include/bmp280/bmp280.h
+++ b/hw/drivers/sensors/bmp280/include/bmp280/bmp280.h
@@ -102,7 +102,14 @@ struct bmp280_pdd {
};
struct bmp280 {
+#if MYNEWT_VAL(BUS_DRIVER_PRESENT)
+ union {
+ struct bus_i2c_node i2c_node;
+ struct bus_spi_node spi_node;
+ };
+#else
struct os_dev dev;
+#endif
struct sensor sensor;
struct bmp280_cfg cfg;
struct bmp280_pdd pdd;