drivers: stepper: fix fake stepper controller cid issues
Fix: Write to const-qualified field. (WRITE_CONST_FIELD) - #81915, #81920, #81922, #81924, #81932, #81940, #81941 - #81946, #81947, #81959, #81961, #81970, #81973, #81977 Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
This commit is contained in:
parent
92fce644e5
commit
6d87bd65ae
2 changed files with 14 additions and 16 deletions
|
|
@ -19,28 +19,28 @@ struct fake_stepper_data {
|
|||
int32_t actual_position;
|
||||
};
|
||||
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_enable, const struct device *, const bool);
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_enable, const struct device *, bool);
|
||||
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_is_moving, const struct device *, bool *);
|
||||
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_move, const struct device *, const int32_t);
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_move, const struct device *, int32_t);
|
||||
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_set_max_velocity, const struct device *, const uint32_t);
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_set_max_velocity, const struct device *, uint32_t);
|
||||
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_set_micro_step_res, const struct device *,
|
||||
const enum stepper_micro_step_resolution);
|
||||
enum stepper_micro_step_resolution);
|
||||
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_get_micro_step_res, const struct device *,
|
||||
enum stepper_micro_step_resolution *);
|
||||
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_set_actual_position, const struct device *, const int32_t);
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_set_actual_position, const struct device *, int32_t);
|
||||
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_get_actual_position, const struct device *, int32_t *);
|
||||
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_set_target_position, const struct device *, const int32_t);
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_set_target_position, const struct device *, int32_t);
|
||||
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_enable_constant_velocity_mode, const struct device *,
|
||||
const enum stepper_direction, const uint32_t);
|
||||
enum stepper_direction, uint32_t);
|
||||
|
||||
DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_set_event_callback, const struct device *,
|
||||
stepper_event_callback_t, void *);
|
||||
|
|
|
|||
|
|
@ -14,30 +14,28 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_enable, const struct device *, const bool);
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_enable, const struct device *, bool);
|
||||
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_move, const struct device *, const int32_t);
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_move, const struct device *, int32_t);
|
||||
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_set_max_velocity, const struct device *, const uint32_t);
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_set_max_velocity, const struct device *, uint32_t);
|
||||
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_set_micro_step_res, const struct device *,
|
||||
const enum stepper_micro_step_resolution);
|
||||
enum stepper_micro_step_resolution);
|
||||
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_get_micro_step_res, const struct device *,
|
||||
enum stepper_micro_step_resolution *);
|
||||
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_set_actual_position, const struct device *,
|
||||
const int32_t);
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_set_actual_position, const struct device *, int32_t);
|
||||
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_get_actual_position, const struct device *, int32_t *);
|
||||
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_set_target_position, const struct device *,
|
||||
const int32_t);
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_set_target_position, const struct device *, int32_t);
|
||||
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_is_moving, const struct device *, bool *);
|
||||
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_enable_constant_velocity_mode, const struct device *,
|
||||
const enum stepper_direction, const uint32_t);
|
||||
enum stepper_direction, uint32_t);
|
||||
|
||||
DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_set_event_callback, const struct device *,
|
||||
stepper_event_callback_t, void *);
|
||||
|
|
|
|||
Loading…
Reference in a new issue