File: 99-ni_usb_gpib.rules.in

package info (click to toggle)
linux-gpib-user 4.3.7-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,760 kB
  • sloc: ansic: 10,381; perl: 1,120; xml: 375; makefile: 335; yacc: 335; tcl: 308; python: 173; php: 157; lex: 144; sh: 134; lisp: 94
file content (16 lines) | stat: -rw-r--r-- 1,240 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#gpib-usb-b without firmware
SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="3923", ATTR{idProduct}=="702b", ENV{DEVICE}="$devnode", RUN+="@UDEV_LIBDIR@/gpib_udev_fxloader"
#device id 713b is a keithley kusb-488 before we load it with firmware
SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="3923", ATTR{idProduct}=="713b", ENV{DEVICE}="$devnode", RUN+="@UDEV_LIBDIR@/gpib_udev_fxloader"

#automatically set the correct --board-type option and export SERIAL number for gpib_udev_config
ACTION=="add|change", SUBSYSTEM=="usb", DRIVER=="ni_usb_gpib", ATTRS{serial}=="*", ENV{GPIB_CONFIG_OPTIONS}+="--board-type ni_usb_b", ENV{SERIAL}="$attr{serial}"

#devices ready to be configured with gpib_config
SUBSYSTEM=="usb", ACTION=="add|change", DRIVER=="ni_usb_gpib", RUN+="@UDEV_LIBDIR@/gpib_udev_config"

#this rule generates new "change" udev events for devices supported by the
#driver after the module is loaded.
#it is needed because if the driver is not already loaded when the hardware is plugged in,
#then the initial hardware "add" event will not be able to accomplish anything.
SUBSYSTEM=="module", ACTION=="add", DEVPATH=="/module/ni_usb_gpib", RUN+="@UDEV_LIBDIR@/gpib_udevadm_wrapper trigger --property-match DRIVER=ni_usb_gpib"