summaryrefslogtreecommitdiffstats
path: root/source/ct-Bot/contrib/flash_n_fuse/loadusbtty.sh
diff options
context:
space:
mode:
authorsicarius <devnull@localhost>2007-02-11 19:32:03 +0100
committersicarius <devnull@localhost>2007-02-11 19:32:03 +0100
commit56d9bdd39ed36c36e9a61411b86c76d5228b2133 (patch)
tree0cca7a63a5609f91d1912ecbde6743938c9ae5d2 /source/ct-Bot/contrib/flash_n_fuse/loadusbtty.sh
parent644121b478a57772150f460c3c8cd035aa6767a2 (diff)
downloadrc2007-soccer-56d9bdd39ed36c36e9a61411b86c76d5228b2133.tar
rc2007-soccer-56d9bdd39ed36c36e9a61411b86c76d5228b2133.zip
Added lot's of code-files used during work
Diffstat (limited to 'source/ct-Bot/contrib/flash_n_fuse/loadusbtty.sh')
-rw-r--r--source/ct-Bot/contrib/flash_n_fuse/loadusbtty.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/ct-Bot/contrib/flash_n_fuse/loadusbtty.sh b/source/ct-Bot/contrib/flash_n_fuse/loadusbtty.sh
new file mode 100644
index 0000000..930ac87
--- /dev/null
+++ b/source/ct-Bot/contrib/flash_n_fuse/loadusbtty.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+# create ttyUSB0 device and load module for cp2101
+
+if [ ! -c /dev/ttyUSB0 ]; then
+ mknod -m 666 /dev/ttyUSB0 c 188 0
+fi
+
+if [ -z $(lsmod |cut -d" " -f1 |grep "cp2101") ]; then
+ modprobe cp2101 >/dev/null 2>&1
+ if [ $? != "0" ]; then
+ exit 1;
+ fi
+fi
+