/* * Copyright (c) 2019 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ #include #include static inline int z_vrfy_ps2_config(const struct device *dev, ps2_callback_t callback_isr) { K_OOPS(K_SYSCALL_DRIVER_PS2(dev, config)); K_OOPS(K_SYSCALL_VERIFY_MSG(callback_isr == NULL, "callback not be set from user mode")); return z_impl_ps2_config(dev, callback_isr); } #include static inline int z_vrfy_ps2_write(const struct device *dev, uint8_t value) { K_OOPS(K_SYSCALL_DRIVER_PS2(dev, write)); return z_impl_ps2_write(dev, value); } #include static inline int z_vrfy_ps2_read(const struct device *dev, uint8_t *value) { K_OOPS(K_SYSCALL_DRIVER_PS2(dev, read)); K_OOPS(K_SYSCALL_MEMORY_WRITE(value, sizeof(uint8_t))); return z_impl_ps2_read(dev, value); } #include static inline int z_vrfy_ps2_enable_callback(const struct device *dev) { K_OOPS(K_SYSCALL_DRIVER_PS2(dev, enable_callback)); return z_impl_ps2_enable_callback(dev); } #include static inline int z_vrfy_ps2_disable_callback(const struct device *dev) { K_OOPS(K_SYSCALL_DRIVER_PS2(dev, disable_callback)); return z_impl_ps2_disable_callback(dev); } #include