2 * Copyright Droids Corporation, Microb Technology, Eirbot (2005)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * Revision : $Id: lcd.h,v 1.3.4.3 2007-08-19 10:39:31 zer0 Exp $
22 /* Droids-corp, Eirbot, Microb Technology 2005 - Zer0
27 * \brief Interface for the LCD module.
29 * \todo implement ANSI commands for cursor positionning ?
31 * \test works on mega32 with all on the same port and old normal wiring, how about more speific connections ?
33 * This module provides functions for using a standard lcd device
34 * the lcd s intended to be used in 4 bit mode, so don't wire the low nibble, only D4-D7 to 4 CONSECUTIVE port lines
35 * we need the RW, RS and E lines too.
36 * since the last version, you can scramble the wiring, except for D4-D7 who must remain consecutive (see lcd_config.h)
38 * in this new version you can use lcd_putc('\f'); to clear the screen. This maintains an easy compatibility
39 * when you want to use an uart instad (form feed).
42 /**********************************************************/
50 #include "lcd_protocol.h"
55 extern void lcd_init(uint8_t dispAttr);
58 * Put a char on screen
59 * if c = \n cursor is positioned on the next line
60 * if c = \f the screen will be cleared
62 extern void lcd_putc(char c);
65 * same than lcd_putc but with a prototype that is compliant with
66 * avrlibc > 1.4.0 fdevopen prototype
68 extern int lcd_dev_putc(char c, FILE* f);
71 * move the cursor in the screen, x= line, y = char
73 extern void lcd_gotoxy(uint8_t x, uint8_t y);
76 * clear all the screen
77 * avoid using this function, escpecially if you use printf
79 extern void lcd_clrscr(void);