/* auto-generated by gen_syscalls.py, don't edit */

#ifndef Z_INCLUDE_SYSCALLS_STEPPER_CTRL_H
#define Z_INCLUDE_SYSCALLS_STEPPER_CTRL_H


#include <zephyr/tracing/tracing_syscall.h>

#ifndef _ASMLANGUAGE

#include <stdarg.h>

#include <zephyr/syscall_list.h>
#include <zephyr/syscall.h>

#include <zephyr/linker/sections.h>


#ifdef __cplusplus
extern "C" {
#endif

extern int z_impl_stepper_ctrl_set_reference_position(const struct device * dev, const int32_t value);

static inline int stepper_ctrl_set_reference_position(const struct device * dev, const int32_t value)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; const int32_t val; } parm1 = { .val = value };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_STEPPER_CTRL_SET_REFERENCE_POSITION);
	}
#endif
	compiler_barrier();
	return z_impl_stepper_ctrl_set_reference_position(dev, value);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define stepper_ctrl_set_reference_position(dev, value) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_STEPPER_CTRL_SET_REFERENCE_POSITION, stepper_ctrl_set_reference_position, dev, value); 	syscall__retval = stepper_ctrl_set_reference_position(dev, value); 	sys_port_trace_syscall_exit(K_SYSCALL_STEPPER_CTRL_SET_REFERENCE_POSITION, stepper_ctrl_set_reference_position, dev, value, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_stepper_ctrl_get_actual_position(const struct device * dev, int32_t * value);

static inline int stepper_ctrl_get_actual_position(const struct device * dev, int32_t * value)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; int32_t * val; } parm1 = { .val = value };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_STEPPER_CTRL_GET_ACTUAL_POSITION);
	}
#endif
	compiler_barrier();
	return z_impl_stepper_ctrl_get_actual_position(dev, value);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define stepper_ctrl_get_actual_position(dev, value) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_STEPPER_CTRL_GET_ACTUAL_POSITION, stepper_ctrl_get_actual_position, dev, value); 	syscall__retval = stepper_ctrl_get_actual_position(dev, value); 	sys_port_trace_syscall_exit(K_SYSCALL_STEPPER_CTRL_GET_ACTUAL_POSITION, stepper_ctrl_get_actual_position, dev, value, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_stepper_ctrl_set_event_cb(const struct device * dev, stepper_ctrl_event_callback_t callback, void * user_data);

static inline int stepper_ctrl_set_event_cb(const struct device * dev, stepper_ctrl_event_callback_t callback, void * user_data)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; stepper_ctrl_event_callback_t val; } parm1 = { .val = callback };
		union { uintptr_t x; void * val; } parm2 = { .val = user_data };
		return (int) arch_syscall_invoke3(parm0.x, parm1.x, parm2.x, K_SYSCALL_STEPPER_CTRL_SET_EVENT_CB);
	}
#endif
	compiler_barrier();
	return z_impl_stepper_ctrl_set_event_cb(dev, callback, user_data);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define stepper_ctrl_set_event_cb(dev, callback, user_data) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_STEPPER_CTRL_SET_EVENT_CB, stepper_ctrl_set_event_cb, dev, callback, user_data); 	syscall__retval = stepper_ctrl_set_event_cb(dev, callback, user_data); 	sys_port_trace_syscall_exit(K_SYSCALL_STEPPER_CTRL_SET_EVENT_CB, stepper_ctrl_set_event_cb, dev, callback, user_data, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_stepper_ctrl_set_microstep_interval(const struct device * dev, const uint64_t microstep_interval_ns);

static inline int stepper_ctrl_set_microstep_interval(const struct device * dev, const uint64_t microstep_interval_ns)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; const uint64_t val; } parm1 = { .val = microstep_interval_ns };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_STEPPER_CTRL_SET_MICROSTEP_INTERVAL);
	}
#endif
	compiler_barrier();
	return z_impl_stepper_ctrl_set_microstep_interval(dev, microstep_interval_ns);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define stepper_ctrl_set_microstep_interval(dev, microstep_interval_ns) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_STEPPER_CTRL_SET_MICROSTEP_INTERVAL, stepper_ctrl_set_microstep_interval, dev, microstep_interval_ns); 	syscall__retval = stepper_ctrl_set_microstep_interval(dev, microstep_interval_ns); 	sys_port_trace_syscall_exit(K_SYSCALL_STEPPER_CTRL_SET_MICROSTEP_INTERVAL, stepper_ctrl_set_microstep_interval, dev, microstep_interval_ns, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_stepper_ctrl_configure_ramp(const struct device * dev, const struct stepper_ctrl_ramp * ramp);

static inline int stepper_ctrl_configure_ramp(const struct device * dev, const struct stepper_ctrl_ramp * ramp)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; const struct stepper_ctrl_ramp * val; } parm1 = { .val = ramp };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_STEPPER_CTRL_CONFIGURE_RAMP);
	}
