Donny9 commented on a change in pull request #2215:
URL: https://github.com/apache/incubator-nuttx/pull/2215#discussion_r519264948



##########
File path: include/nuttx/sensors/sensor.h
##########
@@ -495,6 +495,58 @@ struct sensor_ops_s
 
   CODE int (*batch)(FAR struct sensor_lowerhalf_s *lower,
                     FAR unsigned int *latency_us);
+
+  /**************************************************************************
+   * Name: fetch
+   *
+   * We can fetch sensor register data by this function. It will use buffer

Review comment:
       done

##########
File path: include/nuttx/sensors/sensor.h
##########
@@ -495,6 +495,58 @@ struct sensor_ops_s
 
   CODE int (*batch)(FAR struct sensor_lowerhalf_s *lower,
                     FAR unsigned int *latency_us);
+
+  /**************************************************************************
+   * Name: fetch
+   *
+   * We can fetch sensor register data by this function. It will use buffer
+   * of sensor_read provided and disables intermediate buffer of upper half.
+   * We recommend lowerhalf driver writer to use this function for slower
+   * ODR(output data rate) of sensor because this way saves space and simple.
+   *
+   * If fectch isn't NULL, upper half driver will disable intermediate

Review comment:
       done

##########
File path: include/nuttx/sensors/sensor.h
##########
@@ -495,6 +495,58 @@ struct sensor_ops_s
 
   CODE int (*batch)(FAR struct sensor_lowerhalf_s *lower,
                     FAR unsigned int *latency_us);
+
+  /**************************************************************************
+   * Name: fetch
+   *
+   * We can fetch sensor register data by this function. It will use buffer
+   * of sensor_read provided and disables intermediate buffer of upper half.

Review comment:
       done

##########
File path: include/nuttx/sensors/sensor.h
##########
@@ -495,6 +495,58 @@ struct sensor_ops_s
 
   CODE int (*batch)(FAR struct sensor_lowerhalf_s *lower,
                     FAR unsigned int *latency_us);
+
+  /**************************************************************************
+   * Name: fetch
+   *
+   * We can fetch sensor register data by this function. It will use buffer
+   * of sensor_read provided and disables intermediate buffer of upper half.
+   * We recommend lowerhalf driver writer to use this function for slower
+   * ODR(output data rate) of sensor because this way saves space and simple.

Review comment:
       done

##########
File path: include/nuttx/sensors/sensor.h
##########
@@ -495,6 +495,58 @@ struct sensor_ops_s
 
   CODE int (*batch)(FAR struct sensor_lowerhalf_s *lower,
                     FAR unsigned int *latency_us);
+
+  /**************************************************************************
+   * Name: fetch
+   *
+   * We can fetch sensor register data by this function. It will use buffer
+   * of sensor_read provided and disables intermediate buffer of upper half.
+   * We recommend lowerhalf driver writer to use this function for slower
+   * ODR(output data rate) of sensor because this way saves space and simple.
+   *
+   * If fectch isn't NULL, upper half driver will disable intermediate
+   * buffer and userspace can't set buffer size by ioctl.
+   *
+   * You can call this function to read sensor register data by i2c/spi bus

Review comment:
       done

##########
File path: include/nuttx/sensors/sensor.h
##########
@@ -601,12 +673,13 @@ int sensor_register(FAR struct sensor_lowerhalf_s *dev);
  *   upper half driver.
  *
  * Input Parameters:
- *   dev  - A pointer to an instance of lower half sensor driver. This
- *          instance is bound to the sensor driver and must persists as long
- *          as the driver persists.
+ *   dev   - A pointer to an instance of lower half sensor driver. This
+ *           instance is bound to the sensor driver and must persists as long

Review comment:
       done

##########
File path: include/nuttx/sensors/sensor.h
##########
@@ -581,17 +651,19 @@ extern "C"
  *   numbers. eg: accel0, accel1
  *
  * Input Parameters:
- *   dev  - A pointer to an instance of lower half sensor driver. This
- *          instance is bound to the sensor driver and must persists as long
- *          as the driver persists.
+ *   dev   - A pointer to an instance of lower half sensor driver. This
+ *           instance is bound to the sensor driver and must persists as long

Review comment:
       done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to