diff --git a/ec_8h.html b/ec_8h.html
index dec4825..2d7ea58 100644
--- a/ec_8h.html
+++ b/ec_8h.html
@@ -244,9 +244,9 @@
int | ec_close (ec_t *pec) |
| Closes ethercat master. More...
|
|
-void | ec_configure_tun (ec_t *pec, osal_uint8_t ip_address[4]) |
- | Configures tun device of EtherCAT master, used for EoE slaves. More...
|
- |
+int | ec_configure_tun (ec_t *pec, osal_uint8_t ip_address[4]) |
+ | Configures tun device of EtherCAT master, used for EoE slaves. More...
|
+ |
void | ec_configure_dc (ec_t *pec, osal_uint64_t timer, ec_dc_mode_t mode, void(*user_cb)(void *arg, int num), void *user_cb_arg) |
| Configures distributed clocks settings on EtherCAT master. More...
|
|
diff --git a/ec_8h.js b/ec_8h.js
index 657c912..7d16d2a 100644
--- a/ec_8h.js
+++ b/ec_8h.js
@@ -33,7 +33,7 @@ var ec_8h =
[ "ec_close", "group__ec__group.html#ga6413bb07c5aab4165ce2c35e9cd049c4", null ],
[ "ec_configure_dc", "group__ec__group.html#gafcedee35e71c5dcfda0f14d25592a6ce", null ],
[ "ec_configure_pd_group", "group__ec__group.html#ga1e88c8d6db33a7ef0d20a91239afe275", null ],
- [ "ec_configure_tun", "group__ec__group.html#gaa205ce61912b65369da9e3b5529ed63b", null ],
+ [ "ec_configure_tun", "group__ec__group.html#ga017cc10573f61b5dc4113cc77ea787a7", null ],
[ "ec_create_pd_groups", "group__ec__group.html#gae6151b5238389629d06d11b89d61b7e3", null ],
[ "ec_destroy_pd_groups", "group__ec__group.html#ga509683e6a8bab096be23af7d086aad29", null ],
[ "ec_get_slave_count", "group__ec__group.html#gaf7a827d9da875d1481113f3291391142", null ],
diff --git a/ec_8h_source.html b/ec_8h_source.html
index e11a39c..cf250d4 100644
--- a/ec_8h_source.html
+++ b/ec_8h_source.html
@@ -236,115 +236,115 @@
-
-
-
-
- 300 void (*user_cb)(
void *arg,
int num),
void *user_cb_arg);
-
-
-
-
-
-
- 320 void (*user_cb)(
void *arg,
int num),
void *user_cb_arg);
-
-
-
-
-
-
- 342 osal_uint8_t *data, osal_size_t datalen, osal_uint16_t *wkc);
-
-
-
- 355 osal_uint8_t *data, osal_size_t datalen);
-
-
-
-
- 367 #define ec_group_will_be_sent(pec, group) (int)((((pec)->pd_groups[(group)].divisor_cnt+1) % (pec)->pd_groups[(group)].divisor) == 0)
- 368 #define ec_group_was_sent(pec, group) (int)((pec)->pd_groups[(group)].divisor_cnt == 0)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 405 #define ec_to_adr(ado, adp) \
- 406 ((osal_uint32_t)(adp) << 16u) | ((ado) & 0xFFFFu)
-
- 409 #define ec_brd(pec, ado, data, datalen, wkc) \
- 410 ec_transceive((pec), EC_CMD_BRD, ((osal_uint32_t)(ado) << 16u), \
- 411 (osal_uint8_t *)(data), (datalen), (wkc))
-
- 414 #define ec_bwr(pec, ado, data, datalen, wkc) \
- 415 ec_transceive((pec), EC_CMD_BWR, ((osal_uint32_t)(ado) << 16u), \
- 416 (osal_uint8_t *)(data), (datalen), (wkc))
-
- 419 #define ec_brw(pec, ado, data, datalen, wkc) \
- 420 ec_transceive((pec), EC_CMD_BRW, ((osal_uint32_t)(ado) << 16u), \
- 421 (osal_uint8_t *)(data), (datalen), (wkc))
-
- 424 #define ec_aprd(pec, adp, ado, data, datalen, wkc) \
- 425 ec_transceive((pec), EC_CMD_APRD, ((osal_uint32_t)(ado) << 16u) | \
- 426 (*(osal_uint16_t *)&(adp) & 0xFFFFu), (osal_uint8_t *)(data), (datalen), (wkc))
-
- 429 #define ec_apwr(pec, adp, ado, data, datalen, wkc) \
- 430 ec_transceive((pec), EC_CMD_APWR, ((osal_uint32_t)(ado) << 16u) | \
- 431 (*(osal_uint16_t *)&(adp) & 0xFFFFu), (osal_uint8_t *)(data), (datalen), (wkc))
-
- 434 #define ec_aprw(pec, adp, ado, data, datalen, wkc) \
- 435 ec_transceive((pec), EC_CMD_APRW, ((osal_uint32_t)(ado) << 16u) | \
- 436 (*(osal_uint16_t *)&(adp) & 0xFFFFu), (osal_uint8_t *)(data), (datalen), (wkc))
-
- 439 #define ec_fprd(pec, adp, ado, data, datalen, wkc) \
- 440 ec_transceive((pec), EC_CMD_FPRD, ((osal_uint32_t)(ado) << 16lu) | \
- 441 (osal_uint32_t)((adp) & 0xFFFFu), (osal_uint8_t *)(data), (datalen), (wkc))
-
- 444 #define ec_fpwr(pec, adp, ado, data, datalen, wkc) \
- 445 ec_transceive((pec), EC_CMD_FPWR, ((osal_uint32_t)(ado) << 16u) | \
- 446 ((adp) & 0xFFFFu), (osal_uint8_t *)(data), (datalen), (wkc))
-
- 449 #define ec_fprw(pec, adp, ado, data, datalen, wkc) \
- 450 ec_transceive((pec), EC_CMD_FPRW, ((osal_uint32_t)(ado) << 16u) | \
- 451 ((adp) & 0xFFFFu), (osal_uint8_t *)(data), (datalen), (wkc))
-
- 454 #define ec_frmw(pec, adp, ado, data, datalen, wkc) \
- 455 ec_transceive((pec), EC_CMD_FRMW, ((osal_uint32_t)(ado) << 16u) | \
- 456 ((adp) & 0xFFFFu), (osal_uint8_t *)(data), (datalen), (wkc))
-
- 459 #define check_ret(fcn, ...) { \
- 460 if (fcn(__VA_ARGS__) != EC_OK) { \
- 461 ec_log(1, __func__, "" #fcn "(" #__VA_ARGS__ ") failed!\n"); \
-
-
- 464 #define check_ec_bwr(...) check_ret(ec_bwr, __VA_ARGS__)
- 465 #define check_ec_brd(...) check_ret(ec_brd, __VA_ARGS__)
- 466 #define check_ec_brw(...) check_ret(ec_brw, __VA_ARGS__)
-
- 468 #define check_ec_apwr(...) check_ret(ec_apwr, __VA_ARGS__)
- 469 #define check_ec_aprd(...) check_ret(ec_aprd, __VA_ARGS__)
- 470 #define check_ec_aprw(...) check_ret(ec_aprw, __VA_ARGS__)
-
- 472 #define check_ec_fpwr(...) check_ret(ec_fpwr, __VA_ARGS__)
- 473 #define check_ec_fprd(...) check_ret(ec_fprd, __VA_ARGS__)
- 474 #define check_ec_fprw(...) check_ret(ec_fprw, __VA_ARGS__)
- 475 #define check_ec_frmw(...) check_ret(ec_frmw, __VA_ARGS__)
-
-
-
+
+
+
+
+ 301 void (*user_cb)(
void *arg,
int num),
void *user_cb_arg);
+
+
+
+
+
+
+ 321 void (*user_cb)(
void *arg,
int num),
void *user_cb_arg);
+
+
+
+
+
+
+ 343 osal_uint8_t *data, osal_size_t datalen, osal_uint16_t *wkc);
+
+
+
+ 356 osal_uint8_t *data, osal_size_t datalen);
+
+
+
+
+ 368 #define ec_group_will_be_sent(pec, group) (int)((((pec)->pd_groups[(group)].divisor_cnt+1) % (pec)->pd_groups[(group)].divisor) == 0)
+ 369 #define ec_group_was_sent(pec, group) (int)((pec)->pd_groups[(group)].divisor_cnt == 0)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 406 #define ec_to_adr(ado, adp) \
+ 407 ((osal_uint32_t)(adp) << 16u) | ((ado) & 0xFFFFu)
+
+ 410 #define ec_brd(pec, ado, data, datalen, wkc) \
+ 411 ec_transceive((pec), EC_CMD_BRD, ((osal_uint32_t)(ado) << 16u), \
+ 412 (osal_uint8_t *)(data), (datalen), (wkc))
+
+ 415 #define ec_bwr(pec, ado, data, datalen, wkc) \
+ 416 ec_transceive((pec), EC_CMD_BWR, ((osal_uint32_t)(ado) << 16u), \
+ 417 (osal_uint8_t *)(data), (datalen), (wkc))
+
+ 420 #define ec_brw(pec, ado, data, datalen, wkc) \
+ 421 ec_transceive((pec), EC_CMD_BRW, ((osal_uint32_t)(ado) << 16u), \
+ 422 (osal_uint8_t *)(data), (datalen), (wkc))
+
+ 425 #define ec_aprd(pec, adp, ado, data, datalen, wkc) \
+ 426 ec_transceive((pec), EC_CMD_APRD, ((osal_uint32_t)(ado) << 16u) | \
+ 427 (*(osal_uint16_t *)&(adp) & 0xFFFFu), (osal_uint8_t *)(data), (datalen), (wkc))
+
+ 430 #define ec_apwr(pec, adp, ado, data, datalen, wkc) \
+ 431 ec_transceive((pec), EC_CMD_APWR, ((osal_uint32_t)(ado) << 16u) | \
+ 432 (*(osal_uint16_t *)&(adp) & 0xFFFFu), (osal_uint8_t *)(data), (datalen), (wkc))
+
+ 435 #define ec_aprw(pec, adp, ado, data, datalen, wkc) \
+ 436 ec_transceive((pec), EC_CMD_APRW, ((osal_uint32_t)(ado) << 16u) | \
+ 437 (*(osal_uint16_t *)&(adp) & 0xFFFFu), (osal_uint8_t *)(data), (datalen), (wkc))
+
+ 440 #define ec_fprd(pec, adp, ado, data, datalen, wkc) \
+ 441 ec_transceive((pec), EC_CMD_FPRD, ((osal_uint32_t)(ado) << 16lu) | \
+ 442 (osal_uint32_t)((adp) & 0xFFFFu), (osal_uint8_t *)(data), (datalen), (wkc))
+
+ 445 #define ec_fpwr(pec, adp, ado, data, datalen, wkc) \
+ 446 ec_transceive((pec), EC_CMD_FPWR, ((osal_uint32_t)(ado) << 16u) | \
+ 447 ((adp) & 0xFFFFu), (osal_uint8_t *)(data), (datalen), (wkc))
+
+ 450 #define ec_fprw(pec, adp, ado, data, datalen, wkc) \
+ 451 ec_transceive((pec), EC_CMD_FPRW, ((osal_uint32_t)(ado) << 16u) | \
+ 452 ((adp) & 0xFFFFu), (osal_uint8_t *)(data), (datalen), (wkc))
+
+ 455 #define ec_frmw(pec, adp, ado, data, datalen, wkc) \
+ 456 ec_transceive((pec), EC_CMD_FRMW, ((osal_uint32_t)(ado) << 16u) | \
+ 457 ((adp) & 0xFFFFu), (osal_uint8_t *)(data), (datalen), (wkc))
+
+ 460 #define check_ret(fcn, ...) { \
+ 461 if (fcn(__VA_ARGS__) != EC_OK) { \
+ 462 ec_log(1, __func__, "" #fcn "(" #__VA_ARGS__ ") failed!\n"); \
+
+
+ 465 #define check_ec_bwr(...) check_ret(ec_bwr, __VA_ARGS__)
+ 466 #define check_ec_brd(...) check_ret(ec_brd, __VA_ARGS__)
+ 467 #define check_ec_brw(...) check_ret(ec_brw, __VA_ARGS__)
+
+ 469 #define check_ec_apwr(...) check_ret(ec_apwr, __VA_ARGS__)
+ 470 #define check_ec_aprd(...) check_ret(ec_aprd, __VA_ARGS__)
+ 471 #define check_ec_aprw(...) check_ret(ec_aprw, __VA_ARGS__)
+
+ 473 #define check_ec_fpwr(...) check_ret(ec_fpwr, __VA_ARGS__)
+ 474 #define check_ec_fprd(...) check_ret(ec_fprd, __VA_ARGS__)
+ 475 #define check_ec_fprw(...) check_ret(ec_fprw, __VA_ARGS__)
+ 476 #define check_ec_frmw(...) check_ret(ec_frmw, __VA_ARGS__)
+
+
+
ethercat master common stuff
#define LEC_MAX_PDLEN
Maximum process data length.
Definition: common.h:71
#define LEC_MAX_MBX_ENTRIES
Maximum number of mailbox entries.
Definition: common.h:79
@@ -354,6 +354,7 @@
ethercat distributed clocks support.
EtherCAT eeprom access fuctions.
+int ec_configure_tun(ec_t *pec, osal_uint8_t ip_address[4])
Configures tun device of EtherCAT master, used for EoE slaves.
int ec_send_process_data(ec_t *pec)
send process data with logical commands
void ec_configure_pd_group(ec_t *pec, osal_uint16_t group, int clock_divisor, void(*user_cb)(void *arg, int num), void *user_cb_arg)
Configure process data group settings.
struct ec ec_t
ethercat master structure
@@ -363,7 +364,6 @@
int ec_close(ec_t *pec)
Closes ethercat master.
int ec_send_distributed_clocks_sync(ec_t *pec)
Send distributed clocks sync datagram.
int ec_transceive(ec_t *pec, osal_uint8_t cmd, osal_uint32_t adr, osal_uint8_t *data, osal_size_t datalen, osal_uint16_t *wkc)
Syncronous ethercat read/write.
-void ec_configure_tun(ec_t *pec, osal_uint8_t ip_address[4])
Configures tun device of EtherCAT master, used for EoE slaves.
int ec_send_brd_ec_state(ec_t *pec)
Send broadcast read to ec state.
void ec_log(int lvl, const osal_char_t *pre, const osal_char_t *format,...)
EtherCAT logging function.
int ec_set_state(ec_t *pec, ec_state_t state)
Set state on ethercat bus.
diff --git a/globals_e.html b/globals_e.html
index f54f7fc..e73cbde 100644
--- a/globals_e.html
+++ b/globals_e.html
@@ -252,7 +252,7 @@ - e -
: ec.h
- ec_configure_tun()
-: ec.h
+: ec.h
- ec_create_pd_groups()
: ec.h
diff --git a/globals_func.html b/globals_func.html
index c5bc066..5c503d5 100644
--- a/globals_func.html
+++ b/globals_func.html
@@ -144,7 +144,7 @@
- e -
- ec_configure_tun()
-: ec.h
+: ec.h
- ec_create_pd_groups()
: ec.h
diff --git a/group__ec__group.html b/group__ec__group.html
index 2ef575d..daa58e1 100644
--- a/group__ec__group.html
+++ b/group__ec__group.html
@@ -228,9 +228,9 @@
int | ec_close (ec_t *pec) |
| Closes ethercat master. More...
|
|
-void | ec_configure_tun (ec_t *pec, osal_uint8_t ip_address[4]) |
- | Configures tun device of EtherCAT master, used for EoE slaves. More...
|
- |
+int | ec_configure_tun (ec_t *pec, osal_uint8_t ip_address[4]) |
+ | Configures tun device of EtherCAT master, used for EoE slaves. More...
|
+ |
void | ec_configure_dc (ec_t *pec, osal_uint64_t timer, ec_dc_mode_t mode, void(*user_cb)(void *arg, int num), void *user_cb_arg) |
| Configures distributed clocks settings on EtherCAT master. More...
|
|
@@ -1009,14 +1009,14 @@