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