equal
deleted
inserted
replaced
501 * slave. Note: This can be used whether the master or the ref slave will |
501 * slave. Note: This can be used whether the master or the ref slave will |
502 * be used as the systems master DC clock. |
502 * be used as the systems master DC clock. |
503 */ |
503 */ |
504 dc_start_time_ns = system_time_ns(); |
504 dc_start_time_ns = system_time_ns(); |
505 dc_time_ns = dc_start_time_ns; |
505 dc_time_ns = dc_start_time_ns; |
|
506 |
|
507 /* Attention: The initial application time is also used for phase |
|
508 * calculation for the SYNC0/1 interrupts. Please be sure to call it at |
|
509 * the correct phase to the realtime cycle. |
|
510 */ |
506 ecrt_master_application_time(master, dc_start_time_ns); |
511 ecrt_master_application_time(master, dc_start_time_ns); |
507 |
512 |
508 ret = ecrt_master_select_reference_clock(master, sc_ek1100); |
513 ret = ecrt_master_select_reference_clock(master, sc_ek1100); |
509 if (ret < 0) { |
514 if (ret < 0) { |
510 fprintf(stderr, "Failed to select reference clock: %s\n", |
515 fprintf(stderr, "Failed to select reference clock: %s\n", |