1*4b552d31Stsutsui /* $NetBSD: lcd.h,v 1.2 2023/01/15 05:08:33 tsutsui Exp $ */ 29184265aStsutsui /* $OpenBSD: lcd.h,v 1.2 2011/03/23 16:54:35 pirofti Exp $ */ 39184265aStsutsui 49184265aStsutsui /* 59184265aStsutsui * Copyright (c) 2007 Kenji AOYAMA <aoyama@nk-home.net> 69184265aStsutsui * All rights reserved. 79184265aStsutsui * 89184265aStsutsui * Redistribution and use in source and binary forms, with or without 99184265aStsutsui * modification, are permitted provided that the following conditions 109184265aStsutsui * are met: 119184265aStsutsui * 1. Redistributions of source code must retain the above copyright 129184265aStsutsui * notice, this list of conditions and the following disclaimer. 139184265aStsutsui * 2. Redistributions in binary form must reproduce the above copyright 149184265aStsutsui * notice, this list of conditions and the following disclaimer in the 159184265aStsutsui * documentation and/or other materials provided with the distribution. 169184265aStsutsui * 179184265aStsutsui * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 189184265aStsutsui * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 199184265aStsutsui * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 209184265aStsutsui * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 219184265aStsutsui * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 229184265aStsutsui * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 239184265aStsutsui * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 249184265aStsutsui * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 259184265aStsutsui * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 269184265aStsutsui * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 279184265aStsutsui * SUCH DAMAGE. 289184265aStsutsui */ 299184265aStsutsui 309184265aStsutsui #ifndef _MACHINE_LCD_H_ 319184265aStsutsui #define _MACHINE_LCD_H_ 329184265aStsutsui 339184265aStsutsui /* 349184265aStsutsui * NetBSD/luna68k LCD driver 359184265aStsutsui * (taken from OpenBSD/luna88k LCD driver) 369184265aStsutsui */ 379184265aStsutsui 389184265aStsutsui /* The ioctl defines */ 399184265aStsutsui 409184265aStsutsui #define LCDCLS _IO('L', 1) /* Clear LCD screen */ 419184265aStsutsui #define LCDHOME _IO('L', 2) /* Move the cursor to left-upper */ 429184265aStsutsui #define LCDMODE _IOW('L', 3, int) /* Set the data entry mode */ 439184265aStsutsui #define LCDDISP _IOW('L', 4, int) /* Blink, cursor, and display on/off */ 449184265aStsutsui #define LCDMOVE _IOW('L', 5, int) /* Move cursor / shift display area */ 459184265aStsutsui #define LCDSEEK _IOW('L', 6, int) /* Move the cursor to specified position */ 469184265aStsutsui #define LCDRESTORE _IO('L', 7) /* Restore boot-time LCD message */ 479184265aStsutsui 489184265aStsutsui /* argument value for each ioctl */ 499184265aStsutsui 509184265aStsutsui /* LCDMODE; when a character data is written, then ... */ 519184265aStsutsui #define LCDMODE_C_LEFT 0x04 /* cursor moves left */ 529184265aStsutsui #define LCDMODE_C_RIGHT 0x06 /* cursor moves right */ 539184265aStsutsui #define LCDMODE_D_LEFT 0x05 /* display area shifts to left */ 549184265aStsutsui #define LCDMODE_D_RIGHT 0x07 /* display area shifts to right */ 559184265aStsutsui 569184265aStsutsui /* LCDDISP; you can use these values or'ed */ 579184265aStsutsui #define LCD_DISPLAY 0x04 /* LCD display on */ 589184265aStsutsui #define LCD_CURSOR 0x02 /* Cursor on */ 599184265aStsutsui #define LCD_BLINK 0x01 /* Blink on */ 609184265aStsutsui 619184265aStsutsui /* LCDMOVE; just move the cursor or shift the display area */ 629184265aStsutsui #define LCDMOVE_C_LEFT 0x10 /* cursor moves left */ 639184265aStsutsui #define LCDMOVE_C_RIGHT 0x14 /* cursor moves right */ 649184265aStsutsui #define LCDMOVE_D_LEFT 0x18 /* display area shifts to left */ 659184265aStsutsui #define LCDMOVE_D_RIGHT 0x1c /* display area shifts to right */ 669184265aStsutsui 679184265aStsutsui #endif /* _MACHINE_LCD_H_ */ 68