examples/rtai_rtdm_dc/main.c
branchstable-1.5
changeset 2523 c5c81a52fc30
parent 2447 e93efb4af231
equal deleted inserted replaced
2522:ec403cf308eb 2523:c5c81a52fc30
   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",