diff --git a/include/ecdb.h b/include/ecdb.h index 1f52028ea9fdcd77ff46e29c7c15b78196634d68..d66dc16f329507d36106662fd7e7f4eab3e4e20d 100644 --- a/include/ecdb.h +++ b/include/ecdb.h @@ -43,12 +43,16 @@ /*****************************************************************************/ +/** \cond */ + #define Beckhoff_EL4132_Output1 0x00000002, 0x10243052, 0x6411, 1 #define Beckhoff_EL4132_Output2 0x00000002, 0x10243052, 0x6411, 2 #define Beckhoff_EL5001_Status 0x00000002, 0x13893052, 0x3101, 1 #define Beckhoff_EL5001_Value 0x00000002, 0x13893052, 0x3101, 2 +/** \endcond */ + /*****************************************************************************/ #endif diff --git a/master/domain.c b/master/domain.c index 7ba7bd5fb4557409e9630ae406f15219f26ab2a0..6600fadeac6b2e2e99037a5dd08ae9a7f52b8a07 100644 --- a/master/domain.c +++ b/master/domain.c @@ -159,7 +159,7 @@ void ec_domain_clear(struct kobject *kobj /**< kobject of the domain */) int ec_domain_reg_pdo_entry(ec_domain_t *domain, /**< EtherCAT domain */ ec_slave_t *slave, /**< slave */ - const ec_sii_pdo_t *pdo, + const ec_sii_pdo_t *pdo, /**< PDO */ const ec_sii_pdo_entry_t *entry, /**< PDO registration entry */ void **data_ptr /**< pointer to the process data diff --git a/master/fsm.c b/master/fsm.c index ee710e9a40889bba633058d833ec64c92ef4f99e..411243b9cf8fb3558e8a138336c11cf2d0d02443 100644 --- a/master/fsm.c +++ b/master/fsm.c @@ -164,6 +164,10 @@ void ec_fsm_execute(ec_fsm_t *fsm /**< finite state machine */) /*****************************************************************************/ +/** + Initializes the master startup state machine. +*/ + void ec_fsm_startup(ec_fsm_t *fsm) { fsm->master_state = ec_fsm_startup_start; @@ -171,7 +175,12 @@ void ec_fsm_startup(ec_fsm_t *fsm) /*****************************************************************************/ -int ec_fsm_startup_running(ec_fsm_t *fsm) +/** + Returns the running state of the master startup state machine. + \return non-zero if not terminated yet. +*/ + +int ec_fsm_startup_running(ec_fsm_t *fsm /**< Finite state machine */) { return fsm->master_state != ec_fsm_end && fsm->master_state != ec_fsm_error; @@ -179,13 +188,22 @@ int ec_fsm_startup_running(ec_fsm_t *fsm) /*****************************************************************************/ -int ec_fsm_startup_success(ec_fsm_t *fsm) +/** + Returns, if the master startup state machine terminated with success. + \return non-zero if successful. +*/ + +int ec_fsm_startup_success(ec_fsm_t *fsm /**< Finite state machine */) { return fsm->master_state == ec_fsm_end; } /*****************************************************************************/ +/** + Initializes the master configuration state machine. +*/ + void ec_fsm_configuration(ec_fsm_t *fsm) { fsm->master_state = ec_fsm_configuration_start; @@ -193,7 +211,12 @@ void ec_fsm_configuration(ec_fsm_t *fsm) /*****************************************************************************/ -int ec_fsm_configuration_running(ec_fsm_t *fsm) +/** + Returns the running state of the master configuration state machine. + \return non-zero if not terminated yet. +*/ + +int ec_fsm_configuration_running(ec_fsm_t *fsm /**< Finite state machine */) { return fsm->master_state != ec_fsm_end && fsm->master_state != ec_fsm_error; @@ -201,7 +224,12 @@ int ec_fsm_configuration_running(ec_fsm_t *fsm) /*****************************************************************************/ -int ec_fsm_configuration_success(ec_fsm_t *fsm) +/** + Returns, if the master confuguration state machine terminated with success. + \return non-zero if successful. +*/ + +int ec_fsm_configuration_success(ec_fsm_t *fsm /**< Finite state machine */) { return fsm->master_state == ec_fsm_end; } @@ -327,6 +355,10 @@ void ec_fsm_startup_scan(ec_fsm_t *fsm /**< finite state machine */) * master configuration state machine *****************************************************************************/ +/** + Master configuration state machine: START. +*/ + void ec_fsm_configuration_start(ec_fsm_t *fsm /**< finite state machine */) { ec_master_t *master = fsm->master; diff --git a/master/slave.c b/master/slave.c index cf77d67ce05796c7b86f319a1ddfd11d6a928afd..dc827ffa203e8492eb6f12d97fb0cb49604dc41d 100644 --- a/master/slave.c +++ b/master/slave.c @@ -916,7 +916,7 @@ uint16_t ec_slave_calc_sync_size(const ec_slave_t *slave, \return non-zero if slave is a bus coupler */ -int ec_slave_is_coupler(const ec_slave_t *slave) +int ec_slave_is_coupler(const ec_slave_t *slave /**< EtherCAT slave */) { // TODO: Better bus coupler criterion return slave->sii_vendor_id == 0x00000002 diff --git a/master/slave.h b/master/slave.h index 22e0abbf6d88d40d0a81caa38200de93b483df4c..49335b0f94be9ec62d9c960ed9328095cbdabeec 100644 --- a/master/slave.h +++ b/master/slave.h @@ -201,11 +201,11 @@ ec_sdo_entry_t; typedef struct { - struct list_head list; - uint16_t index; - uint8_t subindex; - uint8_t *data; - size_t size; + struct list_head list; /**< list item */ + uint16_t index; /**< SDO index */ + uint8_t subindex; /**< SDO subindex */ + uint8_t *data; /**< pointer to SDO data */ + size_t size; /**< size of SDO data */ } ec_sdo_data_t; @@ -333,9 +333,7 @@ int ec_slave_locate_string(ec_slave_t *, unsigned int, char **); uint16_t ec_slave_calc_sync_size(const ec_slave_t *, const ec_sii_sync_t *); -void ec_slave_print(const ec_slave_t *, unsigned int); int ec_slave_is_coupler(const ec_slave_t *); -//int ec_slave_check_crc(ec_slave_t *); /*****************************************************************************/