]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - Documentation/usb/misc_usbsevseg.rst
Merge tag 'timers-urgent-2020-08-14' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-hirsute-kernel.git] / Documentation / usb / misc_usbsevseg.rst
CommitLineData
d80b5005 1=============================
eb86be54 2USB 7-Segment Numeric Display
d80b5005
MCC
3=============================
4
eb86be54
HM
5Manufactured by Delcom Engineering
6
7Device Information
8------------------
9USB VENDOR_ID 0x0fc5
10USB PRODUCT_ID 0x1227
11Both the 6 character and 8 character displays have PRODUCT_ID,
12and according to Delcom Engineering no queryable information
13can be obtained from the device to tell them apart.
14
15Device Modes
16------------
17By default, the driver assumes the display is only 6 characters
18The mode for 6 characters is:
d80b5005 19
eb86be54 20 MSB 0x06; LSB 0x3f
d80b5005 21
eb86be54 22For the 8 character display:
d80b5005 23
eb86be54 24 MSB 0x08; LSB 0xff
d80b5005 25
eb86be54
HM
26The device can accept "text" either in raw, hex, or ascii textmode.
27raw controls each segment manually,
28hex expects a value between 0-15 per character,
29ascii expects a value between '0'-'9' and 'A'-'F'.
30The default is ascii.
31
32Device Operation
33----------------
341. Turn on the device:
35 echo 1 > /sys/bus/usb/.../powered
362. Set the device's mode:
37 echo $mode_msb > /sys/bus/usb/.../mode_msb
38 echo $mode_lsb > /sys/bus/usb/.../mode_lsb
393. Set the textmode:
40 echo $textmode > /sys/bus/usb/.../textmode
414. set the text (for example):
42 echo "123ABC" > /sys/bus/usb/.../text (ascii)
43 echo "A1B2" > /sys/bus/usb/.../text (ascii)
44 echo -ne "\x01\x02\x03" > /sys/bus/usb/.../text (hex)
455. Set the decimal places.
46 The device has either 6 or 8 decimal points.
47 to set the nth decimal place calculate 10 ** n
48 and echo it in to /sys/bus/usb/.../decimals
49 To set multiple decimals points sum up each power.
50 For example, to set the 0th and 3rd decimal place
51 echo 1001 > /sys/bus/usb/.../decimals