Browse Source

- skel-root/hd51: show usb icon in frontdisplay

master
vanhofen 7 years ago
parent
commit
740f96816a
  1. 16
      skel-root/armbox/hd51/lib/mdev/usb/mdev-usb

16
skel-root/armbox/hd51/lib/mdev/usb/mdev-usb

@ -34,6 +34,22 @@ LOGINFO "${ACTION} $channel ${manufacturer:-$idVendor} ${product:-$idProduct}"
#LOGINFO "PRODUCT=${product} idProduct=${idProduct}"
#LOGINFO "MANUFACTURER=${manufacturer} idVendor=${idVendor}"
# ignore controllers and hubs
cat /sys/bus/usb/devices/*/bDeviceClass | grep -q -v '02\|09'
RET=$?
case "$ACTION" in
add)
if [ $RET = 0 ]; then
echo 1 > /proc/stb/lcd/symbol_usb
fi
;;
remove)
if [ $RET = 1 ]; then
echo 0 > /proc/stb/lcd/symbol_usb
fi
;;
esac
# http://en.wikipedia.org/wiki/Universal_Serial_Bus#Device_classes
# http://www.usb.org/developers/defined_class
[ 0 -eq "${TYPE%%/*}" ] && TYPE=$INTERFACE

Loading…
Cancel
Save