projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix streaming implementation, now it could be halt only calling the stop function.
[bertos.git]
/
bertos
/
gui
/
menu.c
diff --git
a/bertos/gui/menu.c
b/bertos/gui/menu.c
index 6c3f8d0d8fef038c8980a521585c46efc65e2f30..432927895e28e03f63bf4243259378877cb50969 100644
(file)
--- a/
bertos/gui/menu.c
+++ b/
bertos/gui/menu.c
@@
-39,8
+39,9
@@
#include "menu.h"
#include "menu.h"
-#include "cfg/cfg_
gfx
.h"
+#include "cfg/cfg_
menu
.h"
#include "cfg/cfg_arch.h"
#include "cfg/cfg_arch.h"
+
#include <cfg/compiler.h>
#include <cfg/debug.h>
#include <cfg/compiler.h>
#include <cfg/debug.h>
@@
-48,6
+49,8
@@
#include <gfx/font.h>
#include <gfx/text.h>
#include <gfx/font.h>
#include <gfx/text.h>
+#include <cpu/power.h>
+
#include <drv/kbd.h>
#include <string.h> /* strcpy() */
#include <drv/kbd.h>
#include <string.h> /* strcpy() */
@@
-56,10
+59,6
@@
#include <avr/pgmspace.h> /* strncpy_P() */
#endif
#include <avr/pgmspace.h> /* strncpy_P() */
#endif
-#if CONFIG_MENU_SMOOTH
-#include <drv/lcd_gfx.h>
-#endif
-
#if (CONFIG_MENU_TIMEOUT != 0)
#include <drv/timer.h>
#endif
#if (CONFIG_MENU_TIMEOUT != 0)
#include <drv/timer.h>
#endif
@@
-195,13
+194,11
@@
static void menu_layout(
ypos = bm->cr.ymin;
ypos = bm->cr.ymin;
-#if 1
if (redraw)
{
/* Clear screen */
text_clear(menu->bitmap);
}
if (redraw)
{
/* Clear screen */
text_clear(menu->bitmap);
}
-#endif
if (title)
{
if (title)
{
@@
-274,10
+271,7
@@
static void menu_layout(
/* Only print visible items */
if (!(item->flags & MIF_HIDDEN))
{
/* Only print visible items */
if (!(item->flags & MIF_HIDDEN))
{
- /* Check if a special render function is supplied, otherwise use defaults */
- #if (ARCH & ARCH_NIGHTTEST)
- #warning __FILTER_NEXT_WARNING__
- #endif
+ #warning __FILTER_NEXT_WARNING__
RenderHook renderhook = (item->flags & MIF_RENDERHOOK) ? (RenderHook)item->label : menu_defaultRenderHook;
/* Render menuitem */
RenderHook renderhook = (item->flags & MIF_RENDERHOOK) ? (RenderHook)item->label : menu_defaultRenderHook;
/* Render menuitem */
@@
-293,7
+287,7
@@
static void menu_layout(
/* Clear rest of area */
gfx_rectClear(bm, bm->cr.xmin, ypos, bm->cr.xmax, bm->cr.ymax);
/* Clear rest of area */
gfx_rectClear(bm, bm->cr.xmin, ypos, bm->cr.xmax, bm->cr.ymax);
- lcd_blitBitmap(bm);
+
menu->
lcd_blitBitmap(bm);
}
/* Restore old cliprect */
}
/* Restore old cliprect */
@@
-472,6
+466,7
@@
iptr_t menu_handle(const struct Menu *menu)
#if CONFIG_MENU_SMOOTH || (CONFIG_MENU_TIMEOUT != 0)
key = kbd_peek();
#if CONFIG_MENU_SMOOTH || (CONFIG_MENU_TIMEOUT != 0)
key = kbd_peek();
+ cpu_relax();
#else
key = kbd_get();
#endif
#else
key = kbd_get();
#endif
@@
-540,9
+535,7
@@
iptr_t menu_handle(const struct Menu *menu)
/* Store currently selected item before leaving. */
if (menu->flags & MF_SAVESEL)
/* Store currently selected item before leaving. */
if (menu->flags & MF_SAVESEL)
- #if (ARCH & ARCH_NIGHTTEST)
- #warning __FILTER_NEXT_WARNING__
- #endif
+ #warning __FILTER_NEXT_WARNING__
CONST_CAST(struct Menu *, menu)->selected = selected;
return result;
CONST_CAST(struct Menu *, menu)->selected = selected;
return result;