Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
stepper_fake.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Fabian Blatz <fabianblatz@gmail.com>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DRIVERS_STEPPER_STEPPER_FAKE_H_
8#define ZEPHYR_INCLUDE_DRIVERS_STEPPER_STEPPER_FAKE_H_
9
12#include <zephyr/fff.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_driver_enable, const struct device *);
19
20DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_driver_disable, const struct device *);
21
22DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_driver_set_micro_step_res, const struct device *,
24
25DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_driver_get_micro_step_res, const struct device *,
27
28DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_driver_set_event_cb, const struct device *,
29 stepper_event_cb_t, void *);
30
31DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_ctrl_move_by, const struct device *, int32_t);
32
33DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_ctrl_set_microstep_interval, const struct device *,
34 uint64_t);
35
36DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_ctrl_set_reference_position, const struct device *,
37 int32_t);
38
39DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_ctrl_get_actual_position, const struct device *,
40 int32_t *);
41
42DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_ctrl_move_to, const struct device *, int32_t);
43
44DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_ctrl_is_moving, const struct device *, bool *);
45
46DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_ctrl_run, const struct device *,
48
49DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_ctrl_stop, const struct device *);
50
51DECLARE_FAKE_VALUE_FUNC(int, fake_stepper_ctrl_set_event_cb, const struct device *,
52 stepper_ctrl_event_callback_t, void *);
53
54#ifdef __cplusplus
55}
56#endif
57
58#endif /* ZEPHYR_INCLUDE_DRIVERS_STEPPER_STEPPER_FAKE_H_ */
#define DECLARE_FAKE_VALUE_FUNC(...)
Definition fff.h:8684
stepper_ctrl_direction
Stepper Motion Controller direction options.
Definition stepper_ctrl.h:35
stepper_micro_step_resolution
Stepper Motor micro-step resolution options.
Definition stepper.h:40
__INT32_TYPE__ int32_t
Definition stdint.h:74
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
Main header file for stepper hardware driver API.
Main header file for stepper motion controller driver API.
Runtime device structure (in ROM) per driver instance.
Definition device.h:513