1 /* $OpenBSD: lcd.h,v 1.2 2011/03/23 16:54:35 pirofti Exp $ */ 2 3 /* 4 * Copyright (c) 2007 Kenji AOYAMA <aoyama@nk-home.net> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 29 #ifndef _MACHINE_LCD_H_ 30 #define _MACHINE_LCD_H_ 31 32 /* 33 * OpenBSD/luna88k LCD driver 34 */ 35 36 /* The ioctl defines */ 37 38 #define LCDCLS _IO('L', 1) /* Clear LCD screen */ 39 #define LCDHOME _IO('L', 2) /* Move the cursor to left-upper */ 40 #define LCDMODE _IOW('L', 3, int) /* Set the data entry mode */ 41 #define LCDDISP _IOW('L', 4, int) /* Blink, cursor, and display on/off */ 42 #define LCDMOVE _IOW('L', 5, int) /* Move cursor / shift display area */ 43 #define LCDSEEK _IOW('L', 6, int) /* Move the cursor to specified position */ 44 #define LCDRESTORE _IO('L', 7) /* Restore boot-time LCD message */ 45 46 /* argument value for each ioctl */ 47 48 /* LCDMODE; when a character data is written, then ... */ 49 #define LCDMODE_C_LEFT 0x04 /* cursor moves left */ 50 #define LCDMODE_C_RIGHT 0x06 /* cursor moves right */ 51 #define LCDMODE_D_LEFT 0x05 /* display area shifts to left */ 52 #define LCDMODE_D_RIGHT 0x07 /* display area shifts to right */ 53 54 /* LCDDISP; you can use these values or'ed */ 55 #define LCD_DISPLAY 0x04 /* LCD display on */ 56 #define LCD_CURSOR 0x02 /* Cursor on */ 57 #define LCD_BLINK 0x01 /* Blink on */ 58 59 /* LCDMOVE; just move the cursor or shift the display area */ 60 #define LCDMOVE_C_LEFT 0x10 /* cursor moves left */ 61 #define LCDMOVE_C_RIGHT 0x14 /* cursor moves right */ 62 #define LCDMOVE_D_LEFT 0x18 /* display area shifts to left */ 63 #define LCDMOVE_D_RIGHT 0x1c /* display area shifts to right */ 64 65 #endif /* _MACHINE_LCD_H_ */ 66