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

#ifndef Z_INCLUDE_SYSCALLS_HAPTICS_H
#define Z_INCLUDE_SYSCALLS_HAPTICS_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_haptics_calibrate(const struct device * dev, const uint32_t routine);

static inline int haptics_calibrate(const struct device * dev, const uint32_t routine)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; const uint32_t val; } parm1 = { .val = routine };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_HAPTICS_CALIBRATE);
	}
#endif
	compiler_barrier();
	return z_impl_haptics_calibrate(dev, routine);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define haptics_calibrate(dev, routine) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_HAPTICS_CALIBRATE, haptics_calibrate, dev, routine); 	syscall__retval = haptics_calibrate(dev, routine); 	sys_port_trace_syscall_exit(K_SYSCALL_HAPTICS_CALIBRATE, haptics_calibrate, dev, routine, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_haptics_monitor_get(const struct device * dev, const enum haptics_monitor monitor, const enum haptics_monitor_type type, struct sensor_value *const val);

static inline int haptics_monitor_get(const struct device * dev, const enum haptics_monitor monitor, const enum haptics_monitor_type type, struct sensor_value *const val)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; const enum haptics_monitor val; } parm1 = { .val = monitor };
		union { uintptr_t x; const enum haptics_monitor_type val; } parm2 = { .val = type };
		union { uintptr_t x; struct sensor_value *const val; } parm3 = { .val = val };
		return (int) arch_syscall_invoke4(parm0.x, parm1.x, parm2.x, parm3.x, K_SYSCALL_HAPTICS_MONITOR_GET);
	}
#endif
	compiler_barrier();
	return z_impl_haptics_monitor_get(dev, monitor, type, val);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define haptics_monitor_get(dev, monitor, type, val) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_HAPTICS_MONITOR_GET, haptics_monitor_get, dev, monitor, type, val); 	syscall__retval = haptics_monitor_get(dev, monitor, type, val); 	sys_port_trace_syscall_exit(K_SYSCALL_HAPTICS_MONITOR_GET, haptics_monitor_get, dev, monitor, type, val, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_haptics_monitor_set(const struct device * dev, const enum haptics_monitor monitor, const bool enable);

static inline int haptics_monitor_set(const struct device * dev, const enum haptics_monitor monitor, const bool enable)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; const enum haptics_monitor val; } parm1 = { .val = monitor };
		union { uintptr_t x; const bool val; } parm2 = { .val = enable };
		return (int) arch_syscall_invoke3(parm0.x, parm1.x, parm2.x, K_SYSCALL_HAPTICS_MONITOR_SET);
	}
#endif
	compiler_barrier();
	return z_impl_haptics_monitor_set(dev, monitor, enable);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define haptics_monitor_set(dev, monitor, enable) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_HAPTICS_MONITOR_SET, haptics_monitor_set, dev, monitor, enable); 	syscall__retval = haptics_monitor_set(dev, monitor, enable); 	sys_port_trace_syscall_exit(K_SYSCALL_HAPTICS_MONITOR_SET, haptics_monitor_set, dev, monitor, enable, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_haptics_select_source(const struct device * dev, const enum haptics_source src, const union haptics_config *const cfg);

static inline int haptics_select_source(const struct device * dev, const enum haptics_source src, const union haptics_config *const cfg)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; const enum haptics_source val; } parm1 = { .val = src };
		union { uintptr_t x; const union haptics_config *const val; } parm2 = { .val = cfg };
		return (int) arch_syscall_invoke3(parm0.x, parm1.x, parm2.x, K_SYSCALL_HAPTICS_SELECT_SOURCE);
	}
#endif
	compiler_barrier();
	return z_impl_haptics_select_source(dev, src, cfg);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define haptics_select_source(dev, src, cfg) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_HAPTICS_SELECT_SOURCE, haptics_select_source, dev, src, cfg); 	syscall__retval = haptics_select_source(dev, src, cfg); 	sys_port_trace_syscall_exit(K_SYSCALL_HAPTICS_SELECT_SOURCE, haptics_select_source, dev, src, cfg, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_haptics_set_level(const struct device * dev, const enum haptics_source src, const union haptics_config *const cfg, const uint32_t level);

static inline int haptics_set_level(const struct device * dev, const enum haptics_source src, const union haptics_config *const cfg, const uint32_t level)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; const enum haptics_source val; } parm1 = { .val = src };
		union { uintptr_t x; const union haptics_config *const val; } parm2 = { .val = cfg };
		union { uintptr_t x; const uint32_t val; } parm3 = { .val = level };
		return (int) arch_syscall_invoke4(parm0.x, parm1.x, parm2.x, parm3.x, K_SYSCALL_HAPTICS_SET_LEVEL);
	}
#endif
	compiler_barrier();
	return z_impl_haptics_set_level(dev, src, cfg, level);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define haptics_set_level(dev, src, cfg, level) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_HAPTICS_SET_LEVEL, haptics_set_level, dev, src, cfg, level); 	syscall__retval = haptics_set_level(dev, src, cfg, level); 	sys_port_trace_syscall_exit(K_SYSCALL_HAPTICS_SET_LEVEL, haptics_set_level, dev, src, cfg, level, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_haptics_start_output(const struct device * dev);

static inline int haptics_start_output(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_HAPTICS_START_OUTPUT);
	}
#endif
	compiler_barrier();
	return z_impl_haptics_start_output(dev);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define haptics_start_output(dev) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_HAPTICS_START_OUTPUT, haptics_start_output, dev); 	syscall__retval = haptics_start_output(dev); 	sys_port_trace_syscall_exit(K_SYSCALL_HAPTICS_START_OUTPUT, haptics_start_output, dev, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_haptics_stop_output(const struct device * dev);

static inline int haptics_stop_output(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_HAPTICS_STOP_OUTPUT);
	}
#endif
	compiler_barrier();
	return z_impl_haptics_stop_output(dev);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define haptics_stop_output(dev) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_HAPTICS_STOP_OUTPUT, haptics_stop_output, dev); 	syscall__retval = haptics_stop_output(dev); 	sys_port_trace_syscall_exit(K_SYSCALL_HAPTICS_STOP_OUTPUT, haptics_stop_output, dev, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_haptics_stream_samples(const struct device * dev, const uint8_t *const samples, const size_t len);

static inline int haptics_stream_samples(const struct device * dev, const uint8_t *const samples, const size_t len)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; const uint8_t *const val; } parm1 = { .val = samples };
		union { uintptr_t x; const size_t val; } parm2 = { .val = len };
		return (int) arch_syscall_invoke3(parm0.x, parm1.x, parm2.x, K_SYSCALL_HAPTICS_STREAM_SAMPLES);
	}
#endif
	compiler_barrier();
	return z_impl_haptics_stream_samples(dev, samples, len);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define haptics_stream_samples(dev, samples, len) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_HAPTICS_STREAM_SAMPLES, haptics_stream_samples, dev, samples, len); 	syscall__retval = haptics_stream_samples(dev, samples, len); 	sys_port_trace_syscall_exit(K_SYSCALL_HAPTICS_STREAM_SAMPLES, haptics_stream_samples, dev, samples, len, syscall__retval); 	syscall__retval; })
#endif
#endif


#ifdef __cplusplus
}
#endif

#endif
#endif /* include guard */
