Renesas M16C/6N Bedienungsanleitung Seite 22

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 27
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 21
QDK™
M16C/Neutrino-NC30
www.state-machine.com/m16c
case of assertion failure by providing the callback function
Q_onAssert()
. Typically, you would put
the system in fail-safe state and try to reset. It is also a good idea to log some information as to
where the assertion failed.
The following code fragment shows the
Q_onAssert()
callback for M16C. The function simply locks
all interrupts and enters a for-ever loop. This policy is only adequate for testing, but probably is not
adequate for production release.
void Q_onAssert(char const Q_ROM * const Q_ROM_VAR file, int line) {
(void)file; /* avoid compiler warning */
(void)line; /* avoid compiler warning */
QF_INT_LOCK(); /* lock the interrupts */
for (;;) { /* hang in this for-ever loop */
}
}
Copyright © Quantum Leaps, LLC. All Rights Reserved.
20 of 25
Seitenansicht 21
1 2 ... 17 18 19 20 21 22 23 24 25 26 27

Kommentare zu diesen Handbüchern

Keine Kommentare