Skip to content
Commit 51e774a3 authored by Henrik Brix Andersen's avatar Henrik Brix Andersen Committed by Christopher Friedt
Browse files

device: add DEVICE_DT_GET_ONE macro



Add DEVICE_DT_GET_ONE() macro. This macro is similar to
DEVICE_DT_GET_ANY() but instead of returning NULL if no enabled,
compatible device instance is found, it throws a compilation error.

This is useful for compile-time checks in samples.

Signed-off-by: default avatarHenrik Brix Andersen <hebad@vestas.com>
parent de130345
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment