master/fsm_pdo.h
branchstable-1.4
changeset 1686 e206f4485f60
parent 1685 399ef727bf62
equal deleted inserted replaced
1685:399ef727bf62 1686:e206f4485f60
    24  *
    24  *
    25  *****************************************************************************/
    25  *****************************************************************************/
    26 
    26 
    27 /**
    27 /**
    28    \file
    28    \file
    29    EtherCAT Pdo configuration state machine structures.
    29    EtherCAT PDO configuration state machine structures.
    30 */
    30 */
    31 
    31 
    32 /*****************************************************************************/
    32 /*****************************************************************************/
    33 
    33 
    34 #ifndef __EC_FSM_PDO_H__
    34 #ifndef __EC_FSM_PDO_H__
    46 /**
    46 /**
    47  * \see ec_fsm_pdo
    47  * \see ec_fsm_pdo
    48  */
    48  */
    49 typedef struct ec_fsm_pdo ec_fsm_pdo_t;
    49 typedef struct ec_fsm_pdo ec_fsm_pdo_t;
    50 
    50 
    51 /** Pdo configuration state machine.
    51 /** PDO configuration state machine.
    52  */
    52  */
    53 struct ec_fsm_pdo
    53 struct ec_fsm_pdo
    54 {
    54 {
    55     void (*state)(ec_fsm_pdo_t *); /**< State function. */
    55     void (*state)(ec_fsm_pdo_t *); /**< State function. */
    56     ec_fsm_coe_t *fsm_coe; /**< CoE state machine to use. */
    56     ec_fsm_coe_t *fsm_coe; /**< CoE state machine to use. */
    57     ec_fsm_pdo_entry_t fsm_pdo_entry; /**< Pdo entry state machine. */
    57     ec_fsm_pdo_entry_t fsm_pdo_entry; /**< PDO entry state machine. */
    58     ec_pdo_list_t pdos; /**< Pdo configuration. */
    58     ec_pdo_list_t pdos; /**< PDO configuration. */
    59     ec_sdo_request_t request; /**< Sdo request. */
    59     ec_sdo_request_t request; /**< SDO request. */
    60     ec_pdo_t slave_pdo; /**< Pdo actually appearing in a slave. */
    60     ec_pdo_t slave_pdo; /**< PDO actually appearing in a slave. */
    61 
    61 
    62     ec_slave_t *slave; /**< Slave the FSM runs on. */
    62     ec_slave_t *slave; /**< Slave the FSM runs on. */
    63     uint8_t sync_index; /**< Current sync manager index. */
    63     uint8_t sync_index; /**< Current sync manager index. */
    64     ec_sync_t *sync; /**< Current sync manager. */
    64     ec_sync_t *sync; /**< Current sync manager. */
    65     ec_pdo_t *pdo; /**< Current Pdo. */
    65     ec_pdo_t *pdo; /**< Current PDO. */
    66     unsigned int pdo_pos; /**< Assignment position of current Pdos. */
    66     unsigned int pdo_pos; /**< Assignment position of current PDOs. */
    67     unsigned int pdo_count; /**< Number of assigned Pdos. */
    67     unsigned int pdo_count; /**< Number of assigned PDOs. */
    68 };
    68 };
    69 
    69 
    70 /*****************************************************************************/
    70 /*****************************************************************************/
    71 
    71 
    72 void ec_fsm_pdo_init(ec_fsm_pdo_t *, ec_fsm_coe_t *);
    72 void ec_fsm_pdo_init(ec_fsm_pdo_t *, ec_fsm_coe_t *);