#include #ifdef STA_OS2_STARTUP_ENABLE #include #include #include #include #include #ifndef STA_OS2_STARTUP_ENTRY_FUNCTION # define STA_OS2_STARTUP_ENTRY_FUNCTION startupTask #endif // !STA_OS2_STARTUP_ENTRY_FUNCTION namespace sta { // Provide weak implementation to allow overriding STA_WEAK void startupExtras(void *) {} } // namespace sta // Declare with C linkage extern "C" { void STA_OS2_STARTUP_ENTRY_FUNCTION(void * arg) { // Call further initialization code sta::startupExtras(arg); #ifdef STA_OS2_WATCHDOG_ENABLE // Start timers sta::startWatchdogTimer(); #endif // Wake tasks sta::signalStartupEvent(); // Terminate task osThreadExit(); } } #endif // STA_OS2_STARTUP_ENABLE