author | Florian Pose <fp@igh-essen.com> |
Fri, 25 Nov 2005 16:43:46 +0000 | |
branch | kernel2.6 |
changeset 23 | 39364fbcd069 |
parent 19 | a51289e6cb2d |
child 39 | 6965c23a6826 |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************** |
2 |
* |
|
3 |
* e c _ g l o b a l s . h |
|
4 |
* |
|
5 |
* Globale Definitionen und Makros für das EtherCAT-Protokoll. |
|
6 |
* |
|
7 |
* $Date$ |
|
8 |
* $Author$ |
|
9 |
* |
|
10 |
***************************************************************/ |
|
11 |
||
12 |
#ifndef _EC_GLOBALS_ |
|
13 |
#define _EC_GLOBALS_ |
|
14 |
||
15 |
/** |
|
16 |
Maximale Größe eines EtherCAT-Frames |
|
17 |
*/ |
|
19
a51289e6cb2d
Warten beim Empfangen der Prozessdaten, Bugfix und kleinere Verbesserungen.
Florian Pose <fp@igh-essen.com>
parents:
0
diff
changeset
|
18 |
#define ECAT_FRAME_BUFFER_SIZE 1500 |
0 | 19 |
|
20 |
/** |
|
21 |
NULL-Define, falls noch nicht definiert. |
|
22 |
*/ |
|
23 |
||
24 |
#ifndef NULL |
|
25 |
#define NULL ((void *) 0) |
|
26 |
#endif |
|
27 |
||
28 |
/** |
|
29 |
EtherCAT-Kommando-Typ |
|
30 |
*/ |
|
31 |
||
32 |
typedef enum |
|
33 |
{ |
|
34 |
ECAT_CMD_NONE = 0x00, /**< Dummy */ |
|
35 |
ECAT_CMD_APRD = 0x01, /**< Auto-increment physical read */ |
|
36 |
ECAT_CMD_APWR = 0x02, /**< Auto-increment physical write */ |
|
37 |
ECAT_CMD_NPRD = 0x04, /**< Node-addressed physical read */ |
|
38 |
ECAT_CMD_NPWR = 0x05, /**< Node-addressed physical write */ |
|
39 |
ECAT_CMD_BRD = 0x07, /**< Broadcast read */ |
|
40 |
ECAT_CMD_BWR = 0x08, /**< Broadcast write */ |
|
41 |
ECAT_CMD_LRW = 0x0C /**< Logical read/write */ |
|
42 |
} |
|
43 |
EtherCAT_cmd_type_t; |
|
44 |
||
45 |
/** |
|
46 |
Zustand eines EtherCAT-Slaves |
|
47 |
*/ |
|
48 |
||
49 |
typedef enum |
|
50 |
{ |
|
51 |
ECAT_STATE_UNKNOWN = 0x00, /**< Status unbekannt */ |
|
52 |
ECAT_STATE_INIT = 0x01, /**< Init-Zustand (Keine Mailbox- |
|
53 |
Kommunikation, Kein I/O) */ |
|
54 |
ECAT_STATE_PREOP = 0x02, /**< Pre-Operational (Mailbox- |
|
55 |
Kommunikation, Kein I/O) */ |
|
56 |
ECAT_STATE_SAVEOP = 0x04, /**< Save-Operational (Mailbox- |
|
57 |
Kommunikation und Input Update) */ |
|
58 |
ECAT_STATE_OP = 0x08, /**< Operational, (Mailbox- |
|
59 |
Kommunikation und Input/Output Update) */ |
|
60 |
ECAT_ACK_STATE = 0x10 /**< Acknoledge-Bit beim Zustandswechsel |
|
61 |
(dies ist kein eigener Zustand) */ |
|
62 |
} |
|
63 |
EtherCAT_state_t; |
|
64 |
||
65 |
/***************************************************************/ |
|
66 |
||
67 |
#endif |