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

#ifndef Z_INCLUDE_SYSCALLS_STEPPER_H
#define Z_INCLUDE_SYSCALLS_STEPPER_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_enable(const struct device * dev);

static inline int stepper_enable(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_ENABLE);
	}
#endif
	compiler_barrier();
	return z_impl_stepper_enable(dev);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define stepper_enable(dev) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_STEPPER_ENABLE, stepper_enable, dev); 	syscall__retval = stepper_enable(dev); 	sys_port_trace_syscall_exit(K_SYSCALL_STEPPER_ENABLE, stepper_enable, dev, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_stepper_disable(const struct device * dev);

static inline int stepper_disable(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_DISABLE);
	}
#endif
	compiler_barrier();
	return z_impl_stepper_disable(dev);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define stepper_disable(dev) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_STEPPER_DISABLE, stepper_disable, dev); 	syscall__retval = stepper_disable(dev); 	sys_port_trace_syscall_exit(K_SYSCALL_STEPPER_DISABLE, stepper_disable, dev, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_stepper_set_micro_step_res(const struct device * dev, enum stepper_micro_step_resolution res);

static inline int stepper_set_micro_step_res(const struct device * dev, enum stepper_micro_step_resolution res)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; enum stepper_micro_step_resolution val; } parm1 = { .val = res };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_STEPPER_SET_MICRO_STEP_RES);
	}
#endif
	compiler_barrier();
	return z_impl_stepper_set_micro_step_res(dev, res);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define stepper_set_micro_step_res(dev, res) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_STEPPER_SET_MICRO_STEP_RES, stepper_set_micro_step_res, dev, res); 	syscall__retval = stepper_set_micro_step_res(dev, res); 	sys_port_trace_syscall_exit(K_SYSCALL_STEPPER_SET_MICRO_STEP_RES, stepper_set_micro_step_res, dev, res, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_stepper_get_micro_step_res(const struct device * dev, enum stepper_micro_step_resolution * res);

static inline int stepper_get_micro_step_res(const struct device * dev, enum stepper_micro_step_resolution * res)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; enum stepper_micro_step_resolution * val; } parm1 = { .val = res };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_STEPPER_GET_MICRO_STEP_RES);
	}
#endif
	compiler_barrier();
	return z_impl_stepper_get_micro_step_res(dev, res);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define stepper_get_micro_step_res(dev, res) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_STEPPER_GET_MICRO_STEP_RES, stepper_get_micro_step_res, dev, res); 	syscall__retval = stepper_get_micro_step_res(dev, res); 	sys_port_trace_syscall_exit(K_SYSCALL_STEPPER_GET_MICRO_STEP_RES, stepper_get_micro_step_res, dev, res, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_stepper_set_event_cb(const struct device * dev, stepper_event_cb_t callback, void * user_data);

static inline int stepper_set_event_cb(const struct device * dev, stepper_event_cb_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_event_cb_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_SET_EVENT_CB);
	}
#endif
	compiler_barrier();
	return z_impl_stepper_set_event_cb(dev, callback, user_data);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

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


#ifdef __cplusplus
}
#endif

#endif
#endif /* include guard */
