Caddy
A 2005 Roborodentia entry with vision and path planning capability
 All Data Structures Files Functions Variables Typedefs Macros Pages
lcd_16x2.h
1 /*
2  * This file is part of Caddy.
3  *
4  * Caddy 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 3 of the License, or
7  * (at your option) any later version.
8  *
9  * Caddy 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.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Caddy. If not, see <http://www.gnu.org/licenses/>.
16  */
17 // ourLcd.h
18 #ifndef OURLCD_H
19 #define OURLCD_H
20 
21 #include <stdint.h>
22 #include <avr/io.h>
23 
24 // LCD display geometry
25 #define LCD_LINES 2
26 #define LCD_LINE_LENGTH 16
27 
28 #ifdef DEBUGGING
29 #define lcdInit() lcdInit_()
30 #define lcdWriteStr(str, row, col) lcdWriteStr_(str, row, col)
31 #define lcdPrintHex(data, row, col) lcdPrintHex_(data, row, col)
32 #define lcdPrintDec(data, row, col) lcdPrintDec_(data, row, col)
33 #define lcdPrintDecU08(data, row, col) lcdPrintDecU08_(data, row, col)
34 #define lcdPrintDecS08(data, row, col) lcdPrintDecS08_(data, row, col)
35 #else
36 #define lcdInit()
37 #define lcdWriteStr(str, row, col)
38 #define lcdPrintHex(data, row, col)
39 #define lcdPrintDec(data, row, col)
40 #define lcdPrintDecU08(data, row, col)
41 #define lcdPrintDecS08(data, row, col)
42 #endif
43 
44 // Prototypes
45 void lcdInit_(void);
46 void lcdPrintHex_(uint8_t data, uint8_t row, uint8_t col);
47 void lcdPrintDec_(int8_t data, uint8_t row, uint8_t col);
48 
58 void lcdWriteStr_(const char *str, uint8_t row, uint8_t col);
59 
63 void lcdPrintDecU08_(uint8_t data, uint8_t row, uint8_t col);
64 void lcdPrintDecS08_(int8_t data, uint8_t row, uint8_t col);
65 
66 #endif // #ifndef