source: pacpussensors/trunk/CanGateway/driver/kvaser/linux/hwnames.h@ 97

Last change on this file since 97 was 97, checked in by DHERBOMEZ Gérald, 9 years ago

add include files for kvaser

File size: 6.5 KB
Line 
1/*
2** Copyright 2012 by Kvaser AB, Mölndal, Sweden
3** http://www.kvaser.com
4**
5** This software is dual licensed under the following two licenses:
6** BSD-new and GPLv2. You may use either one. See the included
7** COPYING file for details.
8**
9** License: BSD-new
10** ===============================================================================
11** Redistribution and use in source and binary forms, with or without
12** modification, are permitted provided that the following conditions are met:
13** * Redistributions of source code must retain the above copyright
14** notice, this list of conditions and the following disclaimer.
15** * Redistributions in binary form must reproduce the above copyright
16** notice, this list of conditions and the following disclaimer in the
17** documentation and/or other materials provided with the distribution.
18** * Neither the name of the <organization> nor the
19** names of its contributors may be used to endorse or promote products
20** derived from this software without specific prior written permission.
21**
22** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
23** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25** DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
26** DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32**
33**
34** License: GPLv2
35** ===============================================================================
36** This program is free software; you can redistribute it and/or
37** modify it under the terms of the GNU General Public License
38** as published by the Free Software Foundation; either version 2
39** of the License, or (at your option) any later version.
40**
41** This program is distributed in the hope that it will be useful,
42** but WITHOUT ANY WARRANTY; without even the implied warranty of
43** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44** GNU General Public License for more details.
45**
46** You should have received a copy of the GNU General Public License
47** along with this program; if not, write to the Free Software
48** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
49**
50** ---------------------------------------------------------------------------
51**/
52
53/* hwnames.h - defines for names and numbers for the different types of hardware */
54#ifndef _HWNAMES_H_
55#define _HWNAMES_H_
56
57
58#ifdef HWTYPE_NONE
59# error HWTYPE_NONE is already defined.
60#endif
61
62#define HWTYPE_NONE 0
63#define HWTYPE_VIRTUAL 1
64#define HWTYPE_CANCARDX 2
65#define HWTYPE_CANPARI 3
66#define HWTYPE_CANDONGLE 4
67#define HWTYPE_CANAC2 5
68#define HWTYPE_CANAC2PCI 6
69#define HWTYPE_CANCARD 7
70#define HWTYPE_PCCAN 8
71#define HWTYPE_HERMES 9 // also the deceased ISAcan
72#define HWTYPE_PCICAN HWTYPE_HERMES
73#define HWTYPE_NEWPCMCIA 10 // Mars
74#define HWTYPE_DAPHNE 11 // also HWTYPE_NEWUSB
75#define HWTYPE_CANCARDY 12 // the one-channel CANcardX
76/* 13-39 are reserved to Vector, just to be sure */
77/* Vector will use all odd numbers and Kvaser all even numbers, as per a
78 semi-official agreement */
79// Vector CANcardXL 15 // Information only
80// Vector CANcaseXL 21 // Information only
81#define HWTYPE_HELIOS 40 // Helios / PCIcan II
82#define HWTYPE_PCICAN_2 HWTYPE_HELIOS
83// Reserved to Vector 41
84#define HWTYPE_DEMETER 42 // USBcan II, Memorator et al
85#define HWTYPE_SIMULATION 44 // kcanc for Creator
86#define HWTYPE_AURORA 46
87#define HWTYPE_FILO 48 // Leaf
88#define HWTYPE_PC104_PLUS 50
89#define HWTYPE_PCICANX_2 52
90#define HWTYPE_MEMORATOR_II 54
91#define HWTYPE_MEMORATOR_PRO HWTYPE_MEMORATOR_II
92#define HWTYPE_USBCAN_PRO 56
93#define HWTYPE_BLACKBIRD 58
94#define HWTYPE_IRIS HWTYPE_BLACKBIRD
95#define HWTYPE_MEMORATOR_LIGHT 60 // Memorator Light
96#define HWTYPE_MINIHYDRA 62
97#define HWTYPE_EAGLE 62
98#define HWTYPE_BAGEL 64
99#define HWTYPE_MINIPCIE 66
100#define HWTYPE_USBCAN_KLINE 68
101#define HWTYPE_ETHERCAN 70
102#define HWTYPE_USBCAN_LIGHT 72
103
104
105
106/* Transceiver types */
107#ifdef VCAN_TRANSCEIVER_TYPE_NONE
108# error VCAN_TRANSCEIVER_TYPE_NONE is already defined.
109#endif
110#define VCAN_TRANSCEIVER_TYPE_NONE 0
111#define VCAN_TRANSCEIVER_TYPE_251 1
112#define VCAN_TRANSCEIVER_TYPE_252 2
113#define VCAN_TRANSCEIVER_TYPE_DNOPTO 3
114#define VCAN_TRANSCEIVER_TYPE_W210 4
115#define VCAN_TRANSCEIVER_TYPE_SWC_PROTO 5 // Prototype. Driver may latch-up.
116#define VCAN_TRANSCEIVER_TYPE_SWC 6
117#define VCAN_TRANSCEIVER_TYPE_FIBER 8
118#define VCAN_TRANSCEIVER_TYPE_K 10 // K-line, without CAN
119#define VCAN_TRANSCEIVER_TYPE_1054_OPTO 11 // 1054 with optical isolation
120#define VCAN_TRANSCEIVER_TYPE_SWC_OPTO 12 // SWC with optical isolation
121#define VCAN_TRANSCEIVER_TYPE_B10011S 13 // B10011S truck-and-trailer
122#define VCAN_TRANSCEIVER_TYPE_1050 14 // 1050
123#define VCAN_TRANSCEIVER_TYPE_1050_OPTO 15 // 1050 with optical isolation
124#define VCAN_TRANSCEIVER_TYPE_1041 16 // 1041
125#define VCAN_TRANSCEIVER_TYPE_1041_OPTO 17 // 1041 with optical isolation
126#define VCAN_TRANSCEIVER_TYPE_RS485 18 // J1708
127#define VCAN_TRANSCEIVER_TYPE_LIN 19 // LIN
128#define VCAN_TRANSCEIVER_TYPE_GAL 20 // Galathea piggyback
129
130// Agreement: Vector to use all odd numbers, Kvaser all even numbers
131
132#define MAX_TRANSCEIVER_TYPE 20
133
134/* old style transciver type names */
135#define TRANSCEIVER_TYPE_NONE VCAN_TRANSCEIVER_TYPE_NONE
136#define TRANSCEIVER_TYPE_251 VCAN_TRANSCEIVER_TYPE_251
137#define TRANSCEIVER_TYPE_252 VCAN_TRANSCEIVER_TYPE_252
138#define TRANSCEIVER_TYPE_DNOPTO VCAN_TRANSCEIVER_TYPE_DNOPTO
139#define TRANSCEIVER_TYPE_W210 VCAN_TRANSCEIVER_TYPE_W210
140#define TRANSCEIVER_TYPE_SWC_PROTO VCAN_TRANSCEIVER_TYPE_SWC_PROTO
141#define TRANSCEIVER_TYPE_SWC VCAN_TRANSCEIVER_TYPE_SWC
142
143
144#endif
Note: See TracBrowser for help on using the repository browser.