X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fmware%2Fblanker.c;h=4168504cee2e128d21b466f4d000f5f7394aacb6;hb=911d2706a86d326786bfe721dcc3d63aeade7f28;hp=27b2e04a54c6072ed44968c5d9da2cddf1009cb6;hpb=0c04262c1f4728f4593a1d60ab851ea8d6375faa;p=bertos.git diff --git a/bertos/mware/blanker.c b/bertos/mware/blanker.c index 27b2e04a..4168504c 100644 --- a/bertos/mware/blanker.c +++ b/bertos/mware/blanker.c @@ -27,17 +27,18 @@ * the GNU General Public License. * * Copyright 2006 Develer S.r.l. (http://www.develer.com/) - * Copyright 2001 Bernardo Innocenti + * Copyright 2001 Bernie Innocenti * --> * * \brief Display Blanker (implementation). * * \version $Id$ * - * \author Bernardo Innocenti + * \author Bernie Innocenti */ #include "blanker.h" +#include "hw/hw_blanker.h" #include #include @@ -45,10 +46,6 @@ /* Time without input events before starting blanker */ #define BLK_BLANKTIMEOUT (15 * 1000) /* ms */ -// TODO: move to blanker_hw.h -#include -#define BLK_LCDON power_LcdOn() -#define BLK_LCDOFF power_LcdOff() #warning FIXME:Revise me! @@ -98,25 +95,25 @@ void blk_retrigger(void) */ static void blk_hack(void) { - static signed char blk_colstart[LCD_COLS]; + static signed char blk_colstart[CONFIG_LCD_COLS]; UBYTE row, col; if (rand()%3 == 0) { /* Modify one column */ - col = rand() % LCD_COLS; + col = rand() % CONFIG_LCD_COLS; blk_colstart[col] += rand() % 12 - 5; } - for (col = 0; col < LCD_COLS; ++col) + for (col = 0; col < CONFIG_LCD_COLS; ++col) { if (blk_colstart[col] > 0) { --blk_colstart[col]; /* Scroll down */ - for(row = LCD_ROWS-1; row; --row) + for(row = CONFIG_LCD_ROWS-1; row; --row) { lcd_SetAddr(blk_layer, LCD_POS(col,row)); lcd_PutChar(blk_layer->Buf[LCD_POS(col,row-1)], blk_layer); @@ -131,7 +128,7 @@ static void blk_hack(void) ++blk_colstart[col]; /* Clear tail */ - for(row = 0; row < LCD_ROWS; ++row) + for(row = 0; row < CONFIG_LCD_ROWS; ++row) { if (blk_layer->Buf[LCD_POS(col,row)] != ' ') { @@ -222,3 +219,4 @@ void blk_disable(void) blk_enabled = false; } } +