#endif
	compiler_barrier();
	return z_impl_stepper_ctrl_configure_ramp(dev, ramp);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define stepper_ctrl_configure_ramp(dev, ramp) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_STEPPER_CTRL_CONFIGURE_RAMP, stepper_ctrl_configure_ramp, dev, ramp); 	syscall__retval = stepper_ctrl_configure_ramp(dev, ramp); 	sys_port_trace_syscall_exit(K_SYSCALL_STEPPER_CTRL_CONFIGURE_RAMP, stepper_ctrl_configure_ramp, dev, ramp, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_stepper_ctrl_move_by(const struct device * dev, const int32_t micro_steps);

static inline int stepper_ctrl_move_by(const struct device * dev, const int32_t micro_steps)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; const int32_t val; } parm1 = { .val = micro_steps };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_STEPPER_CTRL_MOVE_BY);
	}
#endif
	compiler_barrier();
	return z_impl_stepper_ctrl_move_by(dev, micro_steps);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define stepper_ctrl_move_by(dev, micro_steps) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_STEPPER_CTRL_MOVE_BY, stepper_ctrl_move_by, dev, micro_steps); 	syscall__retval = stepper_ctrl_move_by(dev, micro_steps); 	sys_port_trace_syscall_exit(K_SYSCALL_STEPPER_CTRL_MOVE_BY, stepper_ctrl_move_by, dev, micro_steps, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_stepper_ctrl_move_to(const struct device * dev, const int32_t micro_steps);

static inline int stepper_ctrl_move_to(const struct device * dev, const int32_t micro_steps)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; const int32_t val; } parm1 = { .val = micro_steps };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_STEPPER_CTRL_MOVE_TO);
	}
#endif
	compiler_barrier();
	return z_impl_stepper_ctrl_move_to(dev, micro_steps);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define stepper_ctrl_move_to(dev, micro_steps) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_STEPPER_CTRL_MOVE_TO, stepper_ctrl_move_to, dev, micro_steps); 	syscall__retval = stepper_ctrl_move_to(dev, micro_steps); 	sys_port_trace_syscall_exit(K_SYSCALL_STEPPER_CTRL_MOVE_TO, stepper_ctrl_move_to, dev, micro_steps, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_stepper_ctrl_run(const struct device * dev, const enum stepper_ctrl_direction direction);

static inline int stepper_ctrl_run(const struct device * dev, const enum stepper_ctrl_direction direction)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; const enum stepper_ctrl_direction val; } parm1 = { .val = direction };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_STEPPER_CTRL_RUN);
	}
#endif
	compiler_barrier();
	return z_impl_stepper_ctrl_run(dev, direction);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define stepper_ctrl_run(dev, direction) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_STEPPER_CTRL_RUN, stepper_ctrl_run, dev, direction); 	syscall__retval = stepper_ctrl_run(dev, direction); 	sys_port_trace_syscall_exit(K_SYSCALL_STEPPER_CTRL_RUN, stepper_ctrl_run, dev, direction, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_stepper_ctrl_stop(const struct device * dev);

static inline int stepper_ctrl_stop(const struct device * dev)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		return (int) arch_syscall_invoke1(parm0.x, K_SYSCALL_STEPPER_CTRL_STOP);
	}
#endif
	compiler_barrier();
	return z_impl_stepper_ctrl_stop(dev);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define stepper_ctrl_stop(dev) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_STEPPER_CTRL_STOP, stepper_ctrl_stop, dev); 	syscall__retval = stepper_ctrl_stop(dev); 	sys_port_trace_syscall_exit(K_SYSCALL_STEPPER_CTRL_STOP, stepper_ctrl_stop, dev, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_stepper_ctrl_is_moving(const struct device * dev, bool * is_moving);

static inline int stepper_ctrl_is_moving(const struct device * dev, bool * is_moving)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; bool * val; } parm1 = { .val = is_moving };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_STEPPER_CTRL_IS_MOVING);
	}
#endif
	compiler_barrier();
	return z_impl_stepper_ctrl_is_moving(dev, is_moving);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define stepper_ctrl_is_moving(dev, is_moving) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_STEPPER_CTRL_IS_MOVING, stepper_ctrl_is_moving, dev, is_moving); 	syscall__retval = stepper_ctrl_is_moving(dev, is_moving); 	sys_port_trace_syscall_exit(K_SYSCALL_STEPPER_CTRL_IS_MOVING, stepper_ctrl_is_moving, dev, is_moving, syscall__retval); 	syscall__retval; })
#endif
#endif


#ifdef __cplusplus
}
#endif

#endif
#endif /* include guard */
