drivers/sensors: add get_info interface for gnss_uorb

Implement gnss_get_info callback function to support device information query for GNSS sensor devices through the sensor framework.

Signed-off-by: chenzihan1 <chenzihan1@xiaomi.com>
This commit is contained in:
chenzihan1
2025-02-12 09:56:34 +08:00
committed by Xiang Xiao
parent 4c1228059f
commit 664d2d7213
2 changed files with 42 additions and 0 deletions
+23
View File
@@ -28,6 +28,7 @@
****************************************************************************/
#include <nuttx/fs/fs.h>
#include <nuttx/sensors/sensor.h>
/****************************************************************************
* Pre-processor Definitions
@@ -99,6 +100,28 @@ struct gnss_ops_s
FAR struct file *filep,
FAR uint32_t *period_us);
/**************************************************************************
* Name: get_info
*
* With this method, the user can obtain information about the current
* device. The name and vendor information cannot exceed
* SENSOR_INFO_NAME_SIZE.
*
* Input Parameters:
* lower - The instance of lower half sensor driver.
* filep - The pointer of file, represents each user using sensor.
* info - Device information structure pointer.
*
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
* -ENOTTY - The cmd don't support.
*
**************************************************************************/
CODE int (*get_info)(FAR struct gnss_lowerhalf_s *lower,
FAR struct file *filep,
FAR struct sensor_device_info_s *info);
/**************************************************************************
* Name: control
*