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/04/05 00:42:46 UTC

[GitHub] brianpax closed pull request #993: lps33hw: Added sensor set config function to LPS33HW driver

brianpax closed pull request #993: lps33hw: Added sensor set config function to LPS33HW driver
URL: https://github.com/apache/mynewt-core/pull/993
 
 
   

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/lps33hw/src/lps33hw.c b/hw/drivers/sensors/lps33hw/src/lps33hw.c
index 9955dfbef..c95dd559c 100644
--- a/hw/drivers/sensors/lps33hw/src/lps33hw.c
+++ b/hw/drivers/sensors/lps33hw/src/lps33hw.c
@@ -63,6 +63,7 @@ static int lps33hw_sensor_read(struct sensor *, sensor_type_t,
         sensor_data_func_t, void *, uint32_t);
 static int lps33hw_sensor_get_config(struct sensor *, sensor_type_t,
         struct sensor_cfg *);
+static int lps33hw_sensor_set_config(struct sensor *, void *);
 static int lps33hw_sensor_set_trigger_thresh(struct sensor *sensor,
         sensor_type_t sensor_type, struct sensor_type_traits *stt);
 static int lps33hw_sensor_handle_interrupt(struct sensor *sensor);
@@ -74,6 +75,7 @@ static int lps33hw_sensor_clear_high_thresh(struct sensor *sensor,
 static const struct sensor_driver g_lps33hw_sensor_driver = {
     .sd_read                      = lps33hw_sensor_read,
     .sd_get_config                = lps33hw_sensor_get_config,
+    .sd_set_config                = lps33hw_sensor_set_config,
     .sd_set_trigger_thresh        = lps33hw_sensor_set_trigger_thresh,
     .sd_handle_interrupt          = lps33hw_sensor_handle_interrupt,
     .sd_clear_low_trigger_thresh  = lps33hw_sensor_clear_low_thresh,
@@ -870,3 +872,11 @@ lps33hw_sensor_get_config(struct sensor *sensor, sensor_type_t type,
 
     return 0;
 }
+
+static int 
+lps33hw_sensor_set_config(struct sensor *sensor, void *cfg)
+{
+    struct lps33hw* lps33hw = (struct lps33hw *)SENSOR_GET_DEVICE(sensor);
+
+    return lps33hw_config(lps33hw, (struct lps33hw_cfg *)cfg);
+}


 

----------------------------------------------------------------
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