mirror of
https://github.com/apache/nuttx.git
synced 2026-06-11 21:53:37 +08:00
703bb7e7b3
When there is an actual physical sensor, the driver must implement the get info interface. The upper layer can obtain the actual physical sensor information through SNIOC_GET_INFO. SNIOC_SET_INFO can only set the information of the local virtual sensor, which means it is bound to the local advertisement. Remote subscribers cannot set the information. Usage: struct sensor_device_info dev_info; orb_ioctl(fd, SNIOC_GET_INFO, (unsigned long)(uintptr_t)&dev_info); or: ret = orb_set_info(fd, &dev_info); ret = orb_get_info(fd, &dev_info); Signed-off-by: likun17 <likun17@xiaomi.com>