master/slave.h
changeset 446 8fede404c01f
parent 423 862ff892cf18
child 448 e4b76dc7910c
equal deleted inserted replaced
445:3b7eec329112 446:8fede404c01f
   195     struct kobject kobj; /**< kobject */
   195     struct kobject kobj; /**< kobject */
   196     ec_master_t *master; /**< master owning the slave */
   196     ec_master_t *master; /**< master owning the slave */
   197 
   197 
   198     ec_slave_state_t requested_state; /**< requested slave state */
   198     ec_slave_state_t requested_state; /**< requested slave state */
   199     ec_slave_state_t current_state; /**< current slave state */
   199     ec_slave_state_t current_state; /**< current slave state */
   200     unsigned int configured; /**< the slave is configured by this master */
   200     unsigned int configured; /**< the slave was configured by this master */
   201     unsigned int error_flag; /**< stop processing after an error */
   201     unsigned int error_flag; /**< stop processing after an error */
   202     unsigned int online; /**< non-zero, if the slave responds. */
   202     unsigned int online; /**< non-zero, if the slave responds. */
   203     uint8_t registered; /**< true, if slave has been registered */
       
   204 
   203 
   205     // addresses
   204     // addresses
   206     uint16_t ring_position; /**< ring position */
   205     uint16_t ring_position; /**< ring position */
   207     uint16_t station_address; /**< configured station address */
   206     uint16_t station_address; /**< configured station address */
   208     uint16_t coupler_index; /**< index of the last bus coupler */
   207     uint16_t coupler_index; /**< index of the last bus coupler */
   259 /*****************************************************************************/
   258 /*****************************************************************************/
   260 
   259 
   261 // slave construction/destruction
   260 // slave construction/destruction
   262 int ec_slave_init(ec_slave_t *, ec_master_t *, uint16_t, uint16_t);
   261 int ec_slave_init(ec_slave_t *, ec_master_t *, uint16_t, uint16_t);
   263 
   262 
       
   263 void ec_slave_reset(ec_slave_t *);
       
   264 
   264 int ec_slave_prepare_fmmu(ec_slave_t *, const ec_domain_t *,
   265 int ec_slave_prepare_fmmu(ec_slave_t *, const ec_domain_t *,
   265                           const ec_sii_sync_t *);
   266                           const ec_sii_sync_t *);
       
   267 
       
   268 void ec_slave_request_state(ec_slave_t *, ec_slave_state_t);
   266 
   269 
   267 // SII categories
   270 // SII categories
   268 int ec_slave_fetch_strings(ec_slave_t *, const uint8_t *);
   271 int ec_slave_fetch_strings(ec_slave_t *, const uint8_t *);
   269 void ec_slave_fetch_general(ec_slave_t *, const uint8_t *);
   272 void ec_slave_fetch_general(ec_slave_t *, const uint8_t *);
   270 int ec_slave_fetch_sync(ec_slave_t *, const uint8_t *, size_t);
   273 int ec_slave_fetch_sync(ec_slave_t *, const uint8_t *, size_t);