//............................................................................ extern "C" void Q_onAssert(char const *module, int loc) { // // NOTE: add here your application-specific error handling // (void)module; (void)loc; QS_ASSERTION(module, loc, static_cast<uint32_t>(10000U)); NVIC_SystemReset(); }
/*..........................................................................*/ void Q_onAssert(char const *module, int loc) { /* * NOTE: add here your application-specific error handling */ (void)module; (void)loc; QS_ASSERTION(module, loc, (uint32_t)10000U); /* report assertion to QS */ NVIC_SystemReset(); }
//............................................................................ void Q_onAssert(char_t const * const file, int line) { QMessageBox::critical(0, "PROBLEM", QString("<p>Assertion failed in module <b>%1</b>," "line <b>%2</b></p>") .arg(file) .arg(line)); QS_ASSERTION(file, line); // send the assertion info to the QS trace qFatal("Assertion failed in module %s, line %d", file, line); }
/*..........................................................................*/ void Q_onAssert(char const * const module, int_t loc) { char message[80]; QF_stop(); /* stop ticking */ QS_ASSERTION(module, loc, (uint32_t)10000U); /* report assertion to QS */ SNPRINTF_S(message, Q_DIM(message) - 1, "Assertion failed in module %s location %d", module, loc); MessageBox(l_hWnd, message, "!!! ASSERTION !!!", MB_OK | MB_ICONEXCLAMATION | MB_APPLMODAL); BSP_terminate(-1); }
/*..........................................................................*/ void Q_onAssert(char const *module, int loc) { /* * NOTE: add here your application-specific error handling */ (void)module; (void)loc; QS_ASSERTION(module, loc, (uint32_t)10000U); /* report assertion to QS */ QF_INT_DISABLE(); /* disable all interrupts */ /* cause the reset of the CPU... */ WDTCTL = WDTPW | WDTHOLD; __asm(" push &0xFFFE"); /* return from function does the reset */ }
//**************************************************************************** void Q_onAssert(char_t const * const module, int loc) { QS_ASSERTION(module, loc, 10000U); // send assertion info to the QS trace qFatal("Assertion failed in module %s, location %d", module, loc); }
/*..........................................................................*/ void Q_onAssert(char const * const module, int_t loc) { QS_ASSERTION(module, loc, (uint32_t)10000U); /* report assertion to QS */ fprintf(stderr, "Assertion failed in %s, line %d", module, loc); exit(-1); }