equal
deleted
inserted
replaced
29 * standard) as the (only) precondition to have the right to use EtherCAT |
29 * standard) as the (only) precondition to have the right to use EtherCAT |
30 * Technology, IP and trade marks. |
30 * Technology, IP and trade marks. |
31 * |
31 * |
32 *****************************************************************************/ |
32 *****************************************************************************/ |
33 |
33 |
34 /** |
34 /** \file |
35 \file |
35 * Canopen-over-EtherCAT Sdo request functions. |
36 Canopen-over-EtherCAT Sdo request functions. |
36 */ |
37 */ |
|
38 |
37 |
39 /*****************************************************************************/ |
38 /*****************************************************************************/ |
40 |
39 |
41 #include <linux/module.h> |
40 #include <linux/module.h> |
42 |
41 |
48 |
47 |
49 /*****************************************************************************/ |
48 /*****************************************************************************/ |
50 |
49 |
51 /** State type translation table. |
50 /** State type translation table. |
52 */ |
51 */ |
53 const ec_sdo_request_state_t state_table[] = { |
52 static const ec_sdo_request_state_t state_translation_table[] = { |
54 EC_SDO_REQUEST_UNUSED, // EC_REQUEST_INIT, |
53 EC_SDO_REQUEST_UNUSED, // EC_REQUEST_INIT, |
55 EC_SDO_REQUEST_BUSY, // EC_REQUEST_QUEUED, |
54 EC_SDO_REQUEST_BUSY, // EC_REQUEST_QUEUED, |
56 EC_SDO_REQUEST_BUSY, // EC_REQUEST_BUSY, |
55 EC_SDO_REQUEST_BUSY, // EC_REQUEST_BUSY, |
57 EC_SDO_REQUEST_SUCCESS, // EC_REQUEST_SUCCESS, |
56 EC_SDO_REQUEST_SUCCESS, // EC_REQUEST_SUCCESS, |
58 EC_SDO_REQUEST_ERROR // EC_REQUEST_FAILURE |
57 EC_SDO_REQUEST_ERROR // EC_REQUEST_FAILURE |
178 |
177 |
179 /*****************************************************************************/ |
178 /*****************************************************************************/ |
180 |
179 |
181 ec_sdo_request_state_t ecrt_sdo_request_state(const ec_sdo_request_t *req) |
180 ec_sdo_request_state_t ecrt_sdo_request_state(const ec_sdo_request_t *req) |
182 { |
181 { |
183 return state_table[req->state]; |
182 return state_translation_table[req->state]; |
184 } |
183 } |
185 |
184 |
186 /*****************************************************************************/ |
185 /*****************************************************************************/ |
187 |
186 |
188 void ecrt_sdo_request_read(ec_sdo_request_t *req) |
187 void ecrt_sdo_request_read(ec_sdo_request_t *req) |