zephyr/drivers/ps2/ps2_handlers.c
Yong Cong Sin bbe5e1e6eb build: namespace the generated headers with zephyr/
Namespaced the generated headers with `zephyr` to prevent
potential conflict with other headers.

Introduce a temporary Kconfig `LEGACY_GENERATED_INCLUDE_PATH`
that is enabled by default. This allows the developers to
continue the use of the old include paths for the time being
until it is deprecated and eventually removed. The Kconfig will
generate a build-time warning message, similar to the
`CONFIG_TIMER_RANDOM_GENERATOR`.

Updated the includes path of in-tree sources accordingly.

Most of the changes here are scripted, check the PR for more
info.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 22:03:55 +02:00

47 lines
1.4 KiB
C

/*
* Copyright (c) 2019 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/drivers/ps2.h>
#include <zephyr/internal/syscall_handler.h>
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 <zephyr/syscalls/ps2_config_mrsh.c>
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 <zephyr/syscalls/ps2_write_mrsh.c>
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 <zephyr/syscalls/ps2_read_mrsh.c>
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 <zephyr/syscalls/ps2_enable_callback_mrsh.c>
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 <zephyr/syscalls/ps2_disable_callback_mrsh.c>