Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

include/sys/lcd.h

Go to the documentation of this file.
00001 
00006 /*
00007  *  The contents of this file are subject to the Mozilla Public License
00008  *  Version 1.0 (the "License"); you may not use this file except in
00009  *  compliance with the License. You may obtain a copy of the License
00010  *  at http://www.mozilla.org/MPL/
00011  *
00012  *  Software distributed under the License is distributed on an "AS IS"
00013  *  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00014  *  the License for the specific language governing rights and
00015  *  limitations under the License.
00016  *
00017  *  The Original Code is legOS code, released October 17, 1999.
00018  *
00019  *  The Initial Developer of the Original Code is Markus L. Noga.
00020  *  Portions created by Markus L. Noga are Copyright (C) 1999
00021  *  Markus L. Noga. All Rights Reserved.
00022  *
00023  *  Contributor(s): Markus L. Noga <markus@noga.de>
00024  */
00025 
00026 #ifndef __sys_lcd_h__
00027 #define __sys_lcd_h__
00028 
00029 #ifdef  __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033 #include <config.h>
00034 #include <rom/lcd.h>
00035 
00037 //
00038 // Definitions
00039 //
00041 
00042 // Offsets and size of the LCD shadow buffer used to speed up
00043 // lcd_refresh()
00044 //
00045 #define LCD_SHORT_CMD   0
00046 #define LCD_LONG_CMD    3
00047 #define LCD_DATA_OFFSET 5
00048 #define LCD_DATA_SIZE   9
00049 
00050 // PCF8566 LCD driver commands
00051 //
00052 #define LCD_MODE_SET    0x40
00053 #define LCD_ENABLE      0x08
00054 #define LCD_DISABLE     0x00
00055 
00056 // LCD i2c bus constants
00057 //
00058 #define LCD_DEV_ID      0x7c
00059 
00060 #define I2C_WRITE       0
00061 #define I2C_READ        1
00062 
00063 #define SCL             5
00064 #define SDA             6
00065 
00066 
00068 //
00069 // Variables
00070 //
00072 
00073 extern unsigned char display_memory[]; 
00074 
00076 //
00077 // Functions
00078 //
00080 
00082 extern void lcd_init(void);
00083 
00085 extern void lcd_power_on(void);
00086 
00088 extern void lcd_power_off(void);
00089 
00091 
00093 extern void lcd_refresh(void);
00094 
00096 
00099 extern void lcd_refresh_next_byte(void)
00100 #ifdef CONF_RCX_COMPILER
00101 __attribute__ ((rcx_interrupt))
00102 #endif
00103 ;
00104 
00105 #ifdef  __cplusplus
00106 }
00107 #endif
00108 
00109 #endif  // __sys_lcd_h__

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

Generated on Mon Feb 16 21:02:10 2004 for brickOS Kernel Developer by doxygen 1.3.5