equal
deleted
inserted
replaced
|
1 //--------------------------------------------------------------- |
|
2 // |
|
3 // e c _ c o m m a n d . h |
|
4 // |
|
5 // $LastChangedDate$ |
|
6 // $Author$ |
|
7 // |
|
8 //--------------------------------------------------------------- |
|
9 |
|
10 typedef enum {Waiting, Sent, Received} EtherCAT_cmd_status_t; |
|
11 |
|
12 //--------------------------------------------------------------- |
|
13 |
|
14 typedef struct EtherCAT_command |
|
15 { |
|
16 unsigned char command_type; |
|
17 short ring_position; |
|
18 unsigned short node_address; |
|
19 unsigned short mem_address; |
|
20 unsigned int logical_address; |
|
21 unsigned int data_length; |
|
22 |
|
23 struct EtherCAT_command *next; |
|
24 |
|
25 EtherCAT_cmd_status_t status; |
|
26 unsigned char command_index; |
|
27 unsigned int working_counter; |
|
28 |
|
29 unsigned char *data; |
|
30 |
|
31 } |
|
32 EtherCAT_command_t; |
|
33 |
|
34 //--------------------------------------------------------------- |
|
35 |
|
36 void EtherCAT_command_init(EtherCAT_command_t *); |
|
37 void EtherCAT_command_clear(EtherCAT_command_t *); |
|
38 |
|
39 // Debug |
|
40 void EtherCAT_command_print_data(EtherCAT_command_t *); |
|
41 |
|
42 //--------------------------------------------------------------- |