1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
4 * display7seg - Driver interface for the 7-segment display
5 * present on Sun Microsystems CP1400 and CP1500
7 * Copyright (c) 2000 Eric Brower <ebrower@usa.net>
11 #ifndef __display7seg_h__
12 #define __display7seg_h__
16 #define D7SIOCRD _IOR(D7S_IOC, 0x45, int) /* Read device state */
17 #define D7SIOCWR _IOW(D7S_IOC, 0x46, int) /* Write device state */
18 #define D7SIOCTM _IO (D7S_IOC, 0x47) /* Translate mode (FLIP)*/
21 * ioctl flag definitions
23 * POINT - Toggle decimal point (0=absent 1=present)
24 * ALARM - Toggle alarm LED (0=green 1=red)
25 * FLIP - Toggle inverted mode (0=normal 1=flipped)
26 * bits 0-4 - Character displayed (see definitions below)
28 * Display segments are defined as follows,
29 * subject to D7S_FLIP register state:
40 #define D7S_POINT (1 << 7) /* Decimal point*/
41 #define D7S_ALARM (1 << 6) /* Alarm LED */
42 #define D7S_FLIP (1 << 5) /* Flip display */
44 #define D7S_0 0x00 /* Numerals 0-9 */
54 #define D7S_A 0x0A /* Letters A-F, H, L, P */
64 #define D7S_SEGA 0x14 /* Individual segments */
71 #define D7S_SEGABFG 0x1B /* Segment groupings */
72 #define D7S_SEGCDEG 0x1C
73 #define D7S_SEGBCEF 0x1D
74 #define D7S_SEGADG 0x1E
75 #define D7S_BLANK 0x1F /* Clear all segments */
77 #define D7S_MIN_VAL 0x0
78 #define D7S_MAX_VAL 0x1F
80 #endif /* ifndef __display7seg_h__ */