From: batt Date: Wed, 2 Sep 2009 15:21:09 +0000 (+0000) Subject: Rename file. X-Git-Tag: 2.2.0~104 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=9b9a032785f88c91dc8b7c802266d6f3b2d27d66;p=bertos.git Rename file. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2864 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/drv/lcd_gfx_hwtest.c b/bertos/drv/lcd_gfx_hwtest.c new file mode 100644 index 00000000..7c1d5282 --- /dev/null +++ b/bertos/drv/lcd_gfx_hwtest.c @@ -0,0 +1,94 @@ +/** + * \file + * + * + * \brief dot-matrix LCD test. + * + * \version $Id$ + * + * \author Bernie Innocenti + * + */ + + +#warning FIXME: broken test! + +#if 0 + +#include +#include + +#include + +static void magic(struct Bitmap *bitmap, coord_t x, coord_t y) +{ + static const coord_t coords[] = { 120, 34, 90, 90, 30, 90, 0, 34, 60, 0, 90, 90, 0, 34, 120, 34, 30, 90, 60, 0 }; + unsigned int i; + + gfx_moveTo(bitmap, coords[countof(coords)-2]/2 + x, coords[countof(coords)-1]/3 + y); + for (i = 0; i < countof(coords); i += 2) + gfx_lineTo(bitmap, coords[i]/2 + x, coords[i+1]/3 + y); +} + +int main(int argc, char *argv[]) +{ + emul_init(&argc, argv); + lcd_init(); + + coord_t x = 0, y = LCD_WIDTH / 2; + coord_t xdir = +1, ydir = -1; + Bitmap *bm = &lcd_bitmap; + + for(;;) + { + gfx_bitmapClear(bm); + gfx_setClipRect(bm, 0, 0, bm->width, bm->height); + gfx_rectDraw(bm, 10, 10, bm->width-10, bm->height-10); + gfx_setClipRect(bm, 11, 11, bm->width-11, bm->height-11); + magic(bm, x, y); + + x += xdir; + y += ydir; + if (x >= bm->width) xdir = -1; + if (x <= -50) xdir = +1; + if (y >= bm->height) ydir = -1; + if (y <= -50) ydir = +1; + + lcd_blit_bitmap(bm); + emul_idle(); + usleep(10000); + } + + emul_cleanup(); + return 0; +} + +#endif diff --git a/bertos/drv/lcd_gfx_test.c b/bertos/drv/lcd_gfx_test.c deleted file mode 100644 index 7c1d5282..00000000 --- a/bertos/drv/lcd_gfx_test.c +++ /dev/null @@ -1,94 +0,0 @@ -/** - * \file - * - * - * \brief dot-matrix LCD test. - * - * \version $Id$ - * - * \author Bernie Innocenti - * - */ - - -#warning FIXME: broken test! - -#if 0 - -#include -#include - -#include - -static void magic(struct Bitmap *bitmap, coord_t x, coord_t y) -{ - static const coord_t coords[] = { 120, 34, 90, 90, 30, 90, 0, 34, 60, 0, 90, 90, 0, 34, 120, 34, 30, 90, 60, 0 }; - unsigned int i; - - gfx_moveTo(bitmap, coords[countof(coords)-2]/2 + x, coords[countof(coords)-1]/3 + y); - for (i = 0; i < countof(coords); i += 2) - gfx_lineTo(bitmap, coords[i]/2 + x, coords[i+1]/3 + y); -} - -int main(int argc, char *argv[]) -{ - emul_init(&argc, argv); - lcd_init(); - - coord_t x = 0, y = LCD_WIDTH / 2; - coord_t xdir = +1, ydir = -1; - Bitmap *bm = &lcd_bitmap; - - for(;;) - { - gfx_bitmapClear(bm); - gfx_setClipRect(bm, 0, 0, bm->width, bm->height); - gfx_rectDraw(bm, 10, 10, bm->width-10, bm->height-10); - gfx_setClipRect(bm, 11, 11, bm->width-11, bm->height-11); - magic(bm, x, y); - - x += xdir; - y += ydir; - if (x >= bm->width) xdir = -1; - if (x <= -50) xdir = +1; - if (y >= bm->height) ydir = -1; - if (y <= -50) ydir = +1; - - lcd_blit_bitmap(bm); - emul_idle(); - usleep(10000); - } - - emul_cleanup(); - return 0; -} - -#endif