mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
24040250f5
1.Allow multi users to access the same sensor device simultaneously. 2.Get real state of sensor device by cmd SNIOC_GET_STATE for users. 3.Get update state since last read by poll without timeout for users. 4.Sensor device will be activated when first user open and will close when last user closed. 5.When multi users to access device, driver always set the minimum sampling interval and latency to the sensor device and allow downsampled for users above the minimum sampling interval. 6.The circbuffer will overwrite old data when buffer is full, so if users don't read data soon, data will be lost, and the oldest data in circbuffer are returned to the users. 7.Always read the last data in the circbuffer as initial value for new users when the sensor device has not yet generated new data. 8.when user uses poll, if subscription interval is satisfied, the POLLIN events is returned for each users. 9.When new user generate or the state of sensor device changed, the POLLPRI will notify to all users. 10.Support multi advertisers to subscribe their own data as loop test. Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>