Renesas M16C/6N Manual do Utilizador Página 22

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 27
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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
Vista de página 21
1 2 ... 17 18 19 20 21 22 23 24 25 26 27

Comentários a estes Manuais

Sem comentários