Completed ec_master_state_t and documented ec_master_state_t and

ec_slave_config_state_t.
This commit is contained in:
Florian Pose 2008-06-18 09:26:46 +00:00
parent d7790d1d18
commit 9927bb1d15
1 changed files with 23 additions and 2 deletions

View File

@ -152,21 +152,42 @@ typedef struct ec_sdo_request ec_sdo_request_t; /**< \see ec_sdo_request. */
/** Master state.
*
* This is used for the output parameter of ecrt_master_state().
*
* \see ecrt_master_state().
*/
typedef struct {
unsigned int slaves_responding; /**< Number of slaves in the bus. */
uint8_t slave_states; /**< Application-layer states of all slaves.
The states are coded in the lower 4 bits. If a bit
is set, it means that at least one slave in the
bus is in the corresponding state:
- Bit 0: \a INIT
- Bit 1: \a PREOP
- Bit 2: \a SAFEOP
- Bit 3: \a OP */
uint8_t link_up; /**< \a true, if the network link is up. */
} ec_master_state_t;
/*****************************************************************************/
/** Slave configuration state.
*
* This is used as an output parameter of ecrt_slave_config_state().
*
* \see ecrt_slave_config_state().
*/
typedef struct {
uint8_t slave_state; /**< The application-layer state of the slave.
- 1: \a INIT
- 2: \a PREOP
- 4: \a SAFEOP
- 8: \a OP
Note that each state is coded in a different
bit! */
unsigned int online : 1; /**< The slave is online. */
unsigned int configured : 1; /**< The slave was configured according to
the specified configuration. */
unsigned int operational : 1; /**< The slave was brought into \a OP state
using the specified configuration. */
} ec_slave_config_state_t;
/*****************************************************************************/