lcd.h
Go to the documentation of this file.
1 
6 /*
7  * The contents of this file are subject to the Mozilla Public License
8  * Version 1.0 (the "License"); you may not use this file except in
9  * compliance with the License. You may obtain a copy of the License
10  * at http://www.mozilla.org/MPL/
11  *
12  * Software distributed under the License is distributed on an "AS IS"
13  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14  * the License for the specific language governing rights and
15  * limitations under the License.
16  *
17  * The Original Code is legOS code, released October 17, 1999.
18  *
19  * The Initial Developer of the Original Code is Markus L. Noga.
20  * Portions created by Markus L. Noga are Copyright (C) 1999
21  * Markus L. Noga. All Rights Reserved.
22  *
23  * Contributor(s): Markus L. Noga <markus@noga.de>
24  */
25 
26 #ifndef __sys_lcd_h__
27 #define __sys_lcd_h__
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #include <config.h>
34 #include <rom/lcd.h>
35 
37 //
38 // Definitions
39 //
41 
42 // Offsets and size of the LCD shadow buffer used to speed up
43 // lcd_refresh()
44 //
45 #define LCD_SHORT_CMD 0
46 #define LCD_LONG_CMD 3
47 #define LCD_DATA_OFFSET 5
48 #define LCD_DATA_SIZE 9
49 
50 // PCF8566 LCD driver commands
51 //
52 #define LCD_MODE_SET 0x40
53 #define LCD_ENABLE 0x08
54 #define LCD_DISABLE 0x00
55 
56 // LCD i2c bus constants
57 //
58 #define LCD_DEV_ID 0x7c
59 
60 #define I2C_WRITE 0
61 #define I2C_READ 1
62 
63 #define SCL 5
64 #define SDA 6
65 
66 
68 //
69 // Variables
70 //
72 
73 extern unsigned char display_memory[];
74 
76 //
77 // Functions
78 //
80 
82 extern void lcd_init(void);
83 
85 extern void lcd_power_on(void);
86 
88 extern void lcd_power_off(void);
89 
91 
93 extern void lcd_refresh(void);
94 
96 
99 extern void lcd_refresh_next_byte(void)
100 #ifdef CONF_RCX_COMPILER
101 __attribute__ ((rcx_interrupt))
102 #endif
103 ;
104 
105 #ifdef __cplusplus
106 }
107 #endif
108 
109 #endif // __sys_lcd_h__
unsigned char display_memory[]
LCD display data buffer.
kernel configuration file
void lcd_power_on(void)
power on LCD display, also called from lcd_init()
Definition: lcd.c:266
void lcd_power_off(void)
power off LCD display
Definition: lcd.c:279
void lcd_refresh_next_byte(void)
show LCD display contents to the world
ROM Interface: RCX LCD control.
void lcd_init(void)
initialize LCD driver
Definition: lcd.c:295
void lcd_refresh(void)
show LCD display contents to the world
Definition: lcd.c:254

brickOS is released under the Mozilla Public License.
Original code copyright 1998-2005 by the authors.

Generated for brickOS Kernel Developer by doxygen 1.8.9.1