master/fsm_pdo_entry.h
changeset 1327 4d179b06dd3c
parent 1326 ef907b0b5125
child 1363 11c0b2caa253
equal deleted inserted replaced
1326:ef907b0b5125 1327:4d179b06dd3c
    23  *  the industrial property and similar rights of Beckhoff Automation GmbH.
    23  *  the industrial property and similar rights of Beckhoff Automation GmbH.
    24  *
    24  *
    25  *****************************************************************************/
    25  *****************************************************************************/
    26 
    26 
    27 /** \file
    27 /** \file
    28  * EtherCAT Pdo entry configuration state machine structures.
    28  * EtherCAT PDO entry configuration state machine structures.
    29  */
    29  */
    30 
    30 
    31 /*****************************************************************************/
    31 /*****************************************************************************/
    32 
    32 
    33 #ifndef __EC_FSM_PDO_ENTRY_H__
    33 #ifndef __EC_FSM_PDO_ENTRY_H__
    42 /**
    42 /**
    43  * \see ec_fsm_pdo_entry
    43  * \see ec_fsm_pdo_entry
    44  */
    44  */
    45 typedef struct ec_fsm_pdo_entry ec_fsm_pdo_entry_t;
    45 typedef struct ec_fsm_pdo_entry ec_fsm_pdo_entry_t;
    46 
    46 
    47 /** Pdo configuration state machine.
    47 /** PDO configuration state machine.
    48  */
    48  */
    49 struct ec_fsm_pdo_entry
    49 struct ec_fsm_pdo_entry
    50 {
    50 {
    51     void (*state)(ec_fsm_pdo_entry_t *); /**< state function */
    51     void (*state)(ec_fsm_pdo_entry_t *); /**< state function */
    52     ec_fsm_coe_t *fsm_coe; /**< CoE state machine to use */
    52     ec_fsm_coe_t *fsm_coe; /**< CoE state machine to use */
    53     ec_sdo_request_t request; /**< Sdo request. */
    53     ec_sdo_request_t request; /**< SDO request. */
    54 
    54 
    55     ec_slave_t *slave; /**< Slave the FSM runs on. */
    55     ec_slave_t *slave; /**< Slave the FSM runs on. */
    56     ec_pdo_t *target_pdo; /**< Pdo to read the mapping for. */
    56     ec_pdo_t *target_pdo; /**< PDO to read the mapping for. */
    57     const ec_pdo_t *source_pdo; /**< Pdo with desired mapping. */
    57     const ec_pdo_t *source_pdo; /**< PDO with desired mapping. */
    58     const ec_pdo_entry_t *entry; /**< Current entry. */
    58     const ec_pdo_entry_t *entry; /**< Current entry. */
    59     unsigned int entry_count; /**< Number of entries. */
    59     unsigned int entry_count; /**< Number of entries. */
    60     unsigned int entry_pos; /**< Position in Pdo mapping. */
    60     unsigned int entry_pos; /**< Position in PDO mapping. */
    61 };
    61 };
    62 
    62 
    63 /*****************************************************************************/
    63 /*****************************************************************************/
    64 
    64 
    65 void ec_fsm_pdo_entry_init(ec_fsm_pdo_entry_t *, ec_fsm_coe_t *);
    65 void ec_fsm_pdo_entry_init(ec_fsm_pdo_entry_t *, ec_fsm_coe_t *);