Files CCore/inc/dev/DevWaitForInterrupt.h CCore/src/dev/DevWaitForInterrupt.cpp CCore/src/dev/DevWaitForInterrupt.s
This part defines the function WaitForInterrupt(). XCore defines the empty variant of this function, but Target may override this definition. This function stops CPU until some interrupt is asserted. Usually it is implemented using assembler.
/* DevWaitForInterrupt.h */
#ifndef CCore_inc_dev_DevWaitForInterrupt_h
#define CCore_inc_dev_DevWaitForInterrupt_h
namespace CCore {
namespace Dev {
/* WaitForInterrupt() */
void WaitForInterrupt();
} // namespace Dev
} // namespace CCore
#endif
Here is an implementation for ARMv7:
@ DevWaitForInterrupt.s .text .align 2 .global _ZN5CCore3Dev16WaitForInterruptEv _ZN5CCore3Dev16WaitForInterruptEv: @ CCore::Dev::WaitForInterrupt wfi bx lr