亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? documentation

?? canbus4linux,來自www.sourceforge.net
??
?? 第 1 頁 / 共 2 頁
字號:
                     D O C U M E N T A T I O N            C A N B U S 4 L I N U X   V E R S I O N   0 . 3Copyright 2001 by Juergen Eder <Juergen.Eder@gmx.de>No liability for the contents of this document can be accepted. Use the concepts, examples and other content at your own risk. All copyrights are held by their respective owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity ofany trademark or service mark. The file elektor_canpar.o is a driver for the can card from "Elektor magazine june, 2000". Homepage: http://www.elektor.deThe file can200par.o is a driver for the can card from CAN200 Project (it's also a card for theparallelport)Homepage: http://private.addcom.de/horo/can200/index.htmlThe file cantronik.o is a driver for the can card from cantronik.comThe canbus4linux driver is completely new written and use no part fromElektor or CAN200 project!****************************************************************************Installation:see file: INSTALL****************************************************************************Licence:see file: COPYING****************************************************************************Features:- interrupt driven- should work with kernel 2.2.16 or newer  (tested with 2.6.6)- support CAN200 card and elektor CAN card (both for the parallelport)  other cards can easily added with mini driver- support CAN 2.0A and 2.0B (PeliCAN) of SJA1000 chip- support /proc filesystem (/proc/canbus/...)- parameters can be controlled by: IOCTL's and /proc filesystem- read and write are implemented  => example: echo "1234 0 12 34 55" > /dev/can0     send a can message with:       can id = 0x1234        rtr = 0       data bytes = 0x12 0x34 0x55  => cat /dev/can0     shows the can messages- support poll and fsync- support fasync- time stamp in all events- a virtual CAN bus is simulated, if several applications uses the same CAN channel  => example: 2 applications (x and y) open /dev/can0     -> application x send a message (and get the "transmission event)     -> application y get the receive message, because of the "virtual bus structure"  => it's possible to turn off virtualization       ---------------                  |<------ virtual CAN bus       |             |   send data      |       |    App x    |---->------>----->|       |             |                  |       ---------------                  |                                        |       ---------------                  |       |             |   get data       |       |    App y    |<-----<--------<--|       |             |                  |       ---------------                  |                                        |                                        |                                 ---------------                                 |  Hardware   |                                 ---------------                                        |                                        |<------- real CAN bus                                        |- the two drivers for the ELEKTOR CAN CARD and the CAN200 CAN CARD use  the parport driver- the chipset driver (SJA1000.O) calculates the BTR registers****************************************************************************Description:Actually the driver has three layers:Layer 1: elektor_canpar.o and/or can200par.oThis layer implements the hardware access to the chip registers. This layer is specific for every hardware.Layer 2: SJA1000.OIt's the chipset layer and implements all features of the SJA1000from Philips. This driver "translates" the order's from layer 3to chip registers. For example layer 3 want 125000 baud. Layer 2 calculates the BTR0 and BTR1 register and set this register with layer 1.Layer 3: canbuscore.oIt's a core driver between the hardware driver and the application. This layer implements all features: read/write, ioctl's, ...---------------------------------------------|                APPLICATION                |---------------------------------------------                      |---------------------------------------------|                CANBUSCORE.O               |---------------------------------------------       |                      |---------------  ------------------------------|  SJA1000.O  |  |  <other  hardware driver>  |      chipset driver or hardware driver---------------  ------------------------------        |                     |     ------------------       -------------------     |                |             |           |-------------  ---------------  ---------  ---------| ELEKTOR.O |  | CAN200PAR.O |  | <ISA> |  | <USB> |  ....-------------  ---------------  ---------  ---------****************************************************************************Accessing CAN bus with scripts:If a CAN driver is installed and started, it will create a directory:/proc/canbusand sub directories as many devices are available:/proc/canbus/0/proc/canbus/1/proc/canbus/2/proc/canbus/3/proc/canbus/...In "/proc/canbus/devices" you get the number of installed devices, for example 1 sub directory if you have only LPT1 and installed only elektor_canpar.o (or only can200par.o).In the sub directories (./0, ./1, ...) you get information from every CAN channel. Some information are write only and some are read only:- ./baudrate (read/write: one line with decimal integer value)- ./busload (read: busload in percentage  => not implemented yet)- ./filter (read/write: one line with 2 values hexadecimal acceptance filter)- ./format (read/write: one line with 1 value integer: 0=default, 1=11 bit, 2=29 bit)- ./lost (read: lost messages while receiving)- ./mode (read/write: one line with 1 value integer: 0=CAN 2.0A   1=CAN 2.0B PeliCAN)- ./receive (XXX: TODO)- ./standby (read/write: one line with 1 value integer: 0=active  1=standby)- ./transmit (write: one line with a CAN message, all values hexadecimal: <can id> <rtr> [<data bytes>])- ./virtualize (read/write: one line with 1 value integer: 0=virtualize off   1=virtualize on)- ./information (read: information about the CAN channel)****************************************************************************Access with scripts:To set all values, you can use the /proc filesystem and the echo command:Examples:Baudrate:   echo 500000 > /proc/canbus/0/baudrateFilter  :   echo "ffffffff ffffffff" > /proc/canbus/0/filterTransmit:   echo "1234 0 11 22 33 44 55 66 77 88" > /proc/canbus/0/transmitTo receive CAN messages, you can use the "cat" command:cat /dev/can0If some data will received, you get a line shown below:received  1010852408:682453  00000111   0  0  [n data bytes]  0    |              |            |       |  |        |         |---- lost messages    |              |            |       |  |        |-------------- n data bytes (max. 8)    |              |            |       |  |----------------------- dlc (data length code = number of received bytes)    |              |            |       |-------------------------- rtr (remote transmission request bit)    |              |            |---------------------------------- CAN id    |              |----------------------------------------------- 64 bit system time    |-------------------------------------------------------------- meaning of this eventOf course you can write CAN messages into a simple text file and 'copy' thisfile to the CAN device:content of simple.txt:1234 0 11 22 33 44 55 66 77 880188 0 11 22(Very important is the linefeed, don't forget a linefeed at the last line!)Copying:cp simple.txt /dev/can0All messages in the text file will be sent over CAN bus.If you use scripting, it's better to turn off virtualization:echo 0 > /proc/canbus/0/virtualize                                                    ****************************************************************************Accessing CAN bus using read/write and /proc - filesystem:First open the CAN driver (for example /dev/can0). After that youcan read or write values into /proc - filesystem (see also above "Accessing CAN bus with scripts").Example: Write one messageFILE *canbus;canbus = fopen("/dev/can0","w");if(canbus){     fprintf(canbus,"1234 0 11 22 33 44 55 66 77 88\n");  // the \n is important !!     fclose(canbus);}Example: Read one messageFILE *canbus;canbus = fopen("/dev/can0","r");if(canbus){     char buffer[100];     fgets(buffer,sizeof(buffer),canbus);     printf(buffer);     fclose(canbus);}Example: Set baudrateFILE *canbus;canbus = fopen("/proc/canbus/0/baudrate","w");if(canbus){     fprintf(canbus,"500000");     fclose(canbus);}All other /proc/canbus parameters are described in "Accessing CAN bus with scripts".****************************************************************************Accessing CAN bus using ioctl: (recommended method)In C or C++ programs, the header file "canbus4linux.h" can be used.----------------------------------------------------------------------------Open and close a CAN device with read/write access:    int file;    file = open("/dev/can0",O_RDWR);    if(file == -1)    {        printf("can't open canbus4linux device\n");    }    else    {        // Because of following 2 lines, a signal is generated on every event         // (receiving, transmitting, errors, warnings,...)        fcntl(file,F_SETOWN,getpid());        fcntl(file,F_SETFL, FASYNC | fcntl(file,F_GETFL));    }Later close the CAN device:    if(file != -1)    {        close(file);    }----------------------------------------------------------------------------Determine CAN driver properties:    struct canbus_properties properties;    ioctl(file, CANBUS4LINUX_READ_PROPERTIES, &properties);    The properties are:    version           Version number of canbus4linux    device_name[]     A string with the channel name, this string can displayed for 	                  user information    min               Minimal supported baudrate    max               Maximal supported baudrate    commands[]        An array with supported commands of this CAN channel, all known commands	                  of canbus4linux are:	                     CANBUS_CMD_ENTER_STANDBY,	                     CANBUS_CMD_LEAVE_STANDBY,	                     CANBUS_CMD_ABORT_TRANSMISSION,	                     CANBUS_CMD_CLEAR_OVERRUN,	                     CANBUS_CMD_SELF_RECEPTION_REQUEST,	                     CANBUS_CMD_LISTEN_ON,	                     CANBUS_CMD_LISTEN_OFF,	                     CANBUS_CMD_VIRTUALIZE_ON,	                     CANBUS_CMD_VIRTUALIZE_OFF,    number_commands   Number of valid entries in "commands[]"    baudrates[]       (Optional) An array with supported baudrates of this CAN channel    number_baudrates  Number of valid entries in "baudrates[]"    chipset_flags     Bit field, which describes some features of the CAN channel:	                     CANBUS_CFS_CAN_2_0_A     channel support CAN 2.0 A (Basic CAN)	                     CANBUS_CFS_CAN_2_0_B     channel support CAN 2.0 B	                     CANBUS_CFS_EXT_FRAME     channel support extended frame format (only used if 	                                              supports CAN 2.0 B too)	                     CANBUS_CFS_POLLING       channel is not(!) interrupt driven, all	                                              data must get with polling method    number_registers  Number of supported registers    Note:    CANBUS_CFS_POLLING is not implemented yet    number_registers is not implemented yet----------------------------------------------------------------------------Init CAN channel:To init the CAN channel, this function is used:    ioctl(file, CANBUS4LINUX_INIT, 0);----------------------------------------------------------------------------Read/Write acceptance filter:Read acceptance filter    struct canbus_acceptance_filter filter;    ioctl(file, CANBUS4LINUX_READ_ACCEPTANCE_FILTER, &filter);Write acceptance filter:    struct canbus_acceptance_filter filter;    filter.code = .....;    filter.mask = .....;    ioctl(file, CANBUS4LINUX_WRITE_ACCEPTANCE_FILTER, &filter);----------------------------------------------------------------------------Read/Write baudrate:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
