2017-10-14 07:30:55 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <entropy.h>
|
|
|
|
#include <syscall_handler.h>
|
|
|
|
|
2018-05-05 06:57:57 +08:00
|
|
|
Z_SYSCALL_HANDLER(entropy_get_entropy, dev, buffer, len)
|
2017-10-14 07:30:55 +08:00
|
|
|
{
|
2018-05-05 06:57:57 +08:00
|
|
|
Z_OOPS(Z_SYSCALL_DRIVER_ENTROPY(dev, get_entropy));
|
|
|
|
Z_OOPS(Z_SYSCALL_MEMORY_WRITE(buffer, len));
|
2019-03-09 05:19:05 +08:00
|
|
|
return z_impl_entropy_get_entropy((struct device *)dev, (u8_t *)buffer,
|
2017-10-14 07:30:55 +08:00
|
|
|
len);
|
|
|
|
}
|