sensors/bmm150_uorb.c: fix compilation for poll interface

This commit is contained in:
raiden00pl 2024-04-22 20:05:53 +02:00 committed by Xiang Xiao
parent 0f56d1df16
commit 7a789d0775
1 changed files with 5 additions and 3 deletions

View File

@ -371,6 +371,8 @@ static int bmm150_activate(FAR struct sensor_lowerhalf_s *lower,
#endif
uint8_t val = 0;
dev = (FAR struct bmm150_sensor_dev_s *)lower;
nxmutex_lock(&dev->lock);
if (enable)
@ -558,9 +560,9 @@ static int bmm150_fetch(FAR struct sensor_lowerhalf_s *lower,
/* Get compensated data */
mag_data.timestamp = now;
mag_data.x = bmm150_getx(priv, data);
mag_data.y = bmm150_gety(priv, data);
mag_data.z = bmm150_getz(priv, data);
mag_data.x = bmm150_getx(dev, data);
mag_data.y = bmm150_gety(dev, data);
mag_data.z = bmm150_getz(dev, data);
memcpy(buffer, &mag_data, sizeof(mag_data));
ret = sizeof(mag_data);