rt/msr_module.c
branchkernel2.6
changeset 33 f4171b8aadf8
parent 28 801dc7eabf51
child 36 6e9de6fbf74c
equal deleted inserted replaced
32:7d9809fbf7b9 33:f4171b8aadf8
   397 #endif
   397 #endif
   398 
   398 
   399     msr_jitter_init();
   399     msr_jitter_init();
   400   printk(KERN_INFO "=== Starting EtherCAT environment... ===\n");
   400   printk(KERN_INFO "=== Starting EtherCAT environment... ===\n");
   401 
   401 
   402   if ((ecat_master = EtherCAT_master(0)) == NULL)
   402   if ((ecat_master = EtherCAT_request(0)) == NULL)
   403   {
   403   {
   404     printk(KERN_ERR "No EtherCAT master available!\n");
   404     printk(KERN_ERR "EtherCAT master 0 not available!\n");
   405     msr_rtlib_cleanup();    
   405     msr_rtlib_cleanup();    
   406     return -1;
   406     return -1;
   407   }
   407   }
   408 
   408 
   409   printk("Checking EtherCAT slaves.\n");
   409   printk("Checking EtherCAT slaves.\n");
   467     if (ecat_master)
   467     if (ecat_master)
   468     {
   468     {
   469       EtherCAT_clear_process_data(ecat_master);
   469       EtherCAT_clear_process_data(ecat_master);
   470       printk(KERN_INFO "Deactivating slaves.\n");
   470       printk(KERN_INFO "Deactivating slaves.\n");
   471       EtherCAT_deactivate_all_slaves(ecat_master);
   471       EtherCAT_deactivate_all_slaves(ecat_master);
       
   472 
       
   473       EtherCAT_release(ecat_master);
   472     }
   474     }
   473 
   475 
   474     printk(KERN_INFO "=== EtherCAT environment stopped. ===\n");
   476     printk(KERN_INFO "=== EtherCAT environment stopped. ===\n");
   475 
   477 
   476 //    msr_controller_cleanup(); 
   478 //    msr_controller_cleanup();