driver/sensor: gets the capacity of the hardware fifo
to hold the number of events Change-Id: I58a9ad07913c7b189e1fd229ab22e91e220e01f6 Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
46ea549630
commit
936ce77d21
|
@ -419,7 +419,7 @@ static int sensor_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||
|
||||
case SNIOC_GET_NEVENTBUF:
|
||||
{
|
||||
*val = lower->buffer_number;
|
||||
*val = lower->buffer_number + lower->batch_number;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -584,6 +584,13 @@ struct sensor_lowerhalf_s
|
|||
|
||||
uint32_t buffer_number;
|
||||
|
||||
/* The number of events that hardware fifo hold maximum number of samples,
|
||||
* must be aligned with size of struct sensor_event_xxx.
|
||||
* If sensor don't hardware fifo, you don't need to care about fifo_size.
|
||||
*/
|
||||
|
||||
uint32_t batch_number;
|
||||
|
||||
/* The uncalibrated use to describe whether the sensor event is
|
||||
* uncalibrated. True is uncalibrated data, false is calibrated data,
|
||||
* default false.
|
||||
|
|
Loading…
Reference in New Issue