/*! callback function to execute a user command (to be implemented in BSP) */ void QS_onCommand(uint8_t cmdId, uint32_t param) { void assert_failed(char const *module, int loc); (void)cmdId; (void)param; QS_BEGIN(TRACE_QS_CMD, (void *)0) /* application-specific record begin */ QS_U8(2, cmdId); QS_U32(8, param); QS_END() }
/*! callback function to execute a uesr command (to be implemented in BSP) */ void QS_onCommand(uint8_t cmdId, uint32_t param) { (void)cmdId; (void)param; QS_BEGIN(COMMAND_STAT, (void *)0) /* application-specific record begin */ QS_U8(2, cmdId); QS_U32(8, param); QS_END() if (cmdId == 10U) { Q_onAssert("command", 10); } }
/*..........................................................................*/ void BSP_displayPhilStat(uint8_t n, char const *stat) { printf("Philosopher %2d is %s\n", (int)n, stat); QS_BEGIN(PHILO_STAT, AO_Philo[n]) /* application-specific record begin */ QS_U8(1, n); /* Philosopher number */ QS_STR(stat); /* Philosopher status */ QS_U16(4, n*13); /* test */ QS_U32(8, n*1234); /* test */ QS_F32(5, n*1234.0f); /* test */ QS_F64(8, n*1234.0); /* test */ QS_END() }