Skip to content
Commit 49abcb3f authored by Fabien Chereau's avatar Fabien Chereau Committed by Anas Nashif
Browse files

device: add a new macro to obtain the device object symbol name



The new SYS_GET_DEVICE_NAME macro can be used in combination with
SYS_GET_DEVICE to obtain an external reference to a static device
object, e.g.:

extern struct device SYS_GET_DEVICE_NAME(my_device_name);
struct device* dev = SYS_GET_DEVICE(my_device_name);

dev is here set at compile time.

Change-Id: I9094925c685177f01e0cef194ec382ad49658f9d
Signed-off-by: default avatarFabien Chereau <fabien.chereau@intel.com>
parent 45dcfe14
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment