From c851049cc46e33cbcff7c43ce69400798eb8e209 Mon Sep 17 00:00:00 2001 From: asterix Date: Thu, 20 May 2010 16:54:52 +0000 Subject: [PATCH] Update examples. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3760 38d2e660-2303-0410-9eaa-f027e97ec537 --- examples/lm3s1968/hw/hw_rit128x96.h | 8 +------- examples/lm3s1968/lm3s1968.c | 30 ++++++++++++++++++----------- examples/lm3s8962/hw/hw_rit128x96.h | 8 +------- examples/lm3s8962/lm3s8962.c | 2 +- 4 files changed, 22 insertions(+), 26 deletions(-) diff --git a/examples/lm3s1968/hw/hw_rit128x96.h b/examples/lm3s1968/hw/hw_rit128x96.h index 7ccdeb1d..5a8de9fc 100644 --- a/examples/lm3s1968/hw/hw_rit128x96.h +++ b/examples/lm3s1968/hw/hw_rit128x96.h @@ -82,7 +82,7 @@ } /*@}*/ -INLINE void lcd_bus_init(void) +INLINE void lcd_rit128x96_hw_bus_init(void) { uint32_t dummy; @@ -119,10 +119,4 @@ INLINE void lcd_bus_init(void) while (lm3s_ssiReadFrameNonBlocking(SSI0_BASE, &dummy)); } -/* - * XXX: menu stuff requires lcd_blitBimap() function to be defined. - * Find a better way to do this. - */ -#define rit128x96_blitBitmap lcd_blitBitmap - #endif /* HW_RIT128x96_H */ diff --git a/examples/lm3s1968/lm3s1968.c b/examples/lm3s1968/lm3s1968.c index d6bdb4cc..8ae3b4a1 100644 --- a/examples/lm3s1968/lm3s1968.c +++ b/examples/lm3s1968/lm3s1968.c @@ -35,22 +35,29 @@ * \author Andrea Righi */ +#include "hw/hw_rit128x96.h" + +#include "cfg/compiler.h" +#include "cfg/cfg_gfx.h" + #include + #include #include #include #include + #include #include #include + #include + #include + #include -#include "cfg/compiler.h" -#include "cfg/cfg_gfx.h" -#include "hw/hw_rit128x96.h" #define PROC_STACK_SIZE KERN_MINSTACKSIZE * 2 @@ -316,15 +323,16 @@ static void NORETURN ser_process(void) static struct MenuItem main_items[] = { - { (const_iptr_t)"LED blinking", 0, (MenuHook)led_test, (iptr_t)&lcd_bitmap }, - { (const_iptr_t)"Bouncing logo", 0, (MenuHook)bouncing_logo, (iptr_t)&lcd_bitmap }, - { (const_iptr_t)"Screen saver demo", 0, (MenuHook)screen_saver, (iptr_t)&lcd_bitmap }, - { (const_iptr_t)"Scheduling test", 0, (MenuHook)context_switch_test, (iptr_t)&lcd_bitmap }, - { (const_iptr_t)"Show uptime", 0, (MenuHook)uptime, (iptr_t)&lcd_bitmap }, - { (const_iptr_t)"Reboot", 0, (MenuHook)soft_reset, (iptr_t)&lcd_bitmap }, - { (const_iptr_t)0, 0, NULL, (iptr_t)0 } + { (const_iptr_t)"LED blinking", 0, (MenuHook)led_test, (iptr_t)&lcd_bitmap }, + { (const_iptr_t)"Bouncing logo", 0, (MenuHook)bouncing_logo, (iptr_t)&lcd_bitmap }, + { (const_iptr_t)"Screen saver demo", 0, (MenuHook)screen_saver, (iptr_t)&lcd_bitmap }, + { (const_iptr_t)"Scheduling test", 0, (MenuHook)context_switch_test, (iptr_t)&lcd_bitmap }, + { (const_iptr_t)"Show uptime", 0, (MenuHook)uptime, (iptr_t)&lcd_bitmap }, + { (const_iptr_t)"Reboot", 0, (MenuHook)soft_reset, (iptr_t)&lcd_bitmap }, + { (const_iptr_t)0, 0, NULL, (iptr_t)0, } }; -static struct Menu main_menu = { main_items, "BeRTOS", MF_STICKY | MF_SAVESEL, &lcd_bitmap, 0 }; + +static struct Menu main_menu = { main_items, "BeRTOS", MF_STICKY | MF_SAVESEL, &lcd_bitmap, 0, rit128x96_blitBitmap }; int main(void) { diff --git a/examples/lm3s8962/hw/hw_rit128x96.h b/examples/lm3s8962/hw/hw_rit128x96.h index c857bda9..27306331 100644 --- a/examples/lm3s8962/hw/hw_rit128x96.h +++ b/examples/lm3s8962/hw/hw_rit128x96.h @@ -82,7 +82,7 @@ } /*@}*/ -INLINE void lcd_bus_init(void) +INLINE void lcd_rit128x96_hw_bus_init(void) { uint32_t dummy; @@ -112,10 +112,4 @@ INLINE void lcd_bus_init(void) while (lm3s_ssiReadFrameNonBlocking(SSI0_BASE, &dummy)); } -/* - * XXX: menu stuff requires lcd_blitBimap() function to be defined. - * Find a better way to do this. - */ -#define rit128x96_blitBitmap lcd_blitBitmap - #endif /* HW_RIT128x96_H */ diff --git a/examples/lm3s8962/lm3s8962.c b/examples/lm3s8962/lm3s8962.c index cb1200c9..3ababfc6 100644 --- a/examples/lm3s8962/lm3s8962.c +++ b/examples/lm3s8962/lm3s8962.c @@ -324,7 +324,7 @@ static struct MenuItem main_items[] = { (const_iptr_t)"Reboot", 0, (MenuHook)soft_reset, (iptr_t)&lcd_bitmap }, { (const_iptr_t)0, 0, NULL, (iptr_t)0 } }; -static struct Menu main_menu = { main_items, "BeRTOS", MF_STICKY | MF_SAVESEL, &lcd_bitmap, 0 }; +static struct Menu main_menu = { main_items, "BeRTOS", MF_STICKY | MF_SAVESEL, &lcd_bitmap, 0, rit128x96_blitBitmap }; int main(void) { -- 2.25.1