Lines Matching +full:int +full:- +full:enum
2 * SPDX-FileCopyrightText: Copyright (c) 2024 Fabian Blatz <fabianblatz@gmail.com>
3 * SPDX-License-Identifier: Apache-2.0
18 enum stepper_micro_step_resolution micro_step_res;
22 DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_enable, const struct device *, bool);
24 DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_is_moving, const struct device *, bool *);
26 DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_move_by, const struct device *, int32_t);
28 DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_set_max_velocity, const struct device *, uint32_t);
30 DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_set_micro_step_res, const struct device *,
31 enum stepper_micro_step_resolution);
33 DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_get_micro_step_res, const struct device *,
34 enum stepper_micro_step_resolution *);
36 DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_set_reference_position, const struct device *, int32_t);
38 DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_get_actual_position, const struct device *, int32_t *);
40 DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_move_to, const struct device *, int32_t);
42 DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_run, const struct device *, enum stepper_direction,
45 DEFINE_FAKE_VALUE_FUNC(int, fake_stepper_set_event_callback, const struct device *,
48 static int fake_stepper_set_micro_step_res_delegate(const struct device *dev, in fake_stepper_set_micro_step_res_delegate()
49 const enum stepper_micro_step_resolution res) in fake_stepper_set_micro_step_res_delegate()
51 struct fake_stepper_data *data = dev->data; in fake_stepper_set_micro_step_res_delegate()
53 data->micro_step_res = res; in fake_stepper_set_micro_step_res_delegate()
58 static int fake_stepper_get_micro_step_res_delegate(const struct device *dev, in fake_stepper_get_micro_step_res_delegate()
59 enum stepper_micro_step_resolution *res) in fake_stepper_get_micro_step_res_delegate()
61 struct fake_stepper_data *data = dev->data; in fake_stepper_get_micro_step_res_delegate()
63 *res = data->micro_step_res; in fake_stepper_get_micro_step_res_delegate()
68 static int fake_stepper_set_reference_position_delegate(const struct device *dev, const int32_t pos) in fake_stepper_set_reference_position_delegate()
70 struct fake_stepper_data *data = dev->data; in fake_stepper_set_reference_position_delegate()
72 data->actual_position = pos; in fake_stepper_set_reference_position_delegate()
77 static int fake_stepper_get_actual_position_delegate(const struct device *dev, int32_t *pos) in fake_stepper_get_actual_position_delegate()
79 struct fake_stepper_data *data = dev->data; in fake_stepper_get_actual_position_delegate()
81 *pos = data->actual_position; in fake_stepper_get_actual_position_delegate()
115 static int fake_stepper_init(const struct device *dev) in fake_stepper_init()