/**
* \file
* <!--
+ * This file is part of BeRTOS.
+ *
+ * Bertos is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * As a special exception, you may use this file as part of a free software
+ * library without restriction. Specifically, if other files instantiate
+ * templates or use macros or inline functions from this file, or you compile
+ * this file and link it with other files to produce an executable, this
+ * file does not by itself cause the resulting executable to be covered by
+ * the GNU General Public License. This exception does not however
+ * invalidate any other reasons why the executable file might be covered by
+ * the GNU General Public License.
+ *
* Copyright 2003, 2004, 2005, 2006 Develer S.r.l. (http://www.develer.com/)
* Copyright 2001 Bernardo Innocenti <bernie@codewiz.org>
- * This file is part of DevLib - See README.devlib for information.
+ *
* -->
*
* \version $Id$
/*#*
*#* $Log$
+ *#* Revision 1.5 2006/07/19 12:56:25 bernie
+ *#* Convert to new Doxygen style.
+ *#*
*#* Revision 1.4 2006/04/27 05:40:11 bernie
*#* Naming convention fixes; Partial merge from project_grl.
*#*
#if CONFIG_LCD_SOFTINT_REFRESH
- /*! Interval between softint driven lcd refresh */
+ /** Interval between softint driven lcd refresh */
# define LCD_REFRESH_INTERVAL 20 /* 20ms -> 50fps */
#endif /* CONFIG_LCD_SOFTINT_REFRESH */
-/*! Number of LCD pages */
+/** Number of LCD pages */
#define LCD_PAGES 4
-/*! Width of an LCD page */
+/** Width of an LCD page */
#define LCD_PAGESIZE (LCD_WIDTH / 2)
-/*!
+/**
* \name LCD I/O pins/ports
* @{
*/
#define LCD_PE_E2 PE6
/*@}*/
-/*!
+/**
* \name DB high nibble (DB[4-7])
* @{
*/
#define LCD_DATA_HI_MASK 0xF0
/*@}*/
-/*!
+/**
* \name DB low nibble (DB[0-3])
* @{
*/
#define LCD_DATA_LO_MASK 0xF0
/*@}*/
-/*!
+/**
* \name LCD bus control macros
* @{
*/
#define LCD_CLR_E(x) (PORTE &= ~(x))
/*@}*/
-/*!
+/**
* \name Chip select bits for LCD_SET_E()
* @{
*/
#define LCDF_E2 (BV(LCD_PE_E2))
/*@}*/
-/*! Read from the LCD data bus (DB[0-7]) */
+/** Read from the LCD data bus (DB[0-7]) */
#define LCD_READ ( \
((LCD_DATA_LO_PIN & LCD_DATA_LO_MASK) >> LCD_DATA_LO_SHIFT) | \
((LCD_DATA_HI_PIN & LCD_DATA_HI_MASK) >> LCD_DATA_HI_SHIFT) \
)
-/*! Write to the LCD data bus (DB[0-7]) */
+/** Write to the LCD data bus (DB[0-7]) */
#define LCD_WRITE(d) \
do { \
LCD_DATA_LO_PORT = (LCD_DATA_LO_PORT & ~LCD_DATA_LO_MASK) | (((d)<<LCD_DATA_LO_SHIFT) & LCD_DATA_LO_MASK); \
LCD_DATA_HI_PORT = (LCD_DATA_HI_PORT & ~LCD_DATA_HI_MASK) | (((d)<<LCD_DATA_HI_SHIFT) & LCD_DATA_HI_MASK); \
} while (0)
-/*! Set data bus direction to output (write to display) */
+/** Set data bus direction to output (write to display) */
#define LCD_DB_OUT \
do { \
LCD_DATA_LO_DDR |= LCD_DATA_LO_MASK; \
LCD_DATA_HI_DDR |= LCD_DATA_HI_MASK; \
} while (0)
-/*! Set data bus direction to input (read from display) */
+/** Set data bus direction to input (read from display) */
#define LCD_DB_IN \
do { \
LCD_DATA_LO_DDR &= ~LCD_DATA_LO_MASK; \
LCD_DATA_HI_DDR &= ~LCD_DATA_HI_MASK; \
} while (0)
-/*! Delay for tEW (160ns) */
+/** Delay for tEW (160ns) */
#define LCD_DELAY_WRITE \
do { \
NOP; \
NOP; \
} while (0)
-/*! Delay for tACC6 (180ns) */
+/** Delay for tACC6 (180ns) */
#define LCD_DELAY_READ \
do { \
NOP; \
} while (0)
-/*!
+/**
* \name 32122A Commands
* @{
*/
#define LCDF_BUSY BV(7)
#if CONFIG_LCD_WAIT
-/*!
+/**
* \code
* __ __
* RS __\____________/__
#endif /* CONFIG_LCD_WAIT */
-/*!
+/**
* Raster buffer to draw into.
*
* Bits in the bitmap bytes have vertical orientation,
static uint8_t lcd_raster[RASTER_SIZE(LCD_WIDTH, LCD_HEIGHT)];
DECLARE_WALL(wall_after_raster, WALL_SIZE)
-/*! Default LCD bitmap */
+/** Default LCD bitmap */
struct Bitmap lcd_bitmap;
#if CONFIG_LCD_SOFTINT_REFRESH
-/*! Timer for regular LCD refresh */
+/** Timer for regular LCD refresh */
static Timer *lcd_refresh_timer;
#endif /* CONFIG_LCD_SOFTINT_REFRESH */
WAIT_LCD;
- /*!
+ /**
* \code
* __________________
* A0 __/ \__
{
WAIT_LCD;
- /*!
+ /**
* \code
* __________________
* A0 ___/ \___
}
-/*!
+/**
* Set LCD contrast PWM.
*/
void lcd_setPwm(int duty)
#endif /* CONFIG_LCD_SOFTINT_REFRESH */
-/*!
+/**
* Initialize LCD subsystem.
*
* \note The PWM used for LCD contrast is initialized in drv/pwm.c