diff options
author | Yuval Peress <peress@chromium.org> | 2021-06-17 13:01:22 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-17 23:26:32 +0000 |
commit | d235afc2438f088ab47043ccf601791504e0ab22 (patch) | |
tree | 0168488ba4ee69364c30dd5fb632649232e4c143 /include | |
parent | b2040ed78b24b1175744e7f8201ab1fe591e852a (diff) | |
download | chrome-ec-d235afc2438f088ab47043ccf601791504e0ab22.tar.gz |
zephyr: add check for zephyr version
BRANCH=none
BUG=none
TEST=(see next CL, added check to shim/src/gpio.c and tested the build)
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I2e53a1531e02aebc3648282c9fcbc2bacd7aa0b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2970986
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/cros_version.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/cros_version.h b/include/cros_version.h index 0d3e777dc5..9cbfaec179 100644 --- a/include/cros_version.h +++ b/include/cros_version.h @@ -11,6 +11,15 @@ #include "common.h" #include "system.h" +#ifdef CONFIG_ZEPHYR +#include "version.h" + +#define IS_ZEPHYR_VERSION(major, minor) \ + (KERNEL_VERSION_MAJOR == (major) && KERNEL_VERSION_MINOR == (minor)) +#else +#define IS_ZEPHYR_VERSION(major, minor) false +#endif /* CONFIG_ZEPHYR */ + #define CROS_EC_IMAGE_DATA_COOKIE1 0xce778899 #define CROS_EC_IMAGE_DATA_COOKIE2 0xceaabbdd |