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

Function CO_LSSmaster_FsSearchNext

305/CO_LSSmaster.c:826–839  ·  view source on GitHub ↗

* Helper function - check which 32 bit to scan for next, if any */

Source from the content-addressed store, hash-verified

824 * Helper function - check which 32 bit to scan for next, if any
825 */
826static uint8_t
827CO_LSSmaster_FsSearchNext(CO_LSSmaster_t* LSSmaster, const CO_LSSmaster_fastscan_t* fastscan) {
828 uint8_t i;
829
830 /* we search for the next LSS address part to scan for, beginning with the
831 * one after the current one. If there is none remaining, scanning is finished */
832 for (i = LSSmaster->fsLssSub + 1U; i <= CO_LSS_FASTSCAN_SERIAL; i++) {
833 if (fastscan->scan[i] != CO_LSSmaster_FS_SKIP) {
834 return i;
835 }
836 }
837 /* node selection is triggered by switching node state machine back to initial state */
838 return CO_LSS_FASTSCAN_VENDOR_ID;
839}
840
841CO_LSSmaster_return_t
842CO_LSSmaster_IdentifyFastscan(CO_LSSmaster_t* LSSmaster, uint32_t timeDifference_us,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected