slcan is only for usb adapter from now on.
author"Darron Broad" <darron@kewl.org>
Wed, 11 Nov 2015 05:09:02 +0000
changeset 211 b08d0ade2a17
parent 210 31485522a197
child 212 c2c535877f32
slcan is only for usb adapter from now on.
etc/slcan.sh
--- a/etc/slcan.sh	Sun Nov 08 19:08:01 2015 +0000
+++ b/etc/slcan.sh	Wed Nov 11 05:09:02 2015 +0000
@@ -24,7 +24,7 @@
 	fi
 }
 
-TRY="try: slcan.sh stop or can0|can1 start|stop|status"
+TRY="try: slcan.sh stop or canX start|stop|status"
 
 if test $# = 1; then
 	if test ! "$1" = "stop"; then
@@ -47,18 +47,7 @@
 fi 
 
 CAN=$1
-
-if test "$CAN" = "can0"; then
-	kctrl restore
-	gpio_setfunc 30 ALT3
-	CMD="slcand -t hw -S 1000000 /dev/ttyAMA0 can0"
-elif test "$CAN" = "can1"; then
-	CMD="slcand -S 460800 /dev/ttyPL2303 can1"
-else
-	echo $TRY
-        exit 1
-fi
-
+CMD="slcand -S 460800 /dev/ttyUSB0 ${CAN}"
 PID=$(ps auxw | grep "$CMD" | grep -v grep | awk '{print $2}')
 
 OPT=$2