source: trunk/Cosy/incl/mican.h@ 19982

Last change on this file since 19982 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
File size: 4.5 KB
Line 
1/*-----------------------------------------------------------------------------
2mican.h -- ICANOS Message Specifications
3
4Copyright (c) 1994 JANZ Computer AG
5All Rights Reserved
6
7Created 94/10/11 by Soenke Hansen
8Version 1.17 of 99/12/07
9
10Definitions of message specifiers for messages to/from ICANOS/2.
11
12-----------------------------------------------------------------------------*/
13
14#ifndef mican_DEFINED
15#define mican_DEFINED
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21/* Message specifiers */
22#define M_TIMER_START_req 0x20 /* start timer request */
23#define M_TIMER_STOP_req 0x21 /* stop timer request */
24#define M_TIMER_SET_req 0x22 /* set timer request */
25#define M_TIMER_SET_con 0x23 /* confirm setting of timer */
26#define M_TIMER_TO_ind 0x24 /* indicate timeout event */
27#define M_TIMER_CLEAR_req 0x25 /* clear timer request */
28#define M_BCAN_TX_req 0x30 /* transmit request */
29#define M_BCAN_TXC_req 0x31 /* transmit request with pos.conf. */
30#define M_BCAN_TXE_req 0x32 /* transmit request with echo */
31#define M_BCAN_TXCE_req 0x33 /* transmit request w.con(+), echo */
32#define M_BCAN_TXAT_req 0x34 /* abort transmission request */
33#define M_BCAN_TX_con 0x35 /* confirm (+/-) transmission */
34#define M_BCAN_RX_ind 0x36 /* receive indication */
35#define M_BCAN_EVENT_ind 0x37 /* BCAN event (error, overrun) */
36#define M_BCAN_SET_ACM_req 0x40 /* set acceptance code and mask */
37#define M_BCAN_SET_BTR_req 0x41 /* set bus timing parameters */
38#define M_BCAN_BUSOFF_req 0x42 /* switch to bus-off state */
39#define M_BCAN_BUSON_req 0x43 /* switch to bus-on state */
40#define M_BCAN_SETREG_req 0x44 /* set BCAN registers request */
41#define M_BCAN_GETREG_req 0x45 /* get BCAN registers request */
42#define M_BCAN_GETREG_con 0x46 /* get BCAN registers confirmation */
43#define M_BCAN_CONF_req 0x47 /* Special CANbus configurations */
44#define M_AFIL_OPEN_req 0x50 /* accept CAN-Id */
45#define M_AFIL_ROPEN_req 0x51 /* accept CAN-Id range */
46#define M_AFIL_CLOSE_req 0x52 /* reject CAN-Id */
47#define M_AFIL_RCLOSE_req 0x53 /* reject CAN-Id range */
48#define M_CYC_LIST_CREATE_req 0x60 /* request to create a list of cyclic CANbus messages */
49#define M_CYC_LIST_CREATE_con 0x61 /* confirmation of creation of cyclic-send-list */
50#define M_CYC_LIST_DELETE_req 0x62 /* request to delete a list of cyclic CANbus messages */
51#define M_CYC_LIST_DELETE_con 0x63 /* confirmation of deletion of cyclic-send-list */
52#define M_CYC_MSG_INSERT_req 0x64 /* request to insert a message in cyclic send list */
53#define M_CYC_MSG_INSERT_con 0x65 /* confirmation of insertion of a message into list */
54#define M_BCAN_BULK_ind 0x66 /* bulk buffer-message indication */
55#define M_BCAN_SNIFF_ind 0x68 /* sniff buffer-message indication */
56
57#define M_BCAN_BUSLOAD_ind 0x67 /* busload-statistic-indication */
58#define MS_BCAN_BUSLOAD_ALL 0x00 /* request/indicate ALL busload-statistics */
59
60#define M_SNIFFFIL_MASK_req 0x69 /* sniff buff. set-acceptance filter request */
61
62/* Check type of transmit request (with/without echo and/or pos. confirm.
63 Note the consistency with the definitions of M_BCAN_TX*_req! */
64#define TX_REQ_CONF 0x01 /* positive confirmation desired if set */
65#define TX_REQ_ECHO 0x02 /* echo desired if set */
66#define tx_req_conf(spec) ((unsigned)(spec) & TX_REQ_CONF)
67#define tx_req_echo(spec) ((unsigned)(spec) & TX_REQ_ECHO)
68
69/* Message subspecifiers for M_BCAN_TX_con messages */
70#define TX_OKAY 0x00 /* positive transmit confirmation */
71#define TX_NOBUF 0x01 /* controller transmit buffer full */
72#define TX_FAIL 0x02 /* negative transmit confirmation */
73
74/* Message subspecifiers for M_BCAN_EVENT_ind messages */
75#if defined Customer_1
76#define C1_EVT_ERROR 0x01 /* error interrupt occured */
77#else
78#define EVT_ERROR 0x01 /* error interrupt occured */
79#endif
80#define EVT_OVERRUN 0x02 /* overrun interrupt occured */
81#define EVT_LOST_INTERRUPTS 0x04 /* interrupts lost */
82#define EVT_QUEUE_FULL 0x08 /* send queue full */
83#define EVT_BERR 0x10 /* CANbus bus-error */
84
85/* Additional error types for M_BCAN_EVENT. */
86#define EVT_ERRT_NONE 0x00 /* no additional error infos */
87#define EVT_ERRT_82C200 0x01 /* 82C200 additional error infos */
88#define EVT_ERRT_SJA1000 0x02 /* SJA100 additional error infos */
89
90/* Additional command subspecs for M_BCAN_CONF_req */
91#define MS_BCAN_CONF_BERR 0x00 /* Configure bus-error detection */
92#define MS_BCAN_CONF_EWL 0x01 /* Configure error warning limit */
93#define MS_BCAN_CONF_LOM 0x02 /* Configure listen only mode */
94#define MS_BCAN_CONF_STM 0x03 /* Configure self test mode */
95
96
97#ifdef __cplusplus
98}
99#endif
100
101#endif /* !mican_DEFINED */
Note: See TracBrowser for help on using the repository browser.