commit | 51e774a3f447b5079ca93c3a22f3c77c14af20e9 | [log] [tgz] |
---|---|---|
author | Henrik Brix Andersen <hebad@vestas.com> | Thu Jul 01 22:02:10 2021 +0200 |
committer | Christopher Friedt <chrisfriedt@gmail.com> | Thu Jul 15 11:47:11 2021 -0400 |
tree | 184b0f07298118b582d2c5f8deb78c3fa30720c1 | |
parent | de130345024abcdf0bf6ae8ff471299811f9c497 [diff] |
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>