diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/ABI/testing/sysfs-bus-usb-devices-usbsevseg | 43 | ||||
-rw-r--r-- | Documentation/usb/misc_usbsevseg.txt | 46 |
2 files changed, 89 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-usb-devices-usbsevseg b/Documentation/ABI/testing/sysfs-bus-usb-devices-usbsevseg new file mode 100644 index 000000000000..cb830df8777c --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-usb-devices-usbsevseg | |||
@@ -0,0 +1,43 @@ | |||
1 | Where: /sys/bus/usb/.../powered | ||
2 | Date: August 2008 | ||
3 | Kernel Version: 2.6.26 | ||
4 | Contact: Harrison Metzger <harrisonmetz@gmail.com> | ||
5 | Description: Controls whether the device's display will powered. | ||
6 | A value of 0 is off and a non-zero value is on. | ||
7 | |||
8 | Where: /sys/bus/usb/.../mode_msb | ||
9 | Where: /sys/bus/usb/.../mode_lsb | ||
10 | Date: August 2008 | ||
11 | Kernel Version: 2.6.26 | ||
12 | Contact: Harrison Metzger <harrisonmetz@gmail.com> | ||
13 | Description: Controls the devices display mode. | ||
14 | For a 6 character display the values are | ||
15 | MSB 0x06; LSB 0x3F, and | ||
16 | for an 8 character display the values are | ||
17 | MSB 0x08; LSB 0xFF. | ||
18 | |||
19 | Where: /sys/bus/usb/.../textmode | ||
20 | Date: August 2008 | ||
21 | Kernel Version: 2.6.26 | ||
22 | Contact: Harrison Metzger <harrisonmetz@gmail.com> | ||
23 | Description: Controls the way the device interprets its text buffer. | ||
24 | raw: each character controls its segment manually | ||
25 | hex: each character is between 0-15 | ||
26 | ascii: each character is between '0'-'9' and 'A'-'F'. | ||
27 | |||
28 | Where: /sys/bus/usb/.../text | ||
29 | Date: August 2008 | ||
30 | Kernel Version: 2.6.26 | ||
31 | Contact: Harrison Metzger <harrisonmetz@gmail.com> | ||
32 | Description: The text (or data) for the device to display | ||
33 | |||
34 | Where: /sys/bus/usb/.../decimals | ||
35 | Date: August 2008 | ||
36 | Kernel Version: 2.6.26 | ||
37 | Contact: Harrison Metzger <harrisonmetz@gmail.com> | ||
38 | Description: Controls the decimal places on the device. | ||
39 | To set the nth decimal place, give this field | ||
40 | the value of 10 ** n. Assume this field has | ||
41 | the value k and has 1 or more decimal places set, | ||
42 | to set the mth place (where m is not already set), | ||
43 | change this fields value to k + 10 ** m. \ No newline at end of file | ||
diff --git a/Documentation/usb/misc_usbsevseg.txt b/Documentation/usb/misc_usbsevseg.txt new file mode 100644 index 000000000000..0f6be4f9930b --- /dev/null +++ b/Documentation/usb/misc_usbsevseg.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | USB 7-Segment Numeric Display | ||
2 | Manufactured by Delcom Engineering | ||
3 | |||
4 | Device Information | ||
5 | ------------------ | ||
6 | USB VENDOR_ID 0x0fc5 | ||
7 | USB PRODUCT_ID 0x1227 | ||
8 | Both the 6 character and 8 character displays have PRODUCT_ID, | ||
9 | and according to Delcom Engineering no queryable information | ||
10 | can be obtained from the device to tell them apart. | ||
11 | |||
12 | Device Modes | ||
13 | ------------ | ||
14 | By default, the driver assumes the display is only 6 characters | ||
15 | The mode for 6 characters is: | ||
16 | MSB 0x06; LSB 0x3f | ||
17 | For the 8 character display: | ||
18 | MSB 0x08; LSB 0xff | ||
19 | The device can accept "text" either in raw, hex, or ascii textmode. | ||
20 | raw controls each segment manually, | ||
21 | hex expects a value between 0-15 per character, | ||
22 | ascii expects a value between '0'-'9' and 'A'-'F'. | ||
23 | The default is ascii. | ||
24 | |||
25 | Device Operation | ||
26 | ---------------- | ||
27 | 1. Turn on the device: | ||
28 | echo 1 > /sys/bus/usb/.../powered | ||
29 | 2. Set the device's mode: | ||
30 | echo $mode_msb > /sys/bus/usb/.../mode_msb | ||
31 | echo $mode_lsb > /sys/bus/usb/.../mode_lsb | ||
32 | 3. Set the textmode: | ||
33 | echo $textmode > /sys/bus/usb/.../textmode | ||
34 | 4. set the text (for example): | ||
35 | echo "123ABC" > /sys/bus/usb/.../text (ascii) | ||
36 | echo "A1B2" > /sys/bus/usb/.../text (ascii) | ||
37 | echo -ne "\x01\x02\x03" > /sys/bus/usb/.../text (hex) | ||
38 | 5. Set the decimal places. | ||
39 | The device has either 6 or 8 decimal points. | ||
40 | to set the nth decimal place calculate 10 ** n | ||
41 | and echo it in to /sys/bus/usb/.../decimals | ||
42 | To set multiple decimals points sum up each power. | ||
43 | For example, to set the 0th and 3rd decimal place | ||
44 | echo 1001 > /sys/bus/usb/.../decimals | ||
45 | |||
46 | |||