drivers/sensors: clear pollpri events after get events
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
49b650e9db
commit
05f5517f4f
|
@ -950,6 +950,7 @@ static int sensor_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||
nxrmutex_lock(&upper->lock);
|
||||
*(FAR unsigned int *)(uintptr_t)arg = user->event;
|
||||
user->event = 0;
|
||||
user->changed = false;
|
||||
nxrmutex_unlock(&upper->lock);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue