Skip to content

Commit 809f8ea

Browse files
authored
Merge pull request #10 from dougg3/master
Add udev rule file
2 parents a70acc8 + 233b803 commit 809f8ea

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

99-ch341a-prog.rules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# udev rule that sets permissions for CH341A programmer in Linux.
2+
# Put this file in /etc/udev/rules.d and reload udev rules or reboot to install
3+
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5512", MODE="0666"

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ ch341prog: main.c ch341a.c ch341a.h
33
gcc $(CFLAGS) ch341a.c main.c -o ch341prog -lusb-1.0
44
clean:
55
rm *.o ch341prog -f
6-
.PHONY: clean
6+
install-udev-rule:
7+
cp 99-ch341a-prog.rules /etc/udev/rules.d/
8+
udevadm control --reload-rules
9+
.PHONY: clean install-udev-rule

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,9 @@ Speed Test
3434
-----------
3535
* read a 8M flash(W25Q64) costs 101.840 seconds
3636
* write to an 8M flash(W25Q64) costs 158.811 seconds
37+
38+
Linux Permissions
39+
------------------
40+
To ensure the CH341 programmer will be set up with proper permissions on a Linux computer, run the following command to install a udev rule file into /etc/udev/rules.d:
41+
42+
`sudo make install-udev-rule`

0 commit comments

Comments
 (0)