549 continue; |
549 continue; |
550 return voe; |
550 return voe; |
551 } |
551 } |
552 |
552 |
553 return NULL; |
553 return NULL; |
|
554 } |
|
555 |
|
556 /*****************************************************************************/ |
|
557 |
|
558 /** Expires any requests that have been started on a detached slave. |
|
559 */ |
|
560 void ec_slave_config_expire_disconnected_requests( |
|
561 ec_slave_config_t *sc /**< Slave configuration. */ |
|
562 ) |
|
563 { |
|
564 ec_sdo_request_t *sdo_req; |
|
565 ec_reg_request_t *reg_req; |
|
566 |
|
567 if (sc->slave) { return; } |
|
568 |
|
569 list_for_each_entry(sdo_req, &sc->sdo_requests, list) { |
|
570 if (sdo_req->state == EC_INT_REQUEST_QUEUED || |
|
571 sdo_req->state == EC_INT_REQUEST_BUSY) { |
|
572 EC_CONFIG_DBG(sc, 1, "Aborting SDO request; no slave attached.\n"); |
|
573 sdo_req->state = EC_INT_REQUEST_FAILURE; |
|
574 } |
|
575 } |
|
576 |
|
577 list_for_each_entry(reg_req, &sc->reg_requests, list) { |
|
578 if (reg_req->state == EC_INT_REQUEST_QUEUED || |
|
579 reg_req->state == EC_INT_REQUEST_BUSY) { |
|
580 EC_CONFIG_DBG(sc, 1, "Aborting register request; no slave attached.\n"); |
|
581 reg_req->state = EC_INT_REQUEST_FAILURE; |
|
582 } |
|
583 } |
554 } |
584 } |
555 |
585 |
556 /****************************************************************************** |
586 /****************************************************************************** |
557 * Application interface |
587 * Application interface |
558 *****************************************************************************/ |
588 *****************************************************************************/ |