#*
#*                                                                                      	
#*                        WCH Device Node Build Script                         
#*                                                                                      
#*                    Copyright 2010 WCH GROUP all right reserved                                                                  
#*                                                                                       
#*                                                              Version: 1.0.0.0           	
#*                                                              Date: 2010/09/11        	
#*
#!/bin/bash
echo "Build tty file node (ttyWCH0 ~ ttyWCH31)"

port=0

while [ $port -lt 33 ]
do
	rm -f /dev/ttyWCH$port
	rm -f /dev/cnx$port

  	echo /dev/ttyWCH$port 	

  	mknod /dev/ttyWCH$port c 245 $port

	chmod a+w /dev/ttyWCH$port
	
	port=`expr $port + 1`
done
