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: Henrik Brix Andersen <hebad@vestas.com>
1 file changed