MCPcopy Create free account
hub / github.com/CANopenNode/CANopenNode / CO_LSSmaster_FsCheckWait

Function CO_LSSmaster_FsCheckWait

305/CO_LSSmaster.c:660–680  ·  view source on GitHub ↗

* Helper function - wait for confirmation */

Source from the content-addressed store, hash-verified

658 * Helper function - wait for confirmation
659 */
660static CO_LSSmaster_return_t
661CO_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

Callers 1

Calls 1

Tested by

no test coverage detected