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

#ifndef Z_INCLUDE_SYSCALLS_SWDP_H
#define Z_INCLUDE_SYSCALLS_SWDP_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_swdp_output_sequence(const struct device * dev, const uint32_t count, const uint8_t *const data);

__pinned_func
static inline int swdp_output_sequence(const struct device * dev, const uint32_t count, const uint8_t *const data)
{
#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 = count };
		union { uintptr_t x; const uint8_t *const val; } parm2 = { .val = data };
		return (int) arch_syscall_invoke3(parm0.x, parm1.x, parm2.x, K_SYSCALL_SWDP_OUTPUT_SEQUENCE);
	}
#endif
	compiler_barrier();
	return z_impl_swdp_output_sequence(dev, count, data);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define swdp_output_sequence(dev, count, data) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_SWDP_OUTPUT_SEQUENCE, swdp_output_sequence, dev, count, data); 	syscall__retval = swdp_output_sequence(dev, count, data); 	sys_port_trace_syscall_exit(K_SYSCALL_SWDP_OUTPUT_SEQUENCE, swdp_output_sequence, dev, count, data, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_swdp_input_sequence(const struct device * dev, const uint32_t count, uint8_t *const buf);

__pinned_func
static inline int swdp_input_sequence(const struct device * dev, const uint32_t count, uint8_t *const buf)
{
#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 = count };
		union { uintptr_t x; uint8_t *const val; } parm2 = { .val = buf };
		return (int) arch_syscall_invoke3(parm0.x, parm1.x, parm2.x, K_SYSCALL_SWDP_INPUT_SEQUENCE);
	}
#endif
	compiler_barrier();
	return z_impl_swdp_input_sequence(dev, count, buf);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define swdp_input_sequence(dev, count, buf) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_SWDP_INPUT_SEQUENCE, swdp_input_sequence, dev, count, buf); 	syscall__retval = swdp_input_sequence(dev, count, buf); 	sys_port_trace_syscall_exit(K_SYSCALL_SWDP_INPUT_SEQUENCE, swdp_input_sequence, dev, count, buf, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_swdp_transfer(const struct device * dev, const uint8_t request, uint32_t *const data, const uint8_t idle_cycles, uint8_t *const response);

__pinned_func
static inline int swdp_transfer(const struct device * dev, const uint8_t request, uint32_t *const data, const uint8_t idle_cycles, uint8_t *const response)
{
#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 val; } parm1 = { .val = request };
		union { uintptr_t x; uint32_t *const val; } parm2 = { .val = data };
		union { uintptr_t x; const uint8_t val; } parm3 = { .val = idle_cycles };
		union { uintptr_t x; uint8_t *const val; } parm4 = { .val = response };
		return (int) arch_syscall_invoke5(parm0.x, parm1.x, parm2.x, parm3.x, parm4.x, K_SYSCALL_SWDP_TRANSFER);
	}
#endif
	compiler_barrier();
	return z_impl_swdp_transfer(dev, request, data, idle_cycles, response);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define swdp_transfer(dev, request, data, idle_cycles, response) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_SWDP_TRANSFER, swdp_transfer, dev, request, data, idle_cycles, response); 	syscall__retval = swdp_transfer(dev, request, data, idle_cycles, response); 	sys_port_trace_syscall_exit(K_SYSCALL_SWDP_TRANSFER, swdp_transfer, dev, request, data, idle_cycles, response, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_swdp_set_pins(const struct device * dev, const uint8_t pins, const uint8_t value);

__pinned_func
static inline int swdp_set_pins(const struct device * dev, const uint8_t pins, const uint8_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 uint8_t val; } parm1 = { .val = pins };
		union { uintptr_t x; const uint8_t val; } parm2 = { .val = value };
		return (int) arch_syscall_invoke3(parm0.x, parm1.x, parm2.x, K_SYSCALL_SWDP_SET_PINS);
	}
#endif
	compiler_barrier();
	return z_impl_swdp_set_pins(dev, pins, value);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define swdp_set_pins(dev, pins, value) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_SWDP_SET_PINS, swdp_set_pins, dev, pins, value); 	syscall__retval = swdp_set_pins(dev, pins, value); 	sys_port_trace_syscall_exit(K_SYSCALL_SWDP_SET_PINS, swdp_set_pins, dev, pins, value, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_swdp_get_pins(const struct device * dev, uint8_t *const state);

__pinned_func
static inline int swdp_get_pins(const struct device * dev, uint8_t *const state)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; uint8_t *const val; } parm1 = { .val = state };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_SWDP_GET_PINS);
	}
#endif
	compiler_barrier();
	return z_impl_swdp_get_pins(dev, state);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define swdp_get_pins(dev, state) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_SWDP_GET_PINS, swdp_get_pins, dev, state); 	syscall__retval = swdp_get_pins(dev, state); 	sys_port_trace_syscall_exit(K_SYSCALL_SWDP_GET_PINS, swdp_get_pins, dev, state, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_swdp_set_clock(const struct device * dev, const uint32_t clock);

__pinned_func
static inline int swdp_set_clock(const struct device * dev, const uint32_t clock)
{
#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 = clock };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_SWDP_SET_CLOCK);
	}
#endif
	compiler_barrier();
	return z_impl_swdp_set_clock(dev, clock);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define swdp_set_clock(dev, clock) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_SWDP_SET_CLOCK, swdp_set_clock, dev, clock); 	syscall__retval = swdp_set_clock(dev, clock); 	sys_port_trace_syscall_exit(K_SYSCALL_SWDP_SET_CLOCK, swdp_set_clock, dev, clock, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_swdp_port_on(const struct device * dev);

__pinned_func
static inline int swdp_port_on(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_SWDP_PORT_ON);
	}
#endif
	compiler_barrier();
	return z_impl_swdp_port_on(dev);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define swdp_port_on(dev) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_SWDP_PORT_ON, swdp_port_on, dev); 	syscall__retval = swdp_port_on(dev); 	sys_port_trace_syscall_exit(K_SYSCALL_SWDP_PORT_ON, swdp_port_on, dev, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_swdp_port_off(const struct device * dev);

__pinned_func
static inline int swdp_port_off(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_SWDP_PORT_OFF);
	}
#endif
	compiler_barrier();
	return z_impl_swdp_port_off(dev);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define swdp_port_off(dev) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_SWDP_PORT_OFF, swdp_port_off, dev); 	syscall__retval = swdp_port_off(dev); 	sys_port_trace_syscall_exit(K_SYSCALL_SWDP_PORT_OFF, swdp_port_off, dev, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_swdp_configure(const struct device * dev, const uint8_t turnaround, const bool data_phase);

__pinned_func
static inline int swdp_configure(const struct device * dev, const uint8_t turnaround, const bool data_phase)
{
#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 val; } parm1 = { .val = turnaround };
		union { uintptr_t x; const bool val; } parm2 = { .val = data_phase };
		return (int) arch_syscall_invoke3(parm0.x, parm1.x, parm2.x, K_SYSCALL_SWDP_CONFIGURE);
	}
#endif
	compiler_barrier();
	return z_impl_swdp_configure(dev, turnaround, data_phase);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define swdp_configure(dev, turnaround, data_phase) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_SWDP_CONFIGURE, swdp_configure, dev, turnaround, data_phase); 	syscall__retval = swdp_configure(dev, turnaround, data_phase); 	sys_port_trace_syscall_exit(K_SYSCALL_SWDP_CONFIGURE, swdp_configure, dev, turnaround, data_phase, syscall__retval); 	syscall__retval; })
#endif
#endif


#ifdef __cplusplus
}
#endif

#endif
#endif /* include guard */