奇米色一区二区三区四区| 久久久久久久久久电影| 国产69精品久久久久777| 制服.丝袜.亚洲.另类.中文| 亚洲国产成人91porn| 欧美一区二区久久| 国产精品69毛片高清亚洲| 国产视频一区在线观看| 99v久久综合狠狠综合久久| 一区二区三区在线免费播放 | 欧美成人video| 黄页网站大全一区二区| 久久久蜜桃精品| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 亚洲男女一区二区三区| 在线观看国产91| 免费一级片91| 久久精品亚洲国产奇米99| 91蝌蚪porny九色| 人妖欧美一区二区| 中文字幕av一区二区三区| 在线免费亚洲电影| 欧美精品日韩一区| 国产成人av电影| 亚洲国产精品久久一线不卡| 精品国产髙清在线看国产毛片| 福利视频网站一区二区三区| 亚洲va韩国va欧美va精品 | av激情综合网| 日韩激情av在线| 综合久久久久久| 91精品国产一区二区三区香蕉| 国产高清成人在线| 亚洲风情在线资源站| 精品国产一区二区三区四区四 | 91福利国产精品| 国模少妇一区二区三区| 一区二区欧美在线观看| 久久亚洲一区二区三区四区| 在线一区二区视频| 国内外成人在线| 亚洲444eee在线观看| 国产精品美女久久久久久久久 | 91麻豆精品在线观看| 蜜臂av日日欢夜夜爽一区| 亚洲另类春色校园小说| 久久久蜜桃精品| 日韩视频一区二区三区| 91久久精品一区二区三区| 懂色av一区二区三区免费看| 免费在线一区观看| 亚洲福利一区二区三区| 国产精品白丝在线| 久久久久国产精品免费免费搜索| 欧美一区二区日韩一区二区| 欧洲国内综合视频| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 亚洲国产欧美在线| 亚洲色图在线视频| 国产精品网站一区| 国产日韩欧美激情| 久久久久久久网| 久久久噜噜噜久久中文字幕色伊伊| 欧美男生操女生| 欧美精选一区二区| 欧美日韩一区 二区 三区 久久精品| 91网站视频在线观看| av一区二区久久| 99精品视频中文字幕| 99免费精品视频| www.亚洲免费av| av午夜一区麻豆| 91在线免费视频观看| 99国产精品99久久久久久| 99在线视频精品| 99久久精品国产网站| 99vv1com这只有精品| 色哟哟一区二区三区| 91浏览器在线视频| 91国偷自产一区二区三区成为亚洲经典| 成人久久视频在线观看| hitomi一区二区三区精品| 91影视在线播放| 在线观看免费成人| 欧美日韩国产中文| 91精品免费观看| 欧美xxxxx裸体时装秀| 国产亚洲人成网站| 国产精品免费丝袜| 亚洲日本va午夜在线影院| 亚洲精品日日夜夜| 亚洲电影中文字幕在线观看| 日韩黄色片在线观看| 激情另类小说区图片区视频区| 国产成人免费在线观看不卡| 成人av午夜影院| 欧美亚洲禁片免费| 日韩一区和二区| 国产精品私房写真福利视频| 亚洲欧美激情在线| 日本伊人色综合网| 国产99精品在线观看| 在线看不卡av| 久久综合色播五月| 综合色中文字幕| 免费看日韩精品| av在线综合网| 欧美一区二区三区免费视频| 欧美激情一区二区三区在线| 亚洲乱码国产乱码精品精98午夜 | 国产高清在线精品| 在线看不卡av| 久久精品在这里| 亚洲精品福利视频网站| 日韩中文字幕不卡| 菠萝蜜视频在线观看一区| 欧美日韩精品三区| 久久久久免费观看| 亚洲福利视频导航| 国产成人av网站| 91麻豆精品国产91久久久久久久久| 国产亚洲视频系列| 日韩精品一区第一页| 国产凹凸在线观看一区二区| 欧美日韩在线播| 久久久亚洲高清| 日韩二区三区四区| 91在线无精精品入口| 精品成a人在线观看| 亚洲夂夂婷婷色拍ww47| 国产suv精品一区二区6| 69精品人人人人| 亚洲乱码中文字幕综合| 国产精品亚洲一区二区三区妖精| 欧美午夜电影网| 国产精品乱码久久久久久| 美女任你摸久久| 精品视频一区三区九区| 最近日韩中文字幕| 国产一本一道久久香蕉| 欧美一区二区三区视频在线| 亚洲欧洲性图库| 国产91精品一区二区麻豆网站 | 成人a免费在线看| 337p粉嫩大胆色噜噜噜噜亚洲| 亚洲gay无套男同| 一本久久精品一区二区| 日本一区二区三区高清不卡| 久久99精品国产麻豆婷婷洗澡| 欧美日韩午夜在线视频| 综合色中文字幕| 成人免费观看视频| 国产欧美日韩视频在线观看| 国产一区二区网址| 日韩欧美国产高清| 日韩国产精品久久| 欧美日韩国产一区| 亚洲午夜久久久久久久久电影网 | 欧美一区二区三区啪啪| 首页国产欧美久久| 777a∨成人精品桃花网| 亚洲成人先锋电影| 欧美日韩中文字幕一区| 亚洲国产欧美一区二区三区丁香婷| 97久久超碰国产精品| 国产精品卡一卡二| www.久久久久久久久| ...av二区三区久久精品| 99精品视频在线免费观看| 1区2区3区国产精品| 色综合天天做天天爱| 一区二区三国产精华液| 欧美日韩在线精品一区二区三区激情| 亚洲影院理伦片| 欧美精品乱人伦久久久久久| 日欧美一区二区| 欧美精品一区男女天堂| 国产麻豆91精品| 中文字幕国产一区二区| av电影一区二区| 亚洲黄色免费网站| 欧美乱妇15p| 狠狠色丁香久久婷婷综| 国产日本亚洲高清| 99re66热这里只有精品3直播 | 日韩一级片在线观看| 久久99久久久久| 国产精品午夜久久| 91国偷自产一区二区开放时间| 婷婷六月综合网| 久久久国产午夜精品| av不卡在线播放| 视频一区二区中文字幕| 精品1区2区在线观看| www.欧美亚洲| 日本女优在线视频一区二区| 久久精品夜色噜噜亚洲a∨ | 91超碰这里只有精品国产| 久热成人在线视频| 中文字幕在线观看不卡|