When CONFIG_MENU_SMOOTH is enabled the menu_handle() can run
indefinitely without explicitly releasing the CPU.
So, add a voluntary preemption point in menu_handle() to avoid
starvation of the other processes when the kernel preemption is not
enabled.
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4838
38d2e660-2303-0410-9eaa-
f027e97ec537
#include <gfx/font.h>
#include <gfx/text.h>
+#include <cpu/power.h>
+
#include <drv/kbd.h>
#include <string.h> /* strcpy() */
#if CONFIG_MENU_SMOOTH || (CONFIG_MENU_TIMEOUT != 0)
key = kbd_peek();
+ cpu_relax();
#else
key = kbd_get();
#endif