diff options
Diffstat (limited to 'zephyr/shim/src/i2c.c')
-rw-r--r-- | zephyr/shim/src/i2c.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/zephyr/shim/src/i2c.c b/zephyr/shim/src/i2c.c index 53766f1683..0074327826 100644 --- a/zephyr/shim/src/i2c.c +++ b/zephyr/shim/src/i2c.c @@ -3,12 +3,19 @@ * found in the LICENSE file. */ +#include <zephyr/sys/util.h> +#include <zephyr/drivers/i2c.h> + #include "console.h" #include "i2c.h" #include "i2c/i2c.h" -#include <zephyr/drivers/i2c.h> -#include <zephyr/sys/util.h> +/* + * The named-i2c-ports node is required by the I2C shim + */ +#if !DT_NODE_EXISTS(DT_PATH(named_i2c_ports)) +#error I2C shim requires the named-i2c-ports node to be defined. +#endif /* * Initialize device bindings in i2c_devices. |