add const keyword for sensor ops
This commit is contained in:
parent
eae4394329
commit
9458791c28
|
@ -140,7 +140,7 @@ struct rt_sensor_device
|
|||
void *data_buf; /* The buf of the data received */
|
||||
rt_size_t data_len; /* The size of the data received */
|
||||
|
||||
struct rt_sensor_ops *ops; /* The sensor ops */
|
||||
const struct rt_sensor_ops *ops; /* The sensor ops */
|
||||
|
||||
struct rt_sensor_module *module; /* The sensor module */
|
||||
};
|
||||
|
@ -180,7 +180,7 @@ struct rt_sensor_data
|
|||
rt_int32_t tvoc; /* TVOC. unit: permillage */
|
||||
rt_int32_t noise; /* Noise Loudness. unit: HZ */
|
||||
rt_uint32_t step; /* Step sensor. unit: 1 */
|
||||
}data;
|
||||
} data;
|
||||
};
|
||||
|
||||
struct rt_sensor_ops
|
||||
|
@ -190,9 +190,9 @@ struct rt_sensor_ops
|
|||
};
|
||||
|
||||
int rt_hw_sensor_register(rt_sensor_t sensor,
|
||||
const char *name,
|
||||
rt_uint32_t flag,
|
||||
void *data);
|
||||
const char *name,
|
||||
rt_uint32_t flag,
|
||||
void *data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue