* Helper function - wait for confirmation */
| 658 | * Helper function - wait for confirmation |
| 659 | */ |
| 660 | static CO_LSSmaster_return_t |
| 661 | CO_LSSmaster_FsCheckWait(CO_LSSmaster_t* LSSmaster, uint32_t timeDifference_us) { |
| 662 | CO_LSSmaster_return_t ret; |
| 663 | |
| 664 | ret = CO_LSSmaster_check_timeout(LSSmaster, timeDifference_us); |
| 665 | if (ret == CO_LSSmaster_TIMEOUT) { |
| 666 | ret = CO_LSSmaster_SCAN_NOACK; |
| 667 | |
| 668 | if (CO_FLAG_READ(LSSmaster->CANrxNew)) { |
| 669 | uint8_t cs = LSSmaster->CANrxData[0]; |
| 670 | CO_FLAG_CLEAR(LSSmaster->CANrxNew); |
| 671 | |
| 672 | if (cs == CO_LSS_IDENT_SLAVE) { |
| 673 | /* At least one node is waiting for fastscan */ |
| 674 | ret = CO_LSSmaster_SCAN_FINISHED; |
| 675 | } |
| 676 | } |
| 677 | } |
| 678 | |
| 679 | return ret; |
| 680 | } |
| 681 | |
| 682 | /* |
| 683 | * Helper function - initiate scan for 32 bit part of LSS address |
no test coverage detected