# HG changeset patch # User Florian Pose # Date 1311582766 -7200 # Node ID 45e9b47d0841eb5f48491f26c00b8f80dbf4fb57 # Parent adbf7900b8484bedc58ddb1da566ba12dad5b0ca# Parent 1b4d140ecae55aa3f64aeaa02d085f846653a8c6 merge. diff -r 1b4d140ecae5 -r 45e9b47d0841 examples/mini/mini.c --- a/examples/mini/mini.c Thu Jul 21 19:00:34 2011 +0200 +++ b/examples/mini/mini.c Mon Jul 25 10:32:46 2011 +0200 @@ -359,7 +359,6 @@ void request_lock_callback(void *cb_data) { - ec_master_t *m = (ec_master_t *) cb_data; down(&master_sem); } @@ -367,7 +366,6 @@ void release_lock_callback(void *cb_data) { - ec_master_t *m = (ec_master_t *) cb_data; up(&master_sem); } diff -r 1b4d140ecae5 -r 45e9b47d0841 include/ecrt.h --- a/include/ecrt.h Thu Jul 21 19:00:34 2011 +0200 +++ b/include/ecrt.h Mon Jul 25 10:32:46 2011 +0200 @@ -487,8 +487,8 @@ ec_master_t *master /**< EtherCAT master */ ); - #ifdef __KERNEL__ + /** Attach to a running master * * This function returns the master handle for the RTDM-Interface @@ -501,9 +501,6 @@ #endif // #ifdef __KERNEL__ - - - /****************************************************************************** * Master methods *****************************************************************************/ @@ -555,8 +552,8 @@ #endif /* __KERNEL__ */ - #ifndef __KERNEL__ + /** Return the domain index of a given domain strucure * * Return the domain index of a given domain strucure. Usage inside of the @@ -571,7 +568,6 @@ #endif // #ifndef __KERNEL__ - /** Creates a new process data domain. * * For process data exchange, at least one process data domain is needed. @@ -585,7 +581,6 @@ ec_master_t *master /**< EtherCAT master. */ ); - /** Obtains a slave configuration. * * Creates a slave configuration object for the given \a alias and \a position @@ -820,7 +815,6 @@ ec_master_t *master /**< EtherCAT master. */ ); - /** Set interval between calls to ecrt_master_send * */ diff -r 1b4d140ecae5 -r 45e9b47d0841 master/module.c --- a/master/module.c Thu Jul 21 19:00:34 2011 +0200 +++ b/master/module.c Mon Jul 25 10:32:46 2011 +0200 @@ -611,10 +611,10 @@ return ECRT_VERSION_MAGIC; } - +/*****************************************************************************/ /** Return pointer to running master -/*****************************************************************************/ + */ ec_master_t *ecrt_attach_master(unsigned int master_index) { ec_master_t *master = NULL; @@ -627,21 +627,16 @@ } master = &masters[master_index]; - if (master->reserved) - { + if (master->reserved) { // ok master is attached EC_INFO("attaching Master %u!\n", master_index); - } - else - { + } else { EC_ERR("No Master %u in use!\n", master_index); master = NULL; } return master; } - - /*****************************************************************************/ /** Global request state type translation table.