rt/msr_rt.c
changeset 188 c0e49f4a1c07
parent 181 3e9155836bc7
child 191 ca805255a935
equal deleted inserted replaced
187:01613bde2796 188:c0e49f4a1c07
    60 // Kanˇäle
    60 // Kanˇäle
    61 uint32_t k_ssi;
    61 uint32_t k_ssi;
    62 uint32_t k_ssi_st;
    62 uint32_t k_ssi_st;
    63 
    63 
    64 ec_field_init_t domain1_fields[] = {
    64 ec_field_init_t domain1_fields[] = {
    65     {&r_ssi,    "5", "Beckhoff", "EL5001", "InputValue", 0},
    65     {&r_ssi,    "0:3", "Beckhoff", "EL5001", "InputValue", 0},
    66     {&r_ssi_st, "5", "Beckhoff", "EL5001", "Status",     0},
    66     {&r_ssi_st, "0:3", "Beckhoff", "EL5001", "Status",     0},
    67     {}
    67     {}
    68 };
    68 };
    69 
    69 
    70 /*****************************************************************************/
    70 /*****************************************************************************/
    71 
    71 
   181 #else
   181 #else
   182     ecrt_master_print(master, 1);
   182     ecrt_master_print(master, 1);
   183 #endif
   183 #endif
   184 
   184 
   185 #if 1
   185 #if 1
   186     if (!(slave = ecrt_master_get_slave(master, "5"))) {
   186     if (!(slave = ecrt_master_get_slave(master, "0:3"))) {
   187         printk(KERN_ERR "Failed to get slave!\n");
   187         printk(KERN_ERR "Failed to get slave!\n");
   188         goto out_deactivate;
   188         goto out_deactivate;
   189     }
   189     }
   190 
   190 
   191     if (
   191     if (
   203         printk(KERN_ERR "Failed to configure SSI slave!\n");
   203         printk(KERN_ERR "Failed to configure SSI slave!\n");
   204         goto out_deactivate;
   204         goto out_deactivate;
   205     }
   205     }
   206 #endif
   206 #endif
   207 
   207 
       
   208 #if 0
       
   209     if (!(slave = ecrt_master_get_slave(master, "1:0"))) {
       
   210         printk(KERN_ERR "Failed to get slave!\n");
       
   211         goto out_deactivate;
       
   212     }
       
   213     if (ecrt_slave_write_alias(slave, 0x5678)) {
       
   214         printk(KERN_ERR "Failed to write alias!\n");
       
   215         goto out_deactivate;
       
   216     }
       
   217 #endif
       
   218 
   208 #ifdef ASYNC
   219 #ifdef ASYNC
   209     // Einmal senden und warten...
   220     // Einmal senden und warten...
   210     ecrt_master_prepare_async_io(master);
   221     ecrt_master_prepare_async_io(master);
   211 #endif
   222 #endif
   212 
   223