projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
USB: coding style fixes (structure naming)
[bertos.git]
/
bertos
/
mware
/
blanker.c
diff --git
a/bertos/mware/blanker.c
b/bertos/mware/blanker.c
index 5cf5247e7f350c4ed02b646648665d8d5d4b3b8e..0e96c787a9f67d3b69e522c37ebc4821b0576d6c 100644
(file)
--- a/
bertos/mware/blanker.c
+++ b/
bertos/mware/blanker.c
@@
-27,28
+27,26
@@
* the GNU General Public License.
*
* Copyright 2006 Develer S.r.l. (http://www.develer.com/)
* the GNU General Public License.
*
* Copyright 2006 Develer S.r.l. (http://www.develer.com/)
- * Copyright 2001 Bern
ardo
Innocenti <bernie@codewiz.org>
+ * Copyright 2001 Bern
ie
Innocenti <bernie@codewiz.org>
* -->
*
* \brief Display Blanker (implementation).
*
* -->
*
* \brief Display Blanker (implementation).
*
- * \version $Id$
*
*
- * \author Bern
ardo Innocenti <bernie@develer.com
>
+ * \author Bern
ie Innocenti <bernie@codewiz.org
>
*/
#include "blanker.h"
*/
#include "blanker.h"
+#include "hw/hw_blanker.h"
+
#include <drv/kbd.h>
#include <drv/timer.h>
/* Time without input events before starting blanker */
#define BLK_BLANKTIMEOUT (15 * 1000) /* ms */
#include <drv/kbd.h>
#include <drv/timer.h>
/* Time without input events before starting blanker */
#define BLK_BLANKTIMEOUT (15 * 1000) /* ms */
-// TODO: move to blanker_hw.h
-#include <drv/power.h>
-#define BLK_LCDON power_LcdOn()
-#define BLK_LCDOFF power_LcdOff()
+#warning FIXME:Revise me!
/** Keyboard event handler to listen for key presses in blanker. */
static KbdHandler blk_KbdHandler;
/** Keyboard event handler to listen for key presses in blanker. */
static KbdHandler blk_KbdHandler;
@@
-96,25
+94,25
@@
void blk_retrigger(void)
*/
static void blk_hack(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 */
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;
}
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 */
{
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);
{
lcd_SetAddr(blk_layer, LCD_POS(col,row));
lcd_PutChar(blk_layer->Buf[LCD_POS(col,row-1)], blk_layer);
@@
-129,7
+127,7
@@
static void blk_hack(void)
++blk_colstart[col];
/* Clear tail */
++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)] != ' ')
{
{
if (blk_layer->Buf[LCD_POS(col,row)] != ' ')
{
@@
-220,3
+218,4
@@
void blk_disable(void)
blk_enabled = false;
}
}
blk_enabled = false;
}
}
+