add const keyword for sensor ops

This commit is contained in:
guozhanxin 2019-02-12 16:52:10 +08:00
parent eae4394329
commit 9458791c28
1 changed files with 13 additions and 13 deletions

View File

@ -140,7 +140,7 @@ struct rt_sensor_device
void *data_buf; /* The buf of the data received */ void *data_buf; /* The buf of the data received */
rt_size_t data_len; /* The size 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 */ 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 tvoc; /* TVOC. unit: permillage */
rt_int32_t noise; /* Noise Loudness. unit: HZ */ rt_int32_t noise; /* Noise Loudness. unit: HZ */
rt_uint32_t step; /* Step sensor. unit: 1 */ rt_uint32_t step; /* Step sensor. unit: 1 */
}data; } data;
}; };
struct rt_sensor_ops struct rt_sensor_ops