⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eibdrv.load

📁 欧洲安装总线系统的USB串口接口驱动c程序源代码.软件代码由西门子公司提供
💻 LOAD
字号:
#!/bin/sh# ---------------------------------------------------------------------------# eibdrv.load# ---------------------------------------------------------------------------# eibdrv Version 0.2.1# Copyright (C) 2002, Wolfgang Tumfart#                     Donaustrasse 104/9#                     A-2344 Maria Enzersdorf#                     Austria (Europe)#                     tumfart@auto.tuwien.ac.at## This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2 of the License, or# (at your option) any later version.## This program is distributed in the hope that it will be useful, but# WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU# General Public License for more details.## You should have received a copy of the GNU General Public License along# with this program; if not, write to the Free Software Foundation, Inc.,# 675 Mass Ave, Cambridge, MA 02139, USA.# ---------------------------------------------------------------------------# Configure eibdrv by changing the following parametermode=1                  # 0-Standardmode, 1-Servermodeport="/dev/ttyS1"       # Node of serial port used  major=100               # major-number of device driver, 0 for                         # automatic configurationwpbuf_size=20           # maximal number of unacknowledged write requestsoutbuf_size=10          # maximal number of messages not written yetrpbuf_size=10           # maximal number of user processesrpbuf_msgbuf_size=20    # maximal number of unread messages stored per user process# Overwrite configuration values with command line parameterif test $# -ne 0; then   if test $# -eq 3; then      mode=$1      port=$2      major=$3   elif test $# -eq 7; then      mode=$1      port=$2      major=$3      wpbuf_size=$4      outbuf_size=$5      rpbuf_size=$6      rpbuf_msgbuf_size=$7   else       echo "usage (StandardMode): eibdrv.load 0 port major"      echo "      (ServerMode)  : eibdrv.load 1 port major wpbuf_size outbuf_size rpbuf_size rpbuf_msgbufsize"      exit 1;   fi;fi# Load eibdrv/sbin/insmod eibdrv mode=$mode port=$port major=$major \               wpbuf_size=$wpbuf_size outbuf_size=$outbuf_size \               rpbuf_size=$rpbuf_size rpbuf_msgbuf_size=$rpbuf_msgbuf_size || exit 2# Remove old node, find out major number and create new noderm -f /dev/eibdrvmajor=`cat /proc/devices | awk '$2=="eibdrv" {print $1}'`mknod /dev/eibdrv c $major 0chmod 0666 /dev/eibdrvecho "eibdrv: module loaded!"# Start two server processes if driver is in servermodeif test $mode -eq 1; then   /sbin/eibdrv_serv /dev/eibdrvfi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -