mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-01 16:13:42 +00:00
move counter.h to drivers/counter.h and create a shim for backward-compatibility. No functional changes to the headers. A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES. Related to #16539 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
26 lines
629 B
C
26 lines
629 B
C
/*
|
|
* Copyright (c) 2017 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <syscall_handler.h>
|
|
#include <drivers/counter.h>
|
|
|
|
/* For those APIs that just take one argument which is a counter driver
|
|
* instance and return an integral value
|
|
*/
|
|
#define COUNTER_HANDLER(name) \
|
|
Z_SYSCALL_HANDLER(counter_ ## name, dev) \
|
|
{ \
|
|
Z_OOPS(Z_SYSCALL_DRIVER_COUNTER(dev, name)); \
|
|
return z_impl_counter_ ## name((struct device *)dev); \
|
|
}
|
|
|
|
COUNTER_HANDLER(get_pending_int)
|
|
COUNTER_HANDLER(read)
|
|
COUNTER_HANDLER(stop)
|
|
COUNTER_HANDLER(start)
|
|
COUNTER_HANDLER(get_top_value)
|
|
COUNTER_HANDLER(get_max_relative_alarm)
|