You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/12/07 20:11:51 UTC

[GitHub] kasjer closed pull request #1553: hw/drivers/bme280: Fix build errors

kasjer closed pull request #1553: hw/drivers/bme280: Fix build errors
URL: https://github.com/apache/mynewt-core/pull/1553
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/hw/drivers/sensors/bme280/src/bme280.c b/hw/drivers/sensors/bme280/src/bme280.c
index 1226e909b8..689368c692 100644
--- a/hw/drivers/sensors/bme280/src/bme280.c
+++ b/hw/drivers/sensors/bme280/src/bme280.c
@@ -833,15 +833,13 @@ bme280_readlen(struct sensor_itf *itf, uint8_t addr, uint8_t *payload,
     int rc;
 
 #if MYNEWT_VAL(BUS_DRIVER_PRESENT)
-    struct os_dev *dev = SENSOR_ITF_GET_DEVICE(itf);
-
     /* XXX this is only required for SPI, but apparently device has no problem
      * with this being set also for I2C so let's leave it for now since there's
      * no API now to figure out bus type for node
      */
     addr |= BME280_SPI_READ_CMD_BIT;
 
-    rc = bus_node_simple_write_read_transact(dev, &addr, 1, payload, len);
+    rc = bus_node_simple_write_read_transact(itf->si_dev, &addr, 1, payload, len);
 #else
     int i;
     uint16_t retval;
@@ -900,7 +898,7 @@ bme280_writelen(struct sensor_itf *itf, uint8_t addr, uint8_t *payload,
     int rc;
 
 #if MYNEWT_VAL(BUS_DRIVER_PRESENT)
-    struct os_dev *dev = SENSOR_ITF_GET_DEVICE(itf);
+    struct os_dev *dev = itf->si_dev;
 
     rc = bus_node_lock(dev, OS_TIMEOUT_NEVER);
     if (rc) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services