2018-05-04 02:16:58 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018 Linaro Ltd.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <syscall_handler.h>
|
2019-06-26 03:53:56 +08:00
|
|
|
#include <drivers/led.h>
|
2018-05-04 02:16:58 +08:00
|
|
|
|
2019-08-14 02:34:34 +08:00
|
|
|
static inline int z_vrfy_led_blink(struct device *dev, u32_t led,
|
|
|
|
u32_t delay_on, u32_t delay_off)
|
2018-05-04 02:16:58 +08:00
|
|
|
{
|
2018-05-05 06:57:57 +08:00
|
|
|
Z_OOPS(Z_SYSCALL_DRIVER_LED(dev, blink));
|
2019-03-09 05:19:05 +08:00
|
|
|
return z_impl_led_blink((struct device *)dev, led, delay_on,
|
2018-05-04 02:16:58 +08:00
|
|
|
delay_off);
|
|
|
|
}
|
2019-08-14 02:34:34 +08:00
|
|
|
#include <syscalls/led_blink_mrsh.c>
|
2018-05-04 02:16:58 +08:00
|
|
|
|
2019-08-14 02:34:34 +08:00
|
|
|
static inline int z_vrfy_led_set_brightness(struct device *dev, u32_t led,
|
|
|
|
u8_t value)
|
2018-05-04 02:16:58 +08:00
|
|
|
{
|
2018-05-05 06:57:57 +08:00
|
|
|
Z_OOPS(Z_SYSCALL_DRIVER_LED(dev, set_brightness));
|
2019-03-09 05:19:05 +08:00
|
|
|
return z_impl_led_set_brightness((struct device *)dev, led, value);
|
2018-05-04 02:16:58 +08:00
|
|
|
}
|
2019-08-14 02:34:34 +08:00
|
|
|
#include <syscalls/led_set_brightness_mrsh.c>
|
2018-05-04 02:16:58 +08:00
|
|
|
|
2019-08-14 02:34:34 +08:00
|
|
|
static inline int z_vrfy_led_on(struct device *dev, u32_t led)
|
2018-05-04 02:16:58 +08:00
|
|
|
{
|
2018-05-05 06:57:57 +08:00
|
|
|
Z_OOPS(Z_SYSCALL_DRIVER_LED(dev, on));
|
2019-03-09 05:19:05 +08:00
|
|
|
return z_impl_led_on((struct device *)dev, led);
|
2018-05-04 02:16:58 +08:00
|
|
|
}
|
2019-08-14 02:34:34 +08:00
|
|
|
#include <syscalls/led_on_mrsh.c>
|
2018-05-04 02:16:58 +08:00
|
|
|
|
2019-08-14 02:34:34 +08:00
|
|
|
static inline int z_vrfy_led_off(struct device *dev, u32_t led)
|
2018-05-04 02:16:58 +08:00
|
|
|
{
|
2018-05-05 06:57:57 +08:00
|
|
|
Z_OOPS(Z_SYSCALL_DRIVER_LED(dev, off));
|
2019-03-09 05:19:05 +08:00
|
|
|
return z_impl_led_off((struct device *)dev, led);
|
2018-05-04 02:16:58 +08:00
|
|
|
}
|
2019-08-14 02:34:34 +08:00
|
|
|
#include <syscalls/led_off_mrsh.c>
|