master/fsm_mapping.h
changeset 801 6b1e2b0ed8bc
parent 796 329daf6ad28c
equal deleted inserted replaced
800:e0b8cbc8a88d 801:6b1e2b0ed8bc
    52 
    52 
    53 /** Pdo mapping state machine.
    53 /** Pdo mapping state machine.
    54  */
    54  */
    55 struct ec_fsm_mapping
    55 struct ec_fsm_mapping
    56 {
    56 {
    57     void (*state)(ec_fsm_mapping_t *); /**< state function */
    57     void (*state)(ec_fsm_mapping_t *); /**< State function. */
    58     ec_fsm_coe_t *fsm_coe; /**< CoE state machine to use */
    58     ec_fsm_coe_t *fsm_coe; /**< CoE state machine to use. */
       
    59     ec_slave_t *slave; /**< Slave the FSM runs on. */
    59 
    60 
    60     ec_slave_t *slave; /**< slave the FSM runs on */
    61     const ec_sync_t *sync; /**< Current sync manager. */
       
    62     const ec_pdo_mapping_t *mapping; /**< Target Pdo mapping. */
       
    63     const ec_pdo_t *pdo; /**< Current Pdo. */
    61 
    64 
    62     ec_direction_t dir; /**< current PDO direction */
    65     ec_sdo_data_t sdodata; /**< SDO configuration data. */
    63     ec_sync_t *sync; /**< current sync manager */
    66     uint16_t sdo_value; /**< SDO value. */
    64     const ec_pdo_mapping_t *mapping; /**< Mapping to assign. */
    67     unsigned int pdo_count; /**< Number of mapped Pdos. */
    65     ec_pdo_t *pdo; /**< current PDO */
       
    66     ec_sdo_data_t sdodata; /**< SDO configuration data */
       
    67     uint16_t sdo_value; /**< SDO value */
       
    68     unsigned int pdo_count; /**< number of mapped PDOs */
       
    69 };
    68 };
    70 
    69 
    71 /*****************************************************************************/
    70 /*****************************************************************************/
    72 
    71 
    73 void ec_fsm_mapping_init(ec_fsm_mapping_t *, ec_fsm_coe_t *);
    72 void ec_fsm_mapping_init(ec_fsm_mapping_t *, ec_fsm_coe_t *);