Path: blob/master/arch/sparc/include/uapi/asm/display7seg.h
26495 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1/*2*3* display7seg - Driver interface for the 7-segment display4* present on Sun Microsystems CP1400 and CP15005*6* Copyright (c) 2000 Eric Brower <[email protected]>7*8*/910#ifndef __display7seg_h__11#define __display7seg_h__1213#define D7S_IOC 'p'1415#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)*/1819/*20* ioctl flag definitions21*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)26*27* Display segments are defined as follows,28* subject to D7S_FLIP register state:29*30* a31* ---32* f| |b33* -g-34* e| |c35* ---36* d37*/3839#define D7S_POINT (1 << 7) /* Decimal point*/40#define D7S_ALARM (1 << 6) /* Alarm LED */41#define D7S_FLIP (1 << 5) /* Flip display */4243#define D7S_0 0x00 /* Numerals 0-9 */44#define D7S_1 0x0145#define D7S_2 0x0246#define D7S_3 0x0347#define D7S_4 0x0448#define D7S_5 0x0549#define D7S_6 0x0650#define D7S_7 0x0751#define D7S_8 0x0852#define D7S_9 0x0953#define D7S_A 0x0A /* Letters A-F, H, L, P */54#define D7S_B 0x0B55#define D7S_C 0x0C56#define D7S_D 0x0D57#define D7S_E 0x0E58#define D7S_F 0x0F59#define D7S_H 0x1060#define D7S_E2 0x1161#define D7S_L 0x1262#define D7S_P 0x1363#define D7S_SEGA 0x14 /* Individual segments */64#define D7S_SEGB 0x1565#define D7S_SEGC 0x1666#define D7S_SEGD 0x1767#define D7S_SEGE 0x1868#define D7S_SEGF 0x1969#define D7S_SEGG 0x1A70#define D7S_SEGABFG 0x1B /* Segment groupings */71#define D7S_SEGCDEG 0x1C72#define D7S_SEGBCEF 0x1D73#define D7S_SEGADG 0x1E74#define D7S_BLANK 0x1F /* Clear all segments */7576#define D7S_MIN_VAL 0x077#define D7S_MAX_VAL 0x1F7879#endif /* ifndef __display7seg_h__ */808182