From b63257f8641c9f3c9497ee2847ac68032dc6b707 Mon Sep 17 00:00:00 2001 From: Jett Rink Date: Thu, 1 Oct 2020 15:52:04 -0600 Subject: zephyr: add strtoi shim function When I compile volteer, I only need one stdlib style function and it is something we made ourselves. There is a long verion in Zephyr and long and int are the same size for 32-bit MCUs so we just need to forward the implementation. Also remove compilation of our existing platform/ec util file since Zephyr already provides these basic stdlib like functions. BRANCH=none BUG=b:169935794 TEST=Run Zephyr image on Volteer using this function. TEST=Build and run posix-ec target as well Change-Id: Idb4ea4d5e0a6ad3da8ddc5781e16aeb6e666d85f Signed-off-by: Jett Rink Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2444371 Reviewed-by: Jack Rosenthal --- include/task.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/task.h') diff --git a/include/task.h b/include/task.h index 0b244a2a18..365edbb5eb 100644 --- a/include/task.h +++ b/include/task.h @@ -371,6 +371,7 @@ struct irq_def { * Implement the DECLARE_IRQ(irq, routine, priority) macro which is * a core specific helper macro to declare an interrupt handler "routine". */ +#ifndef CONFIG_ZEPHYR #ifdef CONFIG_COMMON_RUNTIME #include "irq_handler.h" #else @@ -383,6 +384,7 @@ struct irq_def { /* Include ec.irqlist here for compilation dependency */ #define ENABLE_IRQ(x) #include "ec.irqlist" -#endif +#endif /* CONFIG_COMMON_RUNTIME */ +#endif /* !CONFIG_ZEPHYR */ #endif /* __CROS_EC_TASK_H */ -- cgit v1.2.1