nuttx/uorb: Fix initialization error of variable of type struct sensor_ops_s

Related change:
  .flush    : 403469336f
  .get_info : 703bb7e7b3

Error Log:
  1153  Building NuttX...
  1154Error: sensors/bme680_uorb.c:428:3: error: initialization of 'int (*)(struct sensor_lowerhalf_s *, struct file *, long unsigned int)' from incompatible pointer type 'int (*)(struct sensor_lowerhalf_s *, struct file *, int,  long unsigned int)' [-Werror=incompatible-pointer-types]
  1155  428 |   bme680_control    /* control */
  1156      |   ^~~~~~~~~~~~~~

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
wangjianyu3 2024-09-19 16:36:10 +08:00 committed by Xiang Xiao
parent f6c1d88931
commit 3ab62370cb
9 changed files with 18 additions and 0 deletions

View File

@ -157,9 +157,11 @@ static const struct sensor_ops_s g_adxl362_accel_ops =
#else
adxl362_fetch,
#endif
NULL, /* flush */
NULL, /* selftest */
NULL, /* set_calibvalue */
NULL, /* calibrate */
NULL, /* get_info */
NULL, /* control */
};

View File

@ -105,9 +105,11 @@ static const struct sensor_ops_s g_adxl372_accel_ops =
#else
adxl372_fetch,
#endif
NULL, /* flush */
NULL, /* selftest */
NULL, /* set_calibvalue */
NULL, /* calibrate */
NULL /* get_info */
NULL /* control */
};

View File

@ -114,9 +114,11 @@ static const struct sensor_ops_s g_bh1749nuc_sensor_ops =
#else
bh1749nuc_fetch,
#endif
NULL, /* flush */
NULL, /* selftest */
NULL, /* set_calibvalue */
NULL, /* calibrate */
NULL, /* get_info */
bh1749nuc_control
};

View File

@ -422,9 +422,11 @@ static const struct sensor_ops_s g_sensor_ops =
NULL, /* set_interval */
NULL, /* batch */
NULL, /* fetch */
NULL, /* flush */
NULL, /* selftest */
NULL, /* set_calibvalue */
bme680_calibrate, /* calibrate */
NULL, /* get_info */
bme680_control /* control */
};

View File

@ -126,9 +126,11 @@ static const struct sensor_ops_s g_sensor_ops =
#else
bmi270_fetch,
#endif
NULL, /* flush */
NULL, /* selftest */
NULL, /* set_calibvalue */
NULL, /* calibrate */
NULL, /* get_info */
bmi270_control
};

View File

@ -180,9 +180,11 @@ static const struct sensor_ops_s g_bmm150_sensor_ops =
#else
bmm150_fetch,
#endif
NULL, /* flush */
NULL, /* selftest */
NULL, /* set_calibvalue */
NULL, /* calibrate */
NULL, /* get_info */
NULL, /* control */
};

View File

@ -129,9 +129,11 @@ static const struct sensor_ops_s g_sensor_ops =
#else
.fetch = lsm9ds1_fetch,
#endif
NULL, /* flush */
NULL, /* selftest */
NULL, /* set_calibvalue */
NULL, /* calibrate */
NULL, /* get_info */
.control = lsm9ds1_control
};

View File

@ -97,9 +97,11 @@ static const struct sensor_ops_s g_sensor_ops =
NULL, /* set_interval */
NULL, /* batch */
NULL, /* fetch */
NULL, /* flush */
NULL, /* selftest */
NULL, /* set_calibvalue */
ltr308_calibrate, /* calibrate */
NULL, /* get_info */
NULL /* control */
};

View File

@ -374,9 +374,11 @@ static const struct sensor_ops_s g_mpu9250_ops =
mpu9250_set_interval, /* set_interval */
NULL, /* batch */
NULL, /* fetch */
NULL, /* flush */
NULL, /* selftest */
NULL, /* set_calibvalue */
NULL, /* calibrate */
NULL, /* get_info */
mpu9250_control /* control */
};