
/* auto-generated by gen_syscalls.py, don't edit */
#ifndef Z_INCLUDE_SYSCALLS_PWM_H
#define Z_INCLUDE_SYSCALLS_PWM_H


#ifndef _ASMLANGUAGE

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

#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic push
#endif

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif

#ifdef __cplusplus
extern "C" {
#endif

extern int z_impl_pwm_pin_set_cycles(struct device * dev, u32_t pwm, u32_t period, u32_t pulse, pwm_flags_t flags);
static inline int pwm_pin_set_cycles(struct device * dev, u32_t pwm, u32_t period, u32_t pulse, pwm_flags_t flags)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		return (int) arch_syscall_invoke5(*(uintptr_t *)&dev, *(uintptr_t *)&pwm, *(uintptr_t *)&period, *(uintptr_t *)&pulse, *(uintptr_t *)&flags, K_SYSCALL_PWM_PIN_SET_CYCLES);
	}
#endif
	compiler_barrier();
	return z_impl_pwm_pin_set_cycles(dev, pwm, period, pulse, flags);
}


extern int z_impl_pwm_get_cycles_per_sec(struct device * dev, u32_t pwm, u64_t * cycles);
static inline int pwm_get_cycles_per_sec(struct device * dev, u32_t pwm, u64_t * cycles)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		return (int) arch_syscall_invoke3(*(uintptr_t *)&dev, *(uintptr_t *)&pwm, *(uintptr_t *)&cycles, K_SYSCALL_PWM_GET_CYCLES_PER_SEC);
	}
#endif
	compiler_barrier();
	return z_impl_pwm_get_cycles_per_sec(dev, pwm, cycles);
}


#ifdef __cplusplus
}
#endif

#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic pop
#endif

#endif
#endif /* include guard */
