zephyr/drivers/counter/counter_handlers.c

24 lines
539 B
C

/*
* Copyright (c) 2017 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <syscall_handler.h>
#include <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) \
_SYSCALL_HANDLER(counter_ ## name, dev) \
{ \
_SYSCALL_DRIVER_COUNTER(dev, name); \
return _impl_counter_ ## name((struct device *)dev); \
}
COUNTER_HANDLER(get_pending_int)
COUNTER_HANDLER(read)
COUNTER_HANDLER(stop)
COUNTER_HANDLER(start)