drivers: Add hwinfo API

This commit adds a new hardware info API.
With this API it is possible to read out the device ID.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
This commit is contained in:
Alexander Wachter 2018-12-21 11:58:41 +01:00 committed by Anas Nashif
commit 5b59c10fc4
7 changed files with 105 additions and 0 deletions

View file

@ -0,0 +1,15 @@
/*
* Copyright (c) 2018 Alexander Wachter
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <syscall_handler.h>
#include <hwinfo.h>
Z_SYSCALL_HANDLER(hwinfo_get_device_id, buffer, length) {
Z_OOPS(Z_SYSCALL_MEMORY_WRITE(buffer, length));
return _impl_hwinfo_get_device_id((u8_t *)buffer, (size_t)length);
}