author | Florian Pose <fp@igh-essen.com> |
Fri, 04 Nov 2005 16:47:23 +0000 | |
changeset 5 | 6f2508af550c |
parent 2 | b0a7a4745bf9 |
child 13 | db0742533c10 |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************** |
2 |
* |
|
3 |
* e c _ c o m m a n d . c |
|
4 |
* |
|
5 |
* Methoden für ein EtherCAT-Kommando. |
|
6 |
* |
|
7 |
* $Date$ |
|
8 |
* $Author$ |
|
9 |
* |
|
10 |
***************************************************************/ |
|
11 |
||
12 |
#include <linux/slab.h> |
|
13 |
||
14 |
#include "ec_command.h" |
|
15 |
||
16 |
/***************************************************************/ |
|
17 |
||
18 |
/** |
|
19 |
Kommando-Konstruktor. |
|
20 |
||
21 |
Initialisiert alle Variablen innerhalb des Kommandos auf die |
|
22 |
Default-Werte. |
|
23 |
||
24 |
@param cmd Zeiger auf das zu initialisierende Kommando. |
|
25 |
*/ |
|
26 |
||
27 |
void EtherCAT_command_init(EtherCAT_command_t *cmd) |
|
28 |
{ |
|
29 |
cmd->type = ECAT_CMD_NONE; |
|
30 |
cmd->address.logical = 0x00000000; |
|
31 |
cmd->data_length = 0; |
|
32 |
cmd->next = NULL; |
|
33 |
cmd->state = ECAT_CS_READY; |
|
34 |
cmd->index = 0; |
|
35 |
cmd->working_counter = 0; |
|
36 |
} |
|
37 |
||
38 |
/***************************************************************/ |
|
39 |
||
40 |
/** |
|
41 |
Kommando-Destruktor. |
|
42 |
||
2
b0a7a4745bf9
?nderungen an no_rtai r110:110 in drivers gemergt.
Florian Pose <fp@igh-essen.com>
parents:
0
diff
changeset
|
43 |
Setzt alle Attribute auf den Anfangswert zurueck. |
0 | 44 |
|
45 |
@param cmd Zeiger auf das zu initialisierende Kommando. |
|
46 |
*/ |
|
47 |
||
48 |
void EtherCAT_command_clear(EtherCAT_command_t *cmd) |
|
49 |
{ |
|
2
b0a7a4745bf9
?nderungen an no_rtai r110:110 in drivers gemergt.
Florian Pose <fp@igh-essen.com>
parents:
0
diff
changeset
|
50 |
EtherCAT_command_init(cmd); |
0 | 51 |
} |
52 |
||
53 |
/***************************************************************/ |