qpc/doxygen/snippets/qs_startup.c

24 lines
614 B
C
Raw Normal View History

2012-08-14 18:07:04 -04:00
#ifdef Q_SPY
uint8_t QS_onStartup(void const *arg) {
2015-04-28 13:45:35 -04:00
static uint8_t qsBuf[4*1024]; /* buffer for Quantum Spy */
2012-08-14 18:07:04 -04:00
2015-04-28 13:45:35 -04:00
QS_initBuf(qsBuf, sizeof(qsBuf)); /* configure the Q-Spy buffer */
2012-08-14 18:07:04 -04:00
/* configure UART 0/1 for QSPY output ... */
2015-04-28 13:45:35 -04:00
if (*(char const *)arg == '0') { /* use UART 0 */
2012-08-14 18:07:04 -04:00
/* configure UART 0 for QSPY output ... */
. . .
2015-04-28 13:45:35 -04:00
return (uint8_t)1; /* UART 0 successfully opened */
2012-08-14 18:07:04 -04:00
}
2015-04-28 13:45:35 -04:00
else { /* use UART 1 */
2012-08-14 18:07:04 -04:00
/* configure UART 1 for QSPY output ... */
. . .
2015-04-28 13:45:35 -04:00
return (uint8_t)1; /* UART 1 successfully opened */
2012-08-14 18:07:04 -04:00
}
}
. . .
#endif /* Q_SPY */