Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115737
b: refs/heads/master
c: eb86be5
h: refs/heads/master
i:
  115735: d0eefaa
v: v3
  • Loading branch information
Harrison Metzger authored and Greg Kroah-Hartman committed Oct 17, 2008
1 parent 1c5118b commit e65aa44
Show file tree
Hide file tree
Showing 6 changed files with 494 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c3d36c453c84554eb12941b3f98abf4fefec000a
refs/heads/master: eb86be5424d4c08e686d5e578b72a26c516ae58a
43 changes: 43 additions & 0 deletions trunk/Documentation/ABI/testing/sysfs-bus-usb-devices-usbsevseg
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Where: /sys/bus/usb/.../powered
Date: August 2008
Kernel Version: 2.6.26
Contact: Harrison Metzger <harrisonmetz@gmail.com>
Description: Controls whether the device's display will powered.
A value of 0 is off and a non-zero value is on.

Where: /sys/bus/usb/.../mode_msb
Where: /sys/bus/usb/.../mode_lsb
Date: August 2008
Kernel Version: 2.6.26
Contact: Harrison Metzger <harrisonmetz@gmail.com>
Description: Controls the devices display mode.
For a 6 character display the values are
MSB 0x06; LSB 0x3F, and
for an 8 character display the values are
MSB 0x08; LSB 0xFF.

Where: /sys/bus/usb/.../textmode
Date: August 2008
Kernel Version: 2.6.26
Contact: Harrison Metzger <harrisonmetz@gmail.com>
Description: Controls the way the device interprets its text buffer.
raw: each character controls its segment manually
hex: each character is between 0-15
ascii: each character is between '0'-'9' and 'A'-'F'.

Where: /sys/bus/usb/.../text
Date: August 2008
Kernel Version: 2.6.26
Contact: Harrison Metzger <harrisonmetz@gmail.com>
Description: The text (or data) for the device to display

Where: /sys/bus/usb/.../decimals
Date: August 2008
Kernel Version: 2.6.26
Contact: Harrison Metzger <harrisonmetz@gmail.com>
Description: Controls the decimal places on the device.
To set the nth decimal place, give this field
the value of 10 ** n. Assume this field has
the value k and has 1 or more decimal places set,
to set the mth place (where m is not already set),
change this fields value to k + 10 ** m.
46 changes: 46 additions & 0 deletions trunk/Documentation/usb/misc_usbsevseg.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
USB 7-Segment Numeric Display
Manufactured by Delcom Engineering

Device Information
------------------
USB VENDOR_ID 0x0fc5
USB PRODUCT_ID 0x1227
Both the 6 character and 8 character displays have PRODUCT_ID,
and according to Delcom Engineering no queryable information
can be obtained from the device to tell them apart.

Device Modes
------------
By default, the driver assumes the display is only 6 characters
The mode for 6 characters is:
MSB 0x06; LSB 0x3f
For the 8 character display:
MSB 0x08; LSB 0xff
The device can accept "text" either in raw, hex, or ascii textmode.
raw controls each segment manually,
hex expects a value between 0-15 per character,
ascii expects a value between '0'-'9' and 'A'-'F'.
The default is ascii.

Device Operation
----------------
1. Turn on the device:
echo 1 > /sys/bus/usb/.../powered
2. Set the device's mode:
echo $mode_msb > /sys/bus/usb/.../mode_msb
echo $mode_lsb > /sys/bus/usb/.../mode_lsb
3. Set the textmode:
echo $textmode > /sys/bus/usb/.../textmode
4. set the text (for example):
echo "123ABC" > /sys/bus/usb/.../text (ascii)
echo "A1B2" > /sys/bus/usb/.../text (ascii)
echo -ne "\x01\x02\x03" > /sys/bus/usb/.../text (hex)
5. Set the decimal places.
The device has either 6 or 8 decimal points.
to set the nth decimal place calculate 10 ** n
and echo it in to /sys/bus/usb/.../decimals
To set multiple decimals points sum up each power.
For example, to set the 0th and 3rd decimal place
echo 1001 > /sys/bus/usb/.../decimals


9 changes: 9 additions & 0 deletions trunk/drivers/usb/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ config USB_ADUTUX
To compile this driver as a module, choose M here. The module
will be called adutux.

config USB_SEVSEG
tristate "USB 7-Segment LED Display"
depends on USB
help
Say Y here if you have a USB 7-Segment Display by Delcom

To compile this driver as a module, choose M here: the
module will be called usbsevseg.

config USB_RIO500
tristate "USB Diamond Rio500 support"
depends on USB
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/usb/misc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ obj-$(CONFIG_USB_RIO500) += rio500.o
obj-$(CONFIG_USB_TEST) += usbtest.o
obj-$(CONFIG_USB_TRANCEVIBRATOR) += trancevibrator.o
obj-$(CONFIG_USB_USS720) += uss720.o
obj-$(CONFIG_USB_SEVSEG) += usbsevseg.o

obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga/

Expand Down
Loading

0 comments on commit e65aa44

Please sign in to comment.