forked from nuttx/nuttx-update
nuttx/uorb: Fix incompatible type error
Related: b17c074a18
Log:
Error: sensors/ms56xx_uorb.c:145:20: error: initialization of 'int (*)(struct sensor_lowerhalf_s *, struct file *, uint32_t *)' {aka 'int (*)(struct sensor_lowerhalf_s *, struct file *, unsigned int *)'} from incompatible pointer type 'int (*)(struct sensor_lowerhalf_s *, struct file *, long unsigned int *)' [-Werror=incompatible-pointer-types]
145 | .set_interval = ms56xx_set_interval,
| ^~~~~~~~~~~~~~~~~~~
sensors/ms56xx_uorb.c:145:20: note: (near initialization for 'g_sensor_ops.set_interval')
cc1: all warnings being treated as errors
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
parent
3ab62370cb
commit
bdddc76997
12 changed files with 38 additions and 38 deletions
|
@ -107,7 +107,7 @@ struct adxl362_sensor_s
|
|||
float scale;
|
||||
#ifdef CONFIG_SENSORS_ADXL362_POLL
|
||||
bool enabled;
|
||||
unsigned long interval;
|
||||
uint32_t interval;
|
||||
sem_t run;
|
||||
#endif
|
||||
};
|
||||
|
@ -134,7 +134,7 @@ static int adxl362_activate(FAR struct sensor_lowerhalf_s *lower,
|
|||
bool enable);
|
||||
static int adxl362_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us);
|
||||
FAR uint32_t *period_us);
|
||||
#ifndef CONFIG_SENSORS_ADXL362_POLL
|
||||
static int adxl362_fetch(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
|
@ -447,7 +447,7 @@ static int adxl362_activate(FAR struct sensor_lowerhalf_s *lower,
|
|||
|
||||
static int adxl362_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us)
|
||||
FAR uint32_t *period_us)
|
||||
{
|
||||
#ifdef CONFIG_SENSORS_ADXL362_POLL
|
||||
FAR struct adxl362_sensor_s *priv = (FAR struct adxl362_sensor_s *)lower;
|
||||
|
@ -460,7 +460,7 @@ static int adxl362_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
|||
|
||||
#ifndef CONFIG_SENSORS_ADXL362_POLL
|
||||
/****************************************************************************
|
||||
* Name: adxl362_set_interval
|
||||
* Name: adxl362_fetch
|
||||
****************************************************************************/
|
||||
|
||||
static int adxl362_fetch(FAR struct sensor_lowerhalf_s *lower,
|
||||
|
|
|
@ -55,7 +55,7 @@ struct adxl372_sensor_s
|
|||
int devno;
|
||||
#ifdef CONFIG_SENSORS_ADXL372_POLL
|
||||
bool enabled;
|
||||
unsigned long interval;
|
||||
uint32_t interval;
|
||||
sem_t run;
|
||||
#endif
|
||||
};
|
||||
|
@ -82,7 +82,7 @@ static int adxl372_activate(FAR struct sensor_lowerhalf_s *lower,
|
|||
bool enable);
|
||||
static int adxl372_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us);
|
||||
FAR uint32_t *period_us);
|
||||
#ifndef CONFIG_SENSORS_ADXL372_POLL
|
||||
static int adxl372_fetch(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
|
@ -412,7 +412,7 @@ static int adxl372_activate(FAR struct sensor_lowerhalf_s *lower,
|
|||
|
||||
static int adxl372_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us)
|
||||
FAR uint32_t *period_us)
|
||||
{
|
||||
#ifdef CONFIG_SENSORS_ADXL372_POLL
|
||||
FAR struct adxl372_sensor_s *priv = (FAR struct adxl372_sensor_s *)lower;
|
||||
|
|
|
@ -60,7 +60,7 @@ struct bh1749nuc_sensor_s
|
|||
int gain;
|
||||
FAR struct bh1749nuc_sensor_dev_s *dev;
|
||||
#ifdef CONFIG_SENSORS_BH1749NUC_POLL
|
||||
unsigned long interval;
|
||||
uint32_t interval;
|
||||
uint64_t last_update;
|
||||
#endif
|
||||
bool enabled;
|
||||
|
@ -93,7 +93,7 @@ static int bh1749nuc_fetch(FAR struct sensor_lowerhalf_s *lower,
|
|||
#endif
|
||||
static int bh1749nuc_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us);
|
||||
FAR uint32_t *period_us);
|
||||
static int bh1749nuc_control(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
int cmd, unsigned long arg);
|
||||
|
@ -301,7 +301,7 @@ static int bh1749nuc_control(FAR struct sensor_lowerhalf_s *lower,
|
|||
|
||||
static int bh1749nuc_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *interval)
|
||||
FAR uint32_t *interval)
|
||||
{
|
||||
#ifdef CONFIG_SENSORS_BH1749NUC_POLL
|
||||
FAR struct bh1749nuc_sensor_s *priv = NULL;
|
||||
|
|
|
@ -68,7 +68,7 @@ struct bmi270_sensor_s
|
|||
FAR void *dev;
|
||||
bool enabled;
|
||||
#ifdef CONFIG_SENSORS_BMI270_POLL
|
||||
unsigned long interval;
|
||||
uint32_t interval;
|
||||
#endif
|
||||
struct bmi270_dev_s base;
|
||||
};
|
||||
|
@ -93,7 +93,7 @@ static int bmi270_activate(FAR struct sensor_lowerhalf_s *lower,
|
|||
bool enable);
|
||||
static int bmi270_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us);
|
||||
FAR uint32_t *period_us);
|
||||
#ifndef CONFIG_SENSORS_BMI270_POLL
|
||||
static int bmi270_fetch(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
|
@ -209,7 +209,7 @@ static int bmi270_activate(FAR struct sensor_lowerhalf_s *lower,
|
|||
|
||||
static int bmi270_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *interval)
|
||||
FAR uint32_t *interval)
|
||||
{
|
||||
#ifdef CONFIG_SENSORS_BMI270_POLL
|
||||
FAR struct bmi270_sensor_s *priv = NULL;
|
||||
|
@ -224,7 +224,7 @@ static int bmi270_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
|||
|
||||
#ifndef CONFIG_SENSORS_BMI270_POLL
|
||||
/****************************************************************************
|
||||
* Name: bmi270_set_interval
|
||||
* Name: bmi270_fetch
|
||||
****************************************************************************/
|
||||
|
||||
static int bmi270_fetch(FAR struct sensor_lowerhalf_s *lower,
|
||||
|
|
|
@ -134,7 +134,7 @@ struct bmm150_sensor_dev_s
|
|||
uint32_t freq;
|
||||
mutex_t lock;
|
||||
#ifdef CONFIG_SENSORS_BMM150_POLL
|
||||
unsigned long interval;
|
||||
uint32_t interval;
|
||||
uint64_t last_update;
|
||||
sem_t run;
|
||||
#endif
|
||||
|
@ -153,7 +153,7 @@ static int bmm150_fetch(FAR struct sensor_lowerhalf_s *lower,
|
|||
#endif
|
||||
static int bmm150_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us);
|
||||
FAR uint32_t *period_us);
|
||||
|
||||
/* Helpers */
|
||||
|
||||
|
@ -579,7 +579,7 @@ errout:
|
|||
|
||||
static int bmm150_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *interval)
|
||||
FAR uint32_t *interval)
|
||||
{
|
||||
#ifdef CONFIG_SENSORS_BMM150_POLL
|
||||
FAR struct bmm150_sensor_dev_s *dev =
|
||||
|
|
|
@ -47,7 +47,7 @@ struct bmp180_dev_uorb_s
|
|||
|
||||
struct sensor_lowerhalf_s lower; /* Lower half sensor driver. */
|
||||
struct work_s work; /* Interrupt handler worker. */
|
||||
unsigned long interval; /* Sensor acquisition interval. */
|
||||
uint32_t interval; /* Sensor acquisition interval. */
|
||||
struct bmp180_dev_s dev;
|
||||
};
|
||||
/****************************************************************************
|
||||
|
@ -57,7 +57,7 @@ struct bmp180_dev_uorb_s
|
|||
static void bmp180_worker(FAR void *arg);
|
||||
static int bmp180_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us);
|
||||
FAR uint32_t *period_us);
|
||||
static int bmp180_activate(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
bool enable);
|
||||
|
@ -101,7 +101,7 @@ static const struct sensor_ops_s g_bmp180_ops =
|
|||
|
||||
static int bmp180_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us)
|
||||
FAR uint32_t *period_us)
|
||||
{
|
||||
FAR struct bmp180_dev_uorb_s *priv = (FAR struct bmp180_dev_uorb_s *)lower;
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ static int bmp280_putreg8(FAR struct bmp280_dev_s *priv, uint8_t regaddr,
|
|||
|
||||
static int bmp280_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us);
|
||||
FAR uint32_t *period_us);
|
||||
static int bmp280_activate(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
bool enable);
|
||||
|
@ -512,7 +512,7 @@ static uint32_t bmp280_compensate_press(FAR struct bmp280_dev_s *priv,
|
|||
|
||||
static int bmp280_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us)
|
||||
FAR uint32_t *period_us)
|
||||
{
|
||||
FAR struct bmp280_dev_s *priv = container_of(lower,
|
||||
FAR struct bmp280_dev_s,
|
||||
|
|
|
@ -146,7 +146,7 @@ struct ds18b20_dev_s
|
|||
struct onewire_config_s config; /* 1wire device configuration */
|
||||
struct ds18b20_config_s reg; /* Sensor resolution */
|
||||
#ifdef CONFIG_SENSORS_DS18B20_POLL
|
||||
unsigned long interval; /* Polling interval */
|
||||
uint32_t interval; /* Polling interval */
|
||||
sem_t run; /* Locks sensor thread */
|
||||
#endif
|
||||
};
|
||||
|
@ -172,7 +172,7 @@ static int ds18b20_control(FAR struct sensor_lowerhalf_s *lower,
|
|||
#ifdef CONFIG_SENSORS_DS18B20_POLL
|
||||
static int ds18b20_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us);
|
||||
FAR uint32_t *period_us);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -787,7 +787,7 @@ static int ds18b20_active(FAR struct sensor_lowerhalf_s *lower,
|
|||
#ifdef CONFIG_SENSORS_DS18B20_POLL
|
||||
static int ds18b20_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us)
|
||||
FAR uint32_t *period_us)
|
||||
{
|
||||
FAR struct ds18b20_dev_s *priv = (FAR struct ds18b20_dev_s *)lower;
|
||||
priv->interval = *period_us;
|
||||
|
|
|
@ -96,7 +96,7 @@ struct hyt271_dev_s
|
|||
mutex_t lock_measure_cycle; /* Locks measure cycle */
|
||||
uint32_t freq; /* I2C Frequency */
|
||||
#ifdef CONFIG_SENSORS_HYT271_POLL
|
||||
unsigned long interval; /* Polling interval */
|
||||
uint32_t interval; /* Polling interval */
|
||||
sem_t run; /* Locks sensor thread */
|
||||
bool initial_read; /* Already read */
|
||||
#endif
|
||||
|
@ -123,7 +123,7 @@ static int hyt271_control(FAR struct sensor_lowerhalf_s *lower,
|
|||
#ifdef CONFIG_SENSORS_HYT271_POLL
|
||||
static int hyt271_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us);
|
||||
FAR uint32_t *period_us);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -758,7 +758,7 @@ static int hyt271_active(FAR struct sensor_lowerhalf_s *lower,
|
|||
#ifdef CONFIG_SENSORS_HYT271_POLL
|
||||
static int hyt271_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us)
|
||||
FAR uint32_t *period_us)
|
||||
{
|
||||
FAR struct hyt271_sensor_s *priv = (FAR struct hyt271_sensor_s *)lower;
|
||||
priv->dev->interval = *period_us;
|
||||
|
|
|
@ -69,7 +69,7 @@ struct lsm9ds1_sensor_s
|
|||
FAR void *dev;
|
||||
#ifdef CONFIG_SENSORS_LSM9DS1_POLL
|
||||
bool enabled;
|
||||
unsigned long interval;
|
||||
uint32_t interval;
|
||||
#endif
|
||||
struct lsm9ds1_dev_s base;
|
||||
};
|
||||
|
@ -94,7 +94,7 @@ static int lsm9ds1_activate(FAR struct sensor_lowerhalf_s *lower,
|
|||
bool enable);
|
||||
static int lsm9ds1_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us);
|
||||
FAR uint32_t *period_us);
|
||||
#ifndef CONFIG_SENSORS_LSM9DS1_POLL
|
||||
static int lsm9ds1_fetch(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
|
@ -193,7 +193,7 @@ static int lsm9ds1_activate(FAR struct sensor_lowerhalf_s *lower,
|
|||
|
||||
static int lsm9ds1_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *interval)
|
||||
FAR uint32_t *interval)
|
||||
{
|
||||
#ifdef CONFIG_SENSORS_LSM9DS1_POLL
|
||||
FAR struct lsm9ds1_sensor_s *priv = NULL;
|
||||
|
@ -242,7 +242,7 @@ static int16_t lsm9ds1_data(int16_t data)
|
|||
|
||||
#ifndef CONFIG_SENSORS_LSM9DS1_POLL
|
||||
/****************************************************************************
|
||||
* Name: lsm9ds1_set_interval
|
||||
* Name: lsm9ds1_fetch
|
||||
****************************************************************************/
|
||||
|
||||
static int lsm9ds1_fetch(FAR struct sensor_lowerhalf_s *lower,
|
||||
|
|
|
@ -318,7 +318,7 @@ struct mpu9250_sensor_s
|
|||
bool enabled;
|
||||
float scale;
|
||||
float adj[3];
|
||||
unsigned long interval;
|
||||
uint32_t interval;
|
||||
FAR void *dev; /* The pointer to common device data of mpu9250 */
|
||||
};
|
||||
|
||||
|
@ -340,7 +340,7 @@ struct mpu9250_dev_s
|
|||
|
||||
static int mpu9250_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us);
|
||||
FAR uint32_t *period_us);
|
||||
static int mpu9250_activate(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep, bool enable);
|
||||
static int mpu9250_control(FAR struct sensor_lowerhalf_s *lower,
|
||||
|
@ -434,7 +434,7 @@ static int mpu9250_activate(FAR struct sensor_lowerhalf_s *lower,
|
|||
|
||||
static int mpu9250_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *interval)
|
||||
FAR uint32_t *interval)
|
||||
{
|
||||
FAR struct mpu9250_sensor_s *priv = (FAR struct mpu9250_sensor_s *)lower;
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ struct ms56xx_dev_s
|
|||
enum ms56xx_model_e model; /* Model of MS56XX */
|
||||
uint32_t freq; /* Bus Frequency I2C/SPI */
|
||||
struct ms56xx_calib_s calib; /* Calib. params from ROM */
|
||||
unsigned long interval; /* Polling interval */
|
||||
uint32_t interval; /* Polling interval */
|
||||
bool enabled; /* Enable/Disable MS56XX */
|
||||
sem_t run; /* Locks measure cycle */
|
||||
mutex_t lock; /* Manages exclusive to device */
|
||||
|
@ -125,7 +125,7 @@ static unsigned long ms56xx_curtime(void);
|
|||
|
||||
static int ms56xx_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us);
|
||||
FAR uint32_t *period_us);
|
||||
static int ms56xx_activate(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep, bool enable);
|
||||
|
||||
|
@ -614,7 +614,7 @@ static uint32_t ms56xx_compensate_press(FAR struct ms56xx_dev_s *priv,
|
|||
|
||||
static int ms56xx_set_interval(FAR struct sensor_lowerhalf_s *lower,
|
||||
FAR struct file *filep,
|
||||
FAR unsigned long *period_us)
|
||||
FAR uint32_t *period_us)
|
||||
{
|
||||
FAR struct ms56xx_dev_s *priv = container_of(lower,
|
||||
FAR struct ms56xx_dev_s,
|
||||
|
|
Loading…
Reference in a new issue