include/ecrt.h
changeset 2054 3417bbc4ad2f
parent 2009 b5391b329b5d
child 2060 8b67602f5161
equal deleted inserted replaced
2053:cceb9aacf4a6 2054:3417bbc4ad2f
   453  */
   453  */
   454 void ecrt_release_master(
   454 void ecrt_release_master(
   455         ec_master_t *master /**< EtherCAT master */
   455         ec_master_t *master /**< EtherCAT master */
   456         );
   456         );
   457 
   457 
       
   458 
       
   459 #ifdef __KERNEL__
       
   460 /** Attach to a running master
       
   461  *   
       
   462  * This function returns the master handle for the RTDM-Interface
       
   463  *
       
   464  * \return Pointer to the opened master, otherwise \a NULL.
       
   465  */
       
   466 ec_master_t *ecrt_attach_master(
       
   467        unsigned int master_index /**< Index of the master to request. */
       
   468        );
       
   469 
       
   470 #endif // #ifdef __KERNEL__
       
   471 
       
   472 
       
   473 
       
   474 
   458 /******************************************************************************
   475 /******************************************************************************
   459  * Master methods
   476  * Master methods
   460  *****************************************************************************/
   477  *****************************************************************************/
   461 
   478 
   462 #ifndef __KERNEL__
   479 #ifndef __KERNEL__
   498         void (*receive_cb)(void *), /**< Receive callback. */
   515         void (*receive_cb)(void *), /**< Receive callback. */
   499         void *cb_data /**< Arbitraty pointer passed to the callback functions.
   516         void *cb_data /**< Arbitraty pointer passed to the callback functions.
   500                        */
   517                        */
   501         );
   518         );
   502 
   519 
       
   520 
       
   521 /** Returns domain structure pointer
       
   522  *
       
   523  * This functions return the domain structure pointer for usage inside the
       
   524  * RTDM-Interface.
       
   525  *
       
   526  * \return Pointer to the domain on success, else NULL.
       
   527  */
       
   528 ec_domain_t *ecrt_master_find_domain(
       
   529         ec_master_t *master, 
       
   530         unsigned int index);
       
   531 
       
   532 
   503 #endif /* __KERNEL__ */
   533 #endif /* __KERNEL__ */
       
   534 
       
   535 
       
   536 #ifndef __KERNEL__
       
   537 /** Return the domain index of a given domain strucure
       
   538  *
       
   539  * Return the domain index of a given domain strucure. Usage inside of the
       
   540  * RTDM Interface
       
   541  *
       
   542  * \return Index of the domain strucure
       
   543  *
       
   544  */
       
   545  unsigned int ecrt_domain_index(
       
   546          ec_domain_t *domain
       
   547          );
       
   548 
       
   549 #endif // #ifndef __KERNEL__
       
   550 
   504 
   551 
   505 /** Creates a new process data domain.
   552 /** Creates a new process data domain.
   506  *
   553  *
   507  * For process data exchange, at least one process data domain is needed.
   554  * For process data exchange, at least one process data domain is needed.
   508  * This method creates a new process data domain and returns a pointer to the
   555  * This method creates a new process data domain and returns a pointer to the
   512  * \return Pointer to the new domain on success, else NULL.
   559  * \return Pointer to the new domain on success, else NULL.
   513  */
   560  */
   514 ec_domain_t *ecrt_master_create_domain(
   561 ec_domain_t *ecrt_master_create_domain(
   515         ec_master_t *master /**< EtherCAT master. */
   562         ec_master_t *master /**< EtherCAT master. */
   516         );
   563         );
       
   564 
   517 
   565 
   518 /** Obtains a slave configuration.
   566 /** Obtains a slave configuration.
   519  *
   567  *
   520  * Creates a slave configuration object for the given \a alias and \a position
   568  * Creates a slave configuration object for the given \a alias and \a position
   521  * tuple and returns it. If a configuration with the same \a alias and \a
   569  * tuple and returns it. If a configuration with the same \a alias and \a