Skip to content

Commit

Permalink
nuttx/uorb: Fix initialization error of variable of type `struct sens…
Browse files Browse the repository at this point in the history
…or_ops_s`

Related change:
  .flush    : 4034693
  .get_info : 703bb7e

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 <[email protected]>
  • Loading branch information
JianyuWang0623 committed Sep 19, 2024
1 parent f6c1d88 commit f3d76cb
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/sensors/adxl362_uorb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
2 changes: 2 additions & 0 deletions drivers/sensors/adxl372_uorb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
2 changes: 2 additions & 0 deletions drivers/sensors/bh1749nuc_uorb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
2 changes: 2 additions & 0 deletions drivers/sensors/bme680_uorb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
2 changes: 2 additions & 0 deletions drivers/sensors/bmi270_uorb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
2 changes: 2 additions & 0 deletions drivers/sensors/bmm150_uorb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
2 changes: 2 additions & 0 deletions drivers/sensors/lsm9ds1_uorb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
2 changes: 2 additions & 0 deletions drivers/sensors/ltr308_uorb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
2 changes: 2 additions & 0 deletions drivers/sensors/mpu9250_uorb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down

0 comments on commit f3d76cb

Please sign in to comment.