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