master/fsm_slave_scan.h
changeset 1174 235f34ca50e2
parent 883 4963e22a267a
child 1209 8be462afb7f4
child 1685 399ef727bf62
equal deleted inserted replaced
1173:2ec9651a6c89 1174:235f34ca50e2
    47 #include "datagram.h"
    47 #include "datagram.h"
    48 #include "slave.h"
    48 #include "slave.h"
    49 #include "fsm_sii.h"
    49 #include "fsm_sii.h"
    50 #include "fsm_change.h"
    50 #include "fsm_change.h"
    51 #include "fsm_coe.h"
    51 #include "fsm_coe.h"
    52 #include "fsm_coe_map.h"
    52 #include "fsm_pdo.h"
    53 
    53 
    54 /*****************************************************************************/
    54 /*****************************************************************************/
    55 
    55 
    56 /** \see ec_fsm_slave_scan */
    56 /** \see ec_fsm_slave_scan */
    57 typedef struct ec_fsm_slave_scan ec_fsm_slave_scan_t;
    57 typedef struct ec_fsm_slave_scan ec_fsm_slave_scan_t;
    62 {
    62 {
    63     ec_slave_t *slave; /**< Slave the FSM runs on. */
    63     ec_slave_t *slave; /**< Slave the FSM runs on. */
    64     ec_datagram_t *datagram; /**< Datagram used in the state machine. */
    64     ec_datagram_t *datagram; /**< Datagram used in the state machine. */
    65     ec_fsm_slave_config_t *fsm_slave_config; /**< Slave configuration state
    65     ec_fsm_slave_config_t *fsm_slave_config; /**< Slave configuration state
    66                                                machine to use. */
    66                                                machine to use. */
    67     ec_fsm_coe_map_t *fsm_coe_map; /**< Pdo mapping state machine to use. */
    67     ec_fsm_pdo_t *fsm_pdo; /**< Pdo configuration state machine to use. */
    68     unsigned int retries; /**< Retries on datagram timeout. */
    68     unsigned int retries; /**< Retries on datagram timeout. */
    69 
    69 
    70     void (*state)(ec_fsm_slave_scan_t *); /**< State function. */
    70     void (*state)(ec_fsm_slave_scan_t *); /**< State function. */
    71     uint16_t sii_offset; /**< SII offset in words. */
    71     uint16_t sii_offset; /**< SII offset in words. */
    72 
    72 
    74 };
    74 };
    75 
    75 
    76 /*****************************************************************************/
    76 /*****************************************************************************/
    77 
    77 
    78 void ec_fsm_slave_scan_init(ec_fsm_slave_scan_t *, ec_datagram_t *,
    78 void ec_fsm_slave_scan_init(ec_fsm_slave_scan_t *, ec_datagram_t *,
    79         ec_fsm_slave_config_t *, ec_fsm_coe_map_t *);
    79         ec_fsm_slave_config_t *, ec_fsm_pdo_t *);
    80 void ec_fsm_slave_scan_clear(ec_fsm_slave_scan_t *);
    80 void ec_fsm_slave_scan_clear(ec_fsm_slave_scan_t *);
    81 
    81 
    82 void ec_fsm_slave_scan_start(ec_fsm_slave_scan_t *, ec_slave_t *);
    82 void ec_fsm_slave_scan_start(ec_fsm_slave_scan_t *, ec_slave_t *);
    83 
    83 
    84 int ec_fsm_slave_scan_exec(ec_fsm_slave_scan_t *);
    84 int ec_fsm_slave_scan_exec(ec_fsm_slave_scan_t *);