zephyr/drivers/bbram/bbram_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

56 lines
1.7 KiB
C

/*
* Copyright (c) 2023, Laczen
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/drivers/bbram.h>
#include <zephyr/internal/syscall_handler.h>
static inline int z_vrfy_bbram_check_invalid(const struct device *dev)
{
K_OOPS(K_SYSCALL_OBJ(dev, K_OBJ_DRIVER_BBRAM));
return z_impl_bbram_check_invalid(dev);
}
#include <zephyr/syscalls/bbram_check_invalid_mrsh.c>
static inline int z_vrfy_bbram_check_standby_power(const struct device *dev)
{
K_OOPS(K_SYSCALL_OBJ(dev, K_OBJ_DRIVER_BBRAM));
return z_impl_bbram_check_standby_power(dev);
}
#include <zephyr/syscalls/bbram_check_standby_power_mrsh.c>
static inline int z_vrfy_bbram_check_power(const struct device *dev)
{
K_OOPS(K_SYSCALL_OBJ(dev, K_OBJ_DRIVER_BBRAM));
return z_impl_bbram_check_power(dev);
}
#include <zephyr/syscalls/bbram_check_power_mrsh.c>
static inline int z_vrfy_bbram_get_size(const struct device *dev, size_t *size)
{
K_OOPS(K_SYSCALL_OBJ(dev, K_OBJ_DRIVER_BBRAM));
K_OOPS(K_SYSCALL_MEMORY_WRITE(size, sizeof(size_t)));
return z_impl_bbram_get_size(dev, size);
}
#include <zephyr/syscalls/bbram_get_size_mrsh.c>
static inline int z_vrfy_bbram_read(const struct device *dev, size_t offset,
size_t size, uint8_t *data)
{
K_OOPS(K_SYSCALL_OBJ(dev, K_OBJ_DRIVER_BBRAM));
K_OOPS(K_SYSCALL_MEMORY_WRITE(data, size));
return z_impl_bbram_read(dev, offset, size, data);
}
#include <zephyr/syscalls/bbram_read_mrsh.c>
static inline int z_vrfy_bbram_write(const struct device *dev, size_t offset,
size_t size, const uint8_t *data)
{
K_OOPS(K_SYSCALL_OBJ(dev, K_OBJ_DRIVER_BBRAM));
K_OOPS(K_SYSCALL_MEMORY_READ(data, size));
return z_impl_bbram_write(dev, offset, size, data);
}
#include <zephyr/syscalls/bbram_write_mrsh.c>