forked from eclipse/mraa
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path99-roscube-device.rules
20 lines (16 loc) · 1.23 KB
/
99-roscube-device.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
SUBSYSTEM=="leds", ACTION=="add",PROGRAM="/bin/bash -c ' chmod 666 /sys/devices/led/leds/{LED1,LED2,LED3,LED4,LED5,LED6}/{brightness,trigger,uevent}'"
KERNEL=="ttyTHS0", MODE="0666"
KERNEL=="ttyUSB[0-1]*", MODE="0666"
KERNEL=="ttyS[0-1]*" , MODE="0766"
SUBSYSTEM=="i2c-dev",KERNEL=="i2c-[0-1]*", GROUP="i2c", MODE="0666"
SUBSYSTEM=="i2c-dev",KERNEL=="i2c-8*", GROUP="i2c", MODE="0666"
SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", \
PROGRAM="/bin/sh -c 'chown root:gpio /sys/class/gpio/export /sys/class/gpio/unexport; chmod 222 /sys/class/gpio/export /sys/class/gpio/unexport'"
SUBSYSTEM=="gpio", KERNEL=="gpio*", ACTION=="add", \
PROGRAM="/bin/sh -c 'chown root:gpio /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value; chmod 666 /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value'"
SUBSYSTEM=="pwm", KERNEL=="pwmchip*", ACTION=="add", \
PROGRAM="/bin/bash -c 'chown root:gpio /sys%p/{,un}export; chmod 222 /sys%p/{,un}export'"
SUBSYSTEM=="pwm", KERNEL=="pwmchip*", ACTION=="change", \
PROGRAM="/bin/bash -c 'chown root:gpio /sys%p/%E{EXPORT}/{period,duty_cycle,enable}; chmod 666 /sys%p/%E{EXPORT}/{period,duty_cycle,enable}'"
SUBSYSTEM=="spidev", KERNEL=="spidev*", ACTION=="add", \
GROUP="gpio", MODE="0666"