drivers/sensors: clear pollpri events after get events

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
dongjiuzhu1 2024-07-10 17:52:19 +08:00 committed by Xiang Xiao
parent 49b650e9db
commit 05f5517f4f
1 changed files with 1 additions and 0 deletions

View File

@ -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;