This commit is contained in:
MMS 2023-12-14 16:55:37 -05:00
parent c2347e81c9
commit 7332d59aa7
92 changed files with 898 additions and 982 deletions

@ -1 +1 @@
Subproject commit 90b36151b30c5e4b1cf8fa2ab7862568a75806e9
Subproject commit b2df302a9ba285da0aea71e3def72f006ebf36c4

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EFM32-SLSTK3401A board, QK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-23
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -489,33 +489,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
l_USART0->TXDATA = b;
QF_INT_ENABLE();
l_USART0->TXDATA = (uint8_t)b;
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
// callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EFM32-SLSTK3401A board, QV kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-23
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -483,33 +483,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
l_USART0->TXDATA = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
// callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EFM32-SLSTK3401A board, QXK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-23
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -506,33 +506,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
l_USART0->TXDATA = b; // put into the DR register
QF_INT_ENABLE();
l_USART0->TXDATA = (uint8_t)b; // put into the DR register
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
// callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EK-TM4C123GXL board, QK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-15
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -471,28 +471,23 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
return TIMER5->TAV;
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
UART0->DR = b; // put into the DR register
QF_INT_ENABLE();
UART0->DR = (uint8_t)b; // put into the DR register
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EK-TM4C123GXL board, QV kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-15
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -456,28 +456,23 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
return TIMER5->TAV;
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
UART0->DR = b; // put into the DR register
QF_INT_ENABLE();
UART0->DR = (uint8_t)b; // put into the DR register
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EK-TM4C123GXL board, QXK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-15
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -488,28 +488,23 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
return TIMER5->TAV;
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
UART0->DR = b; // put into the DR register
QF_INT_ENABLE();
UART0->DR = (uint8_t)b; // put into the DR register
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}

View File

@ -138,6 +138,11 @@ extern QXSemaphore TH_sema;
// NOTE: kernel objects can be allocated outside any memory regions
// accessible to the threads.
extern QXMutex TH_mutex;
//${Shared-TH::TH_obj_dict} ..................................................
#ifdef Q_SPY
void TH_obj_dict(void);
#endif // def Q_SPY
//$enddecl${Shared-TH} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#endif // QXK_H_

View File

@ -136,6 +136,16 @@ me-&gt;super.super.thread = mpu;</code>
<documentation>// NOTE: kernel objects can be allocated outside any memory regions
// accessible to the threads.</documentation>
</attribute>
<!--${Shared-TH::TH_obj_dict}-->
<operation name="TH_obj_dict?def Q_SPY" type="void" visibility="0x00" properties="0x00">
<code>QS_OBJ_DICTIONARY(TH_XThread1);
QS_OBJ_DICTIONARY(&amp;TH_XThread1-&gt;timeEvt);
QS_OBJ_DICTIONARY(TH_XThread2);
QS_OBJ_DICTIONARY(&amp;TH_XThread2-&gt;timeEvt);
QS_OBJ_DICTIONARY(&amp;TH_sema);
QS_OBJ_DICTIONARY(&amp;TH_mutex);</code>
</operation>
</package>
<!--${AOs}-->
<package name="AOs" stereotype="0x02">
@ -500,10 +510,7 @@ me-&gt;fork[n] = FREE;</action>
<operation name="run" type="void" visibility="0x02" properties="0x01">
<!--${XThreads::XThread1::run::thr}-->
<parameter name="thr" type="QXThread * const"/>
<code>QS_OBJ_DICTIONARY(TH_XThread1);
QS_OBJ_DICTIONARY(&amp;TH_XThread1-&gt;timeEvt);
// downcast the generic thr pointer to the specific thread
<code>// downcast the generic thr pointer to the specific thread
XThread1 *me = (XThread1 *)thr;
// subscribe to the EAT signal (from the application)
@ -542,12 +549,7 @@ for (;;) {
<operation name="run" type="void" visibility="0x02" properties="0x01">
<!--${XThreads::XThread2::run::thr}-->
<parameter name="thr" type="QXThread * const"/>
<code>QS_OBJ_DICTIONARY(TH_XThread2);
QS_OBJ_DICTIONARY(&amp;TH_XThread2-&gt;timeEvt);
QS_OBJ_DICTIONARY(&amp;TH_sema);
QS_OBJ_DICTIONARY(&amp;TH_mutex);
// downcast the generic thr pointer to the specific thread
<code>// downcast the generic thr pointer to the specific thread
//XThread2 *me = (XThread2 *)thr;
// initialize the semaphore before using it
@ -673,6 +675,7 @@ $define ${Shared-TH::TH_mutex}
$declare ${XThreads::XThread1}
$define ${Shared-TH::XThread1_ctor}
$define ${Shared-TH::TH_obj_dict}
$define ${XThreads::XThread1}</text>
</file>
<!--${qxk::xthread2.c}-->

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EK-TM4C123GXL board, QK kernel, MPU isolation
// Last updated for version 7.3.0
// Last updated on 2023-09-07
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -783,38 +783,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
return TIMER5->TAV;
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
QF_MEM_SYS();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
QF_MEM_APP();
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
QF_MEM_SYS();
}
UART0->DR = b; // put into the DR register
QF_MEM_APP();
QF_INT_ENABLE();
}
else {
QF_MEM_APP();
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EK-TM4C123GXL board, QV kernel, MPU isolation
// Last updated for version 7.3.0
// Last updated on 2023-09-07
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -774,38 +774,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
return TIMER5->TAV;
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
QF_MEM_SYS();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
QF_MEM_APP();
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
QF_MEM_SYS();
}
UART0->DR = b; // put into the DR register
QF_MEM_APP();
QF_INT_ENABLE();
}
else {
QF_MEM_APP();
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EK-TM4C123GXL board, QXK kernel, MPU isolation
// Last updated for version 7.3.0
// Last updated on 2023-09-07
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -613,6 +613,7 @@ void BSP_init(void) {
QS_USR_DICTIONARY(PAUSED_STAT);
QS_ONLY(produce_sig_dict());
QS_ONLY(TH_obj_dict());
// setup the QS filters...
QS_GLB_FILTER(QS_ALL_RECORDS); // all records
@ -754,7 +755,7 @@ void QF_onStartup(void) {
NVIC_SetPriorityGrouping(0U);
// set priorities of ALL ISRs used in the system, see NOTE1
NVIC_SetPriority(UART0_IRQn, 0U); // kernel unaware interrupt
NVIC_SetPriority(UART0_IRQn, 0U); // // kernel UNAWARE interrupt
NVIC_SetPriority(GPIOA_IRQn, QF_AWARE_ISR_CMSIS_PRI + 0U);
NVIC_SetPriority(SysTick_IRQn, QF_AWARE_ISR_CMSIS_PRI + 1U);
// ...
@ -809,7 +810,6 @@ void QXK_onIdle(void) {
// Put the CPU and peripherals to the low-power mode.
// you might need to customize the clock management for your application,
// see the datasheet for your particular Cortex-M MCU.
//
__WFI(); // Wait-For-Interrupt
#endif
}
@ -885,38 +885,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
return TIMER5->TAV;
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
QF_MEM_SYS();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((UART0->FR & UART_FR_TXFE) == 0U) { // while TXE not empty
QF_MEM_APP();
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
QF_MEM_SYS();
}
UART0->DR = b; // put into the DR register
QF_MEM_APP();
QF_INT_ENABLE();
}
else {
QF_MEM_APP();
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId, uint32_t param1,
uint32_t param2, uint32_t param3)
{

View File

@ -87,15 +87,27 @@ void XThread1_ctor(
me->super.super.thread = mpu;
}
//$enddef${Shared-TH::XThread1_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//$define${Shared-TH::TH_obj_dict} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//${Shared-TH::TH_obj_dict} ..................................................
#ifdef Q_SPY
void TH_obj_dict(void) {
QS_OBJ_DICTIONARY(TH_XThread1);
QS_OBJ_DICTIONARY(&TH_XThread1->timeEvt);
QS_OBJ_DICTIONARY(TH_XThread2);
QS_OBJ_DICTIONARY(&TH_XThread2->timeEvt);
QS_OBJ_DICTIONARY(&TH_sema);
QS_OBJ_DICTIONARY(&TH_mutex);
}
#endif // def Q_SPY
//$enddef${Shared-TH::TH_obj_dict} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//$define${XThreads::XThread1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//${XThreads::XThread1} ......................................................
//${XThreads::XThread1::run} .................................................
static void XThread1_run(QXThread * const thr) {
QS_OBJ_DICTIONARY(TH_XThread1);
QS_OBJ_DICTIONARY(&TH_XThread1->timeEvt);
// downcast the generic thr pointer to the specific thread
XThread1 *me = (XThread1 *)thr;

View File

@ -82,11 +82,6 @@ void XThread2_ctor(
//${XThreads::XThread2::run} .................................................
static void XThread2_run(QXThread * const thr) {
QS_OBJ_DICTIONARY(TH_XThread2);
QS_OBJ_DICTIONARY(&TH_XThread2->timeEvt);
QS_OBJ_DICTIONARY(&TH_sema);
QS_OBJ_DICTIONARY(&TH_mutex);
// downcast the generic thr pointer to the specific thread
//XThread2 *me = (XThread2 *)thr;

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NXP mbed-LPC1768 board, QK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-15
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -463,34 +463,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
QF_INT_ENABLE();
if (b != QS_EOD) {
while ((LPC_UART0->LSR & 0x20U) == 0U) { // while THR empty...
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
LPC_UART0->THR = b; // put into the THR register
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
// callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NXP mbed-LPC1768 board, QV kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-15
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -457,11 +457,12 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
QF_INT_ENABLE();
if (b != QS_EOD) {
while ((LPC_UART0->LSR & 0x20U) == 0U) { // while THR empty...
}
@ -473,12 +474,10 @@ void QS_onFlush(void) {
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
// callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NXP mbed-LPC1768 board, QXK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-15
// Last updated for version 7.3.2
// Last updated on 2023-12-16
//
// Q u a n t u m L e a P s
// ------------------------
@ -478,11 +478,12 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
QF_INT_ENABLE();
if (b != QS_EOD) {
while ((LPC_UART0->LSR & 0x20U) == 0U) { // while THR empty...
}
@ -494,7 +495,6 @@ void QS_onFlush(void) {
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-C031C6 board, QK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-15
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -468,33 +468,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((USART2->ISR & (1U << 7U)) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
USART2->TDR = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
// callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-C031C6 board, QV kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-23
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -460,33 +460,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((USART2->ISR & (1U << 7U)) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
USART2->TDR = b; // put into the DR register
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
// callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-C031C6 board, QXK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-15
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -482,33 +482,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((USART2->ISR & (1U << 7U)) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
USART2->TDR = b; // put into the DR register
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -138,6 +138,11 @@ extern QXSemaphore TH_sema;
// NOTE: kernel objects can be allocated outside any memory regions
// accessible to the threads.
extern QXMutex TH_mutex;
//${Shared-TH::TH_obj_dict} ..................................................
#ifdef Q_SPY
void TH_obj_dict(void);
#endif // def Q_SPY
//$enddecl${Shared-TH} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#endif // QXK_H_

View File

@ -136,6 +136,16 @@ me-&gt;super.super.thread = mpu;</code>
<documentation>// NOTE: kernel objects can be allocated outside any memory regions
// accessible to the threads.</documentation>
</attribute>
<!--${Shared-TH::TH_obj_dict}-->
<operation name="TH_obj_dict?def Q_SPY" type="void" visibility="0x00" properties="0x00">
<code>QS_OBJ_DICTIONARY(TH_XThread1);
QS_OBJ_DICTIONARY(&amp;TH_XThread1-&gt;timeEvt);
QS_OBJ_DICTIONARY(TH_XThread2);
QS_OBJ_DICTIONARY(&amp;TH_XThread2-&gt;timeEvt);
QS_OBJ_DICTIONARY(&amp;TH_sema);
QS_OBJ_DICTIONARY(&amp;TH_mutex);</code>
</operation>
</package>
<!--${AOs}-->
<package name="AOs" stereotype="0x02">
@ -500,10 +510,7 @@ me-&gt;fork[n] = FREE;</action>
<operation name="run" type="void" visibility="0x02" properties="0x01">
<!--${XThreads::XThread1::run::thr}-->
<parameter name="thr" type="QXThread * const"/>
<code>QS_OBJ_DICTIONARY(TH_XThread1);
QS_OBJ_DICTIONARY(&amp;TH_XThread1-&gt;timeEvt);
// downcast the generic thr pointer to the specific thread
<code>// downcast the generic thr pointer to the specific thread
XThread1 *me = (XThread1 *)thr;
// subscribe to the EAT signal (from the application)
@ -542,12 +549,7 @@ for (;;) {
<operation name="run" type="void" visibility="0x02" properties="0x01">
<!--${XThreads::XThread2::run::thr}-->
<parameter name="thr" type="QXThread * const"/>
<code>QS_OBJ_DICTIONARY(TH_XThread2);
QS_OBJ_DICTIONARY(&amp;TH_XThread2-&gt;timeEvt);
QS_OBJ_DICTIONARY(&amp;TH_sema);
QS_OBJ_DICTIONARY(&amp;TH_mutex);
// downcast the generic thr pointer to the specific thread
<code>// downcast the generic thr pointer to the specific thread
//XThread2 *me = (XThread2 *)thr;
// initialize the semaphore before using it
@ -673,6 +675,7 @@ $define ${Shared-TH::TH_mutex}
$declare ${XThreads::XThread1}
$define ${Shared-TH::XThread1_ctor}
$define ${Shared-TH::TH_obj_dict}
$define ${XThreads::XThread1}</text>
</file>
<!--${qxk::xthread2.c}-->

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-C031C6 board, QK kernel, MPU isolation
// Last updated for version 7.3.0
// Last updated on 2023-08-28
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -785,38 +785,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
QF_MEM_SYS();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((USART2->ISR & (1U << 7U)) == 0U) { // while TXE not empty
QF_MEM_APP();
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
QF_MEM_SYS();
}
USART2->TDR = b; // put into the DR register
QF_MEM_APP();
QF_INT_ENABLE();
}
else {
QF_MEM_APP();
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-C031C6 board, QV kernel, MPU isolation
// Last updated for version 7.3.0
// Last updated on 2023-08-28
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -775,38 +775,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
QF_MEM_SYS();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((USART2->ISR & (1U << 7U)) == 0U) { // while TXE not empty
QF_MEM_APP();
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
QF_MEM_SYS();
}
USART2->TDR = b; // put into the DR register
QF_MEM_APP();
QF_INT_ENABLE();
}
else {
QF_MEM_APP();
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -75,7 +75,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -474,7 +474,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-C031C6 board, QXK kernel, MPU isolation
// Last updated for version 7.3.1
// Last updated on 2023-12-03
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -595,6 +595,7 @@ void BSP_init(void) {
QS_USR_DICTIONARY(PAUSED_STAT);
QS_ONLY(produce_sig_dict());
QS_ONLY(TH_obj_dict());
// setup the QS filters...
QS_GLB_FILTER(QS_ALL_RECORDS); // all records
@ -744,9 +745,9 @@ void QF_onStartup(void) {
NVIC_SetPriorityGrouping(0U);
// set priorities of ALL ISRs used in the system, see NOTE1
NVIC_SetPriority(USART2_IRQn, 0); // kernel UNAWARE interrupt
NVIC_SetPriority(EXTI0_1_IRQn, QF_AWARE_ISR_CMSIS_PRI + 0U);
NVIC_SetPriority(SysTick_IRQn, QF_AWARE_ISR_CMSIS_PRI + 1U);
NVIC_SetPriority(USART2_IRQn, 0U); // kernel UNAWARE interrupt
NVIC_SetPriority(EXTI0_1_IRQn, QF_AWARE_ISR_CMSIS_PRI + 0U);
NVIC_SetPriority(SysTick_IRQn, QF_AWARE_ISR_CMSIS_PRI + 1U);
// ...
// enable IRQs...
@ -791,18 +792,7 @@ void QXK_onIdle(void) {
// Put the CPU and peripherals to the low-power mode.
// you might need to customize the clock management for your application,
// see the datasheet for your particular Cortex-M MCU.
//
// !!!CAUTION!!!
// The WFI instruction stops the CPU clock, which unfortunately disables
// the JTAG port, so the ST-Link debugger can no longer connect to the
// board. For that reason, the call to __WFI() has to be used with CAUTION.
//
// NOTE: If you find your board "frozen" like this, strap BOOT0 to VDD and
// reset the board, then connect with ST-Link Utilities and erase the part.
// The trick with BOOT(0) is it gets the part to run the System Loader
// instead of your broken code. When done disconnect BOOT0, and start over.
//
//__WFI(); // Wait-For-Interrupt
__WFI(); // Wait-For-Interrupt
#endif
}
@ -882,38 +872,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
QF_MEM_SYS();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((USART2->ISR & (1U << 7U)) == 0U) { // while TXE not empty
QF_MEM_APP();
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
QF_MEM_SYS();
}
USART2->TDR = b; // put into the DR register
QF_MEM_APP();
QF_INT_ENABLE();
}
else {
QF_MEM_APP();
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -87,15 +87,27 @@ void XThread1_ctor(
me->super.super.thread = mpu;
}
//$enddef${Shared-TH::XThread1_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//$define${Shared-TH::TH_obj_dict} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//${Shared-TH::TH_obj_dict} ..................................................
#ifdef Q_SPY
void TH_obj_dict(void) {
QS_OBJ_DICTIONARY(TH_XThread1);
QS_OBJ_DICTIONARY(&TH_XThread1->timeEvt);
QS_OBJ_DICTIONARY(TH_XThread2);
QS_OBJ_DICTIONARY(&TH_XThread2->timeEvt);
QS_OBJ_DICTIONARY(&TH_sema);
QS_OBJ_DICTIONARY(&TH_mutex);
}
#endif // def Q_SPY
//$enddef${Shared-TH::TH_obj_dict} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//$define${XThreads::XThread1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//${XThreads::XThread1} ......................................................
//${XThreads::XThread1::run} .................................................
static void XThread1_run(QXThread * const thr) {
QS_OBJ_DICTIONARY(TH_XThread1);
QS_OBJ_DICTIONARY(&TH_XThread1->timeEvt);
// downcast the generic thr pointer to the specific thread
XThread1 *me = (XThread1 *)thr;

View File

@ -82,11 +82,6 @@ void XThread2_ctor(
//${XThreads::XThread2::run} .................................................
static void XThread2_run(QXThread * const thr) {
QS_OBJ_DICTIONARY(TH_XThread2);
QS_OBJ_DICTIONARY(&TH_XThread2->timeEvt);
QS_OBJ_DICTIONARY(&TH_sema);
QS_OBJ_DICTIONARY(&TH_mutex);
// downcast the generic thr pointer to the specific thread
//XThread2 *me = (XThread2 *)thr;

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-H743ZI board, QK kernel
// Last updated for version 7.3.1
// Last updated on 2023-11-29
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -436,33 +436,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((l_uartHandle.Instance->ISR & UART_FLAG_TXE) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
l_uartHandle.Instance->TDR = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
// callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-H743ZI board, QV kernel
// Last updated for version 7.3.1
// Last updated on 2023-11-30
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -426,33 +426,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((l_uartHandle.Instance->ISR & UART_FLAG_TXE) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
l_uartHandle.Instance->TDR = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
// callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-H743ZI board, QXK kernel
// Last updated for version 7.3.1
// Last updated on 2023-11-29
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -462,33 +462,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((l_uartHandle.Instance->ISR & UART_FLAG_TXE) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
l_uartHandle.Instance->TDR = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-L053R8 board, QK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-22
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -468,17 +468,15 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_CRIT_STAT
QF_CRIT_ENTRY();
uint16_t b = QS_getByte();
QF_CRIT_EXIT();
if (b != QS_EOD) { // NOT end-of-data
// busy-wait as long as TX has data to transmit
while ((USART2->ISR & 0x0080U) == 0U) {
while ((USART2->ISR & (1U << 7U)) == 0U) {
}
USART2->TDR = b; // put into the TDR register
}

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-L053R8 board, QV kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-23
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -460,13 +460,12 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_CRIT_STAT
QF_CRIT_ENTRY();
uint16_t b = QS_getByte();
QF_CRIT_EXIT();
if (b != QS_EOD) { // NOT end-of-data
// busy-wait as long as TX has data to transmit
while ((USART2->ISR & (1U << 7U)) == 0U) {
@ -479,12 +478,10 @@ void QS_onFlush(void) {
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-L053R8 board, QXK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-22
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -482,33 +482,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((USART2->ISR & (1U << 7U)) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
USART2->TDR = b; // put into the DR register
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-L152RE board, QK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-23
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -461,33 +461,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((USART2->SR & (1U << 7U)) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
USART2->DR = b; // put into the DR register
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-L152RE board, QV kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-23
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -457,33 +457,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((USART2->SR & (1U << 7U)) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
USART2->DR = b; // put into the DR register
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-L152RE board, QXK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-23
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -484,33 +484,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((USART2->SR & (1U << 7U)) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
USART2->DR = b; // put into the DR register
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-L552ZE board, QK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-23
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -475,33 +475,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((l_uartHandle.Instance->ISR & UART_FLAG_TXE) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
l_uartHandle.Instance->TDR = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-L552ZE board, QV kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-23
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -463,33 +463,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((l_uartHandle.Instance->ISR & UART_FLAG_TXE) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
l_uartHandle.Instance->TDR = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-L552ZE board, QXK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-23
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -489,33 +489,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((l_uartHandle.Instance->ISR & UART_FLAG_TXE) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
l_uartHandle.Instance->TDR = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, STM32F4-Discovery board, QK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-23
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -502,33 +502,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((USART2->SR & USART_FLAG_TXE) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
USART2->DR = b; // put into the DR register
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, STM32F4-Discovery board, QV kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-23
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -498,33 +498,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((USART2->SR & USART_FLAG_TXE) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
USART2->DR = b; // put into the DR register
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, STM32F4-Discovery board, QXK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-23
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -523,33 +523,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((USART2->SR & USART_FLAG_TXE) == 0U) { // while TXE not empty
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
USART2->DR = b; // put into the DR register
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: "Fly 'n' Shoot" game example, EFM32-SLSTK3401A board, QK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-23
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -826,27 +826,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
uint16_t b;
QF_INT_DISABLE();
while ((b = QS_getByte()) != QS_EOD) { // while not End-Of-Data...
QF_INT_ENABLE();
// while TXE not empty
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
for (;;) {
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
}
l_USART0->TXDATA = b; // put into the DR register
}
else {
break;
}
l_USART0->TXDATA = (b & 0xFFU); // put into the DR register
QF_INT_DISABLE();
}
QF_INT_ENABLE();
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command (to be implemented in BSP)
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: "Fly 'n' Shoot" game example, EFM32-SLSTK3401A board, QV kernel
// Last updated for version 7.3.0
// Last updated on 2023-07-27
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -816,27 +816,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
uint16_t b;
QF_INT_DISABLE();
while ((b = QS_getByte()) != QS_EOD) { // while not End-Of-Data...
QF_INT_ENABLE();
// while TXE not empty
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
for (;;) {
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((l_USART0->STATUS & USART_STATUS_TXBL) == 0U) {
}
l_USART0->TXDATA = b; // put into the DR register
}
else {
break;
}
l_USART0->TXDATA = (b & 0xFFU); // put into the DR register
QF_INT_DISABLE();
}
QF_INT_ENABLE();
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command (to be implemented in BSP)
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: "DPP" on LAUCHXL2-TMS570LS12 board, QK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-15
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -396,33 +396,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
return rtiREG1->CNT[0].FRCx; // free running RTI counter0
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((scilinREG->FLR & (uint32)SCI_TX_INT) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
scilinREG->TD = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
systemREG1->SYSECR = 0U; // perform system reset
}
//............................................................................
// callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: "DPP" on LAUCHXL2-TMS570LS12 board, QV kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-15
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -369,33 +369,27 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
return rtiREG1->CNT[0].FRCx; // free running RTI counter0
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((scilinREG->FLR & (uint32)SCI_TX_INT) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
scilinREG->TD = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break;
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
systemREG1->SYSECR = 0U; // perform system reset
}
//............................................................................
// callback function to execute a user command
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: "Dining Philosophers Problem" example, embOS kernel
// Last updated for: @ref qpc_7_3_1
// Last updated on 2023-11-15
// Last updated for: @ref qpc_7_3_2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -420,14 +420,13 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
while (true) {
for (;;) {
// try to get next byte to transmit
QF_CRIT_STAT
QF_CRIT_ENTRY();
uint16_t b = QS_getByte();
QF_CRIT_EXIT();
if (b != QS_EOD) { // NOT end-of-data
// busy-wait as long as TXE not set
while ((l_uartHandle.Instance->ISR & UART_FLAG_TXE) == 0U) {
@ -441,7 +440,6 @@ void QS_onFlush(void) {
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EK-TM4C123GXL board, FreeRTOS kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-29
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -518,37 +518,29 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
return TIMER5->TAV;
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
QF_INT_ENABLE();
if (b != QS_EOD) { // NOT end-of-data
// busy-wait as long as TX FIFO has data to transmit
while ((UART0->FR & UART_FR_TXFE) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
// place the byte in the UART DR register
UART0->DR = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break; // break out of the loop
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command (to be implemented in BSP)
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, NUCLEO-H743ZI board, FreeRTOS kernel
// Last updated for version 7.3.1
// Last updated on 2023-11-15
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -490,37 +490,29 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_INT_DISABLE();
uint16_t b = QS_getByte();
QF_INT_ENABLE();
if (b != QS_EOD) { // NOT end-of-data
// busy-wait as long as TX FIFO has data to transmit
while ((l_uartHandle.Instance->ISR & UART_FLAG_TXE) == 0U) {
QF_INT_ENABLE();
QF_CRIT_EXIT_NOP();
QF_INT_DISABLE();
}
// place the byte in the UART TDR register
l_uartHandle.Instance->TDR = b;
QF_INT_ENABLE();
}
else {
QF_INT_ENABLE();
break; // break out of the loop
}
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}
//............................................................................
//! callback function to execute a user command (to be implemented in BSP)
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP with lwIP application, preemptive QK kernel
// Last updated for version 6.9.3
// Last updated on 2021-03-03
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -294,24 +294,21 @@ QSTimeCtr QS_onGetTime(void) { // invoked with interrupts disabled
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
uint16_t fifo = UART_TXFIFO_DEPTH; // Tx FIFO depth
uint8_t const *block;
QF_INT_DISABLE();
while ((block = QS_getBlock(&fifo)) != (uint8_t *)0) {
QF_INT_ENABLE();
// busy-wait until TX FIFO empty
while ((UART0->FR & UART_FR_TXFE) == 0) {
}
while (fifo-- != 0) { // any bytes in the block?
while (fifo-- != 0U) { // any bytes in the block?
UART0->DR = *block++; // put into the TX FIFO
}
fifo = UART_TXFIFO_DEPTH; // re-load the Tx FIFO depth
QF_INT_DISABLE();
}
QF_INT_ENABLE();
}
#endif // Q_SPY
//----------------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP with lwIP application, cooperative QV kernel
// Last updated for version 6.9.3
// Last updated on 2021-03-03
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -292,24 +292,21 @@ QSTimeCtr QS_onGetTime(void) { // invoked with interrupts disabled
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
uint16_t fifo = UART_TXFIFO_DEPTH; // Tx FIFO depth
uint8_t const *block;
QF_INT_DISABLE();
while ((block = QS_getBlock(&fifo)) != (uint8_t *)0) {
QF_INT_ENABLE();
// busy-wait until TX FIFO empty
while ((UART0->FR & UART_FR_TXFE) == 0) {
}
while (fifo-- != 0) { // any bytes in the block?
while (fifo-- != 0U) { // any bytes in the block?
UART0->DR = *block++; // put into the TX FIFO
}
fifo = UART_TXFIFO_DEPTH; // re-load the Tx FIFO depth
QF_INT_DISABLE();
}
QF_INT_ENABLE();
}
#endif // Q_SPY
//----------------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP on MSP-EXP430F5529LP, QK kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-15
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -368,26 +368,28 @@ QSTimeCtr QS_onGetTime(void) { // invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
uint16_t b;
QF_INT_DISABLE();
while ((b = QS_getByte()) != QS_EOD) { // next QS byte available?
QF_INT_ENABLE();
while ((UCA1STAT & UCBUSY) != 0U) { // TX busy?
for (;;) {
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((UCA1STAT & UCBUSY) != 0U) { // TX busy?
}
UCA1TXBUF = (uint8_t)b; // stick the byte to the TX BUF
}
else {
break;
}
UCA1TXBUF = (uint8_t)b; // stick the byte to the TX BUF
QF_INT_DISABLE();
}
QF_INT_ENABLE();
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
// write invalid password to WDT: cause a password-validation RESET
WDTCTL = 0xDEAD;
}
//............................................................................
//! callback function to execute a user command (to be implemented in BSP)
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP on MSP-EXP430F5529LP, QV kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-15
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -332,26 +332,28 @@ QSTimeCtr QS_onGetTime(void) { // invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
uint16_t b;
QF_INT_DISABLE();
while ((b = QS_getByte()) != QS_EOD) { // next QS byte available?
QF_INT_ENABLE();
while ((UCA1STAT & UCBUSY) != 0U) { // TX busy?
for (;;) {
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while ((UCA1STAT & UCBUSY) != 0U) { // TX busy?
}
UCA1TXBUF = (uint8_t)b; // stick the byte to the TX BUF
}
else {
break;
}
UCA1TXBUF = (uint8_t)b; // stick the byte to the TX BUF
QF_INT_DISABLE();
}
QF_INT_ENABLE();
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
// write invalid password to WDT: cause a password-validation RESET
WDTCTL = 0xDEAD;
}
//............................................................................
//! callback function to execute a user command (to be implemented in BSP)
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// BSP for DPP example, Microstick II board, preemptive QK kernel, XC32
// Last updated for version 7.3.0
// Last updated on 2023-08-21
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -334,21 +334,27 @@ uint8_t QS_onStartup(void const *arg) {
void QS_onCleanup(void) {
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
uint16_t b;
while ((b = QS_getByte()) != QS_EOD) { // next QS trace byte available?
while (U2STAbits.UTXBF) { // TX Buffer full?
for (;;) {
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while (U2STAbits.UTXBF) { // TX Buffer full?
}
U2TXREG = b; // stick the byte to TXREG for transmission
}
else {
break;
}
U2TXREG = b; // stick the byte to TXREG for transmission
}
}
//............................................................................
// NOTE: works properly with interrupts enabled or disabled
QSTimeCtr QS_onGetTime(void) {
return __builtin_mfc0(_CP0_COUNT, _CP0_COUNT_SELECT);
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
// perform a system unlock sequence ,starting critical sequence
SYSKEY = 0x00000000; //write invalid key to force lock
@ -361,7 +367,6 @@ void QS_onReset(void) {
// prevent any unwanted code execution until reset occurs
}
//............................................................................
//! callback function to execute a user command (to be implemented in BSP)
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -1,7 +1,7 @@
//============================================================================
// BSP for DPP example, Microstick II board, cooperative QV kernel, XC32
// Last updated for version 7.3.0
// Last updated on 2023-08-21
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -328,21 +328,27 @@ uint8_t QS_onStartup(void const *arg) {
void QS_onCleanup(void) {
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
uint16_t b;
while ((b = QS_getByte()) != QS_EOD) { // next QS trace byte available?
while (U2STAbits.UTXBF) { // TX Buffer full?
for (;;) {
uint16_t b = QS_getByte();
if (b != QS_EOD) {
while (U2STAbits.UTXBF) { // TX Buffer full?
}
U2TXREG = b; // stick the byte to TXREG for transmission
}
else {
break;
}
U2TXREG = b; // stick the byte to TXREG for transmission
}
}
//............................................................................
// NOTE: works properly with interrupts enabled or disabled
QSTimeCtr QS_onGetTime(void) {
return __builtin_mfc0(_CP0_COUNT, _CP0_COUNT_SELECT);
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
// perform a system unlock sequence ,starting critical sequence
SYSKEY = 0x00000000; //write invalid key to force lock
@ -355,7 +361,6 @@ void QS_onReset(void) {
// prevent any unwanted code execution until reset occurs
}
//............................................................................
//! callback function to execute a user command (to be implemented in BSP)
void QS_onCommand(uint8_t cmdId,
uint32_t param1, uint32_t param2, uint32_t param3)
{

View File

@ -85,22 +85,22 @@ bool QHsmTst_isIn(uint32_t const state_num) {
bool stat = false;
switch (state_num) {
case 0:
stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s));
stat = QASM_IS_IN(me, Q_STATE_CAST(&QHsmTst_s));
break;
case 1:
stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s1));
stat = QASM_IS_IN(me, Q_STATE_CAST(&QHsmTst_s1));
break;
case 11:
stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s11));
stat = QASM_IS_IN(me, Q_STATE_CAST(&QHsmTst_s11));
break;
case 2:
stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s2));
stat = QASM_IS_IN(me, Q_STATE_CAST(&QHsmTst_s2));
break;
case 21:
stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s21));
stat = QASM_IS_IN(me, Q_STATE_CAST(&QHsmTst_s21));
break;
case 211:
stat = QHsm_isIn(me, Q_STATE_CAST(&QHsmTst_s211));
stat = QASM_IS_IN(me, Q_STATE_CAST(&QHsmTst_s211));
break;
default:
Q_ERROR();

View File

@ -50,22 +50,22 @@ QHsm_ctor(&amp;me-&gt;super, Q_STATE_CAST(&amp;QHsmTst_initial));</code>
bool stat = false;
switch (state_num) {
case 0:
stat = QHsm_isIn(me, Q_STATE_CAST(&amp;QHsmTst_s));
stat = QASM_IS_IN(me, Q_STATE_CAST(&amp;QHsmTst_s));
break;
case 1:
stat = QHsm_isIn(me, Q_STATE_CAST(&amp;QHsmTst_s1));
stat = QASM_IS_IN(me, Q_STATE_CAST(&amp;QHsmTst_s1));
break;
case 11:
stat = QHsm_isIn(me, Q_STATE_CAST(&amp;QHsmTst_s11));
stat = QASM_IS_IN(me, Q_STATE_CAST(&amp;QHsmTst_s11));
break;
case 2:
stat = QHsm_isIn(me, Q_STATE_CAST(&amp;QHsmTst_s2));
stat = QASM_IS_IN(me, Q_STATE_CAST(&amp;QHsmTst_s2));
break;
case 21:
stat = QHsm_isIn(me, Q_STATE_CAST(&amp;QHsmTst_s21));
stat = QASM_IS_IN(me, Q_STATE_CAST(&amp;QHsmTst_s21));
break;
case 211:
stat = QHsm_isIn(me, Q_STATE_CAST(&amp;QHsmTst_s211));
stat = QASM_IS_IN(me, Q_STATE_CAST(&amp;QHsmTst_s211));
break;
default:
Q_ERROR();

View File

@ -19,14 +19,14 @@ expect("@timestamp BSP_DISPLAY s211-ENTRY;")
expect("@timestamp Trg-Done QS_RX_EVENT")
test("QHsmTst isIn", NORESET)
command(1, 1)
expect("@timestamp CMD 0 1");
command(1, 1) # is in state s1
expect("@timestamp CMD 0 1"); # NOT in s1
expect("@timestamp Trg-Done QS_RX_COMMAND")
command(1, 21)
expect("@timestamp CMD 1 21");
command(1, 21) # is in state s21
expect("@timestamp CMD 1 21"); # YES, in s21
expect("@timestamp Trg-Done QS_RX_COMMAND")
command(1, 211)
expect("@timestamp CMD 1 211");
command(1, 211) # is in state s211
expect("@timestamp CMD 1 211"); # YES, in s211
expect("@timestamp Trg-Done QS_RX_COMMAND")
test("QHsmTst dispatch", NORESET)

View File

@ -135,37 +135,37 @@ void QMsmTst_ctor(void) {
QMsm_ctor(&me->super, Q_STATE_CAST(&QMsmTst_initial));
}
//$enddef${Shared::QMsmTst_ctor} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//$define${Shared::QMsmTst_isInState} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//$define${Shared::QMsmTst_isIn} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//${Shared::QMsmTst_isInState} ...............................................
bool QMsmTst_isInState(uint32_t const state_num) {
//${Shared::QMsmTst_isIn} ....................................................
bool QMsmTst_isIn(uint32_t const state_num) {
QMsm * const me = &QMsmTst_inst.super;
bool stat = false;
switch (state_num) {
case 0:
stat = QMsm_isInState(me, &QMsmTst_s_s);
stat = QASM_IS_IN(me, Q_STATE_CAST(&QMsmTst_s));
break;
case 1:
stat = QMsm_isInState(me, &QMsmTst_s1_s);
stat = QASM_IS_IN(me, Q_STATE_CAST(&QMsmTst_s1));
break;
case 11:
stat = QMsm_isInState(me, &QMsmTst_s11_s);
stat = QASM_IS_IN(me, Q_STATE_CAST(&QMsmTst_s11));
break;
case 2:
stat = QMsm_isInState(me, &QMsmTst_s2_s);
stat = QASM_IS_IN(me, Q_STATE_CAST(&QMsmTst_s2));
break;
case 21:
stat = QMsm_isInState(me, &QMsmTst_s21_s);
stat = QASM_IS_IN(me, Q_STATE_CAST(&QMsmTst_s21));
break;
case 211:
stat = QMsm_isInState(me, &QMsmTst_s211_s);
stat = QASM_IS_IN(me, Q_STATE_CAST(&QMsmTst_s211));
break;
default:
Q_ERROR();
}
return stat;
}
//$enddef${Shared::QMsmTst_isInState} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//$enddef${Shared::QMsmTst_isIn} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//$define${SMs::QMsmTst} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//${SMs::QMsmTst} ............................................................

View File

@ -61,8 +61,8 @@ void BSP_terminate(int16_t const result);
//${Shared::QMsmTst_ctor} ....................................................
void QMsmTst_ctor(void);
//${Shared::QMsmTst_isInState} ...............................................
bool QMsmTst_isInState(uint32_t const state_num);
//${Shared::QMsmTst_isIn} ....................................................
bool QMsmTst_isIn(uint32_t const state_num);
//$enddecl${Shared} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#endif // QMSMTST_H_

View File

@ -42,30 +42,30 @@
<code>QMsmTst *me = &amp;QMsmTst_inst;
QMsm_ctor(&amp;me-&gt;super, Q_STATE_CAST(&amp;QMsmTst_initial));</code>
</operation>
<!--${Shared::QMsmTst_isInState}-->
<operation name="QMsmTst_isInState" type="bool" visibility="0x00" properties="0x00">
<!--${Shared::QMsmTst_isInStat~::state_num}-->
<!--${Shared::QMsmTst_isIn}-->
<operation name="QMsmTst_isIn" type="bool" visibility="0x00" properties="0x00">
<!--${Shared::QMsmTst_isIn::state_num}-->
<parameter name="state_num" type="uint32_t const"/>
<code>QMsm * const me = &amp;QMsmTst_inst.super;
bool stat = false;
switch (state_num) {
case 0:
stat = QMsm_isInState(me, &amp;QMsmTst_s_s);
stat = QASM_IS_IN(me, Q_STATE_CAST(&amp;QMsmTst_s));
break;
case 1:
stat = QMsm_isInState(me, &amp;QMsmTst_s1_s);
stat = QASM_IS_IN(me, Q_STATE_CAST(&amp;QMsmTst_s1));
break;
case 11:
stat = QMsm_isInState(me, &amp;QMsmTst_s11_s);
stat = QASM_IS_IN(me, Q_STATE_CAST(&amp;QMsmTst_s11));
break;
case 2:
stat = QMsm_isInState(me, &amp;QMsmTst_s2_s);
stat = QASM_IS_IN(me, Q_STATE_CAST(&amp;QMsmTst_s2));
break;
case 21:
stat = QMsm_isInState(me, &amp;QMsmTst_s21_s);
stat = QASM_IS_IN(me, Q_STATE_CAST(&amp;QMsmTst_s21));
break;
case 211:
stat = QMsm_isInState(me, &amp;QMsmTst_s211_s);
stat = QASM_IS_IN(me, Q_STATE_CAST(&amp;QMsmTst_s211));
break;
default:
Q_ERROR();
@ -384,7 +384,7 @@ Q_DEFINE_THIS_FILE
$declare ${SMs::QMsmTst}
$define ${Shared::the_sm}
$define ${Shared::QMsmTst_ctor}
$define ${Shared::QMsmTst_isInState}
$define ${Shared::QMsmTst_isIn}
$define ${SMs::QMsmTst}</text>
</file>
</directory>

View File

@ -18,15 +18,15 @@ expect("@timestamp BSP_DISPLAY s21-ENTRY;")
expect("@timestamp BSP_DISPLAY s211-ENTRY;")
expect("@timestamp Trg-Done QS_RX_EVENT")
test("QMsmTst isInState", NORESET)
command(1, 1)
expect("@timestamp CMD 0 1");
test("QMsmTst isIn", NORESET)
command(1, 1) # is in state s1
expect("@timestamp CMD 0 1"); # NOT in s1
expect("@timestamp Trg-Done QS_RX_COMMAND")
command(1, 21)
expect("@timestamp CMD 1 21");
command(1, 21) # is in state s21
expect("@timestamp CMD 1 21"); # YES, in s21
expect("@timestamp Trg-Done QS_RX_COMMAND")
command(1, 211)
expect("@timestamp CMD 1 211");
command(1, 211) # is in state s211
expect("@timestamp CMD 1 211"); # YES, in s211
expect("@timestamp Trg-Done QS_RX_COMMAND")
test("QMsmTst dispatch", NORESET)

View File

@ -1,7 +1,7 @@
//============================================================================
// Purpose: Fixture for QUTEST
// Last Updated for Version: 7.3.1
// Date of the Last Update: 2023-12-11
// Date of the Last Update: 2023-12-12
//
// Q u a n t u m L e a P s
// ------------------------
@ -97,7 +97,7 @@ void QS_onCommand(uint8_t cmdId,
break;
}
case 1U: {
bool ret = QMsmTst_isInState(param1);
bool ret = QMsmTst_isIn(param1);
QS_BEGIN_ID(CMD, 0U) // app-specific record
QS_U8(0U, ret ? 1 : 0);
QS_U8(0U, (uint8_t)param1);

View File

@ -1,7 +1,7 @@
//============================================================================
// DPP example, EK-TM4C123GXL board, ThreadX RTOS
// Last updated for version 7.3.0
// Last updated on 2023-08-30
// Last updated for version 7.3.2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -385,13 +385,12 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
return TIMER5->TAV;
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_CRIT_STAT
QF_CRIT_ENTRY();
uint16_t b = QS_getByte();
QF_CRIT_EXIT();
if (b != QS_EOD) { // NOT end-of-data
// busy-wait as long as TXE not set
while ((UART0->FR & UART_FR_TXFE) == 0U) {
@ -405,7 +404,6 @@ void QS_onFlush(void) {
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}

View File

@ -1,7 +1,7 @@
//============================================================================
// DPP example, STM32F429 Discovery board, ThreadX kernel
// Last updated for version 7.3.0
// Last updated on 2023-08-30
// Last updated for version 7.3.3
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -419,13 +419,12 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
}
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_CRIT_STAT
QF_CRIT_ENTRY();
uint16_t b = QS_getByte();
QF_CRIT_EXIT();
if (b != QS_EOD) { // NOT end-of-data
// busy-wait as long as TXE not set
while ((USART2->SR & USART_FLAG_TXE) == 0U) {
@ -439,7 +438,6 @@ void QS_onFlush(void) {
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: DPP example, EK-TM4C123GLX board, uC/OS-II RTOS
// Last updated for @ref qpc_7_3_0
// Last updated on 2023-08-22
// Last updated for @ref qpc_7_3_2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -449,15 +449,12 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
return TIMER5->TAV;
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
QF_CRIT_STAT
// try to get next byte to transmit
QF_CRIT_ENTRY();
uint16_t b = QS_getByte();
QF_CRIT_EXIT();
if (b != QS_EOD) { // NOT end-of-data
// busy-wait as long as TX FIFO has data to transmit
while ((UART0->FR & UART_FR_TXFE) == 0U) {
@ -470,7 +467,6 @@ void QS_onFlush(void) {
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
NVIC_SystemReset();
}

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: "Dining Philosophers Problem" example, Zephyr RTOS kernel
// Last updated for: @ref qpc_7_3_0
// Last updated on 2023-08-24
// Last updated for: @ref qpc_7_3_2
// Last updated on 2023-12-13
//
// Q u a n t u m L e a P s
// ------------------------
@ -282,6 +282,9 @@ QSTimeCtr QS_onGetTime(void) { // NOTE: invoked with interrupts DISABLED
return k_cycle_get_32();
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
uint16_t len = 0xFFFFU; // to get as many bytes as available
uint8_t const *buf;
@ -307,7 +310,6 @@ void QS_doOutput(void) {
}
}
//............................................................................
//! callback function to reset the target (to be implemented in the BSP)
void QS_onReset(void) {
sys_reboot(SYS_REBOOT_COLD);
}

View File

@ -44,11 +44,11 @@
#define QP_H_
//============================================================================
#define QP_VERSION 731U
#define QP_VERSION_STR "7.3.1"
#define QP_VERSION 732U
#define QP_VERSION_STR "7.3.2"
//! Encrypted current QP release (7.3.1) and date (2023-12-05)
#define QP_RELEASE 0x7630E7D4U
//! Encrypted current QP release (7.3.2) and date (2023-12-14)
#define QP_RELEASE 0x762F8843U
//============================================================================
//! @cond INTERNAL
@ -300,6 +300,8 @@ struct QAsmVtable {
uint_fast8_t const qs_id);
void (*dispatch)(QAsm * const me, QEvt const * const e,
uint_fast8_t const qs_id);
bool (*isIn)(QAsm * const me, QStateHandler const s);
#ifdef Q_SPY
QStateHandler (*getStateHandler)(QAsm * const me);
#endif // Q_SPY
@ -340,8 +342,9 @@ QStateHandler QHsm_getStateHandler_(QAsm * const me);
// public:
//! @public @memberof QHsm
bool QHsm_isIn(QHsm * const me,
//! @private @memberof QHsm
bool QHsm_isIn_(
QAsm * const me,
QStateHandler const state);
//! @public @memberof QHsm
@ -406,7 +409,12 @@ static inline QStateHandler QMsm_getStateHandler_(QAsm * const me) {
}
#endif // def Q_SPY
//! @public @memberof QMsm
//! @private @memberof QMsm
bool QMsm_isIn_(
QAsm * const me,
QStateHandler const state);
//! @deprecated instead use: QASM_IS_IN()
bool QMsm_isInState(QMsm const * const me,
QMState const * const stateObj);
@ -474,6 +482,10 @@ QState QMsm_enterHistory_(
(*((QAsm *)(me_))->vptr->dispatch)((QAsm *)(me_), (e_), 0U)
#endif // ndef Q_SPY
//${QEP-macros::QASM_IS_IN} ..................................................
#define QASM_IS_IN(me_, state_) \
(*((QAsm *)(me_))->vptr->isIn)((QAsm *)(me_), (state_))
//${QEP-macros::Q_ASM_UPCAST} ................................................
#define Q_ASM_UPCAST(ptr_) ((QAsm *)(ptr_))

View File

@ -128,6 +128,9 @@ static inline void QF_psInit(
//! @deprecated instead use: QASM_DISPATCH()
#define QHSM_DISPATCH(me_, e_, qs_id_) QASM_DISPATCH((me_), (e_), (qs_id_))
//! @deprecated instead use: QASM_IS_IN()
#define QHsm_isIn(me_, state_) QHsm_isIn_((QAsm *)(me_), (state_))
//============================================================================
#if (QP_API_VERSION < 691)

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-09-08
//! @version Last updated for version: 7.3.0
//! @date Last updated on: 2023-12-12
//! @version Last updated for version: 7.3.1
//!
//! @file
//! @brief PC-Lint-Plus option file for linting QP/C source code
@ -93,6 +93,11 @@ qpc.lnt // QP/C options
-emacro(9079,
Q_EVT_CAST)
//! M4-R8.13(A) parameter of function could be pointer to const
//! @tr{DVR-QP-MC4-R08_13}
-efunc(818,
QMsm_isIn_)
// QF ------------------------------------------------------------------------
//! M4-D4.8(A) complete definition is unnecessary in this translation unit

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-09-01
//! @version Last updated for version: 7.3.0
//! @date Last updated on: 2023-12-12
//! @version Last updated for version: 7.3.1
//!
//! @file
//! @brief PC-Lint-Plus option file for analysing both **QP/C**
@ -97,7 +97,8 @@
Q_STATE_CAST,
Q_ACTION_CAST,
QASM_INIT,
QASM_DISPATCH)
QASM_DISPATCH,
QASM_IS_IN)
//! M4-D4.9(A) function-like macro
//! @tr{DVP-QP-MC4-D04_09B} (correct identification)

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-08-20
//! @version Last updated for: @ref qpc_7_3_0
//! @date Last updated on: 2023-12-13
//! @version Last updated for: @ref qpc_7_3_2
//!
//! @file
//! @brief QS/C "port" to QUTest with POSIX
@ -200,6 +200,9 @@ void QS_onReset(void) {
exit(0);
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
if (l_sock == INVALID_SOCKET) { // socket NOT initialized?
FPRINTF_S(stderr, "<TARGET> ERROR %s\n",
@ -210,12 +213,9 @@ void QS_onFlush(void) {
static struct timespec const c_timeout = { 0, QS_TIMEOUT_MS*1000000L };
QS_CRIT_STAT
QS_CRIT_ENTRY();
uint16_t nBytes = QS_TX_CHUNK;
uint8_t const *data;
while ((data = QS_getBlock(&nBytes)) != (uint8_t *)0) {
QS_CRIT_EXIT();
for (;;) { // for-ever until break or return
int nSent = send(l_sock, (char const *)data, (int)nBytes, 0);
if (nSent == SOCKET_ERROR) { // sending failed?
@ -243,9 +243,7 @@ void QS_onFlush(void) {
}
// set nBytes for the next call to QS_getBlock()
nBytes = QS_TX_CHUNK;
QS_CRIT_ENTRY();
}
QS_CRIT_EXIT();
}
//............................................................................
void QS_onTestLoop() {

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-08-20
//! @version Last updated for: @ref qpc_7_3_0
//! @date Last updated on: 2023-12-13
//! @version Last updated for: @ref qpc_7_3_2
//!
//! @file
//! @brief QS/C port to POSIX
@ -186,6 +186,9 @@ void QS_onReset(void) {
exit(0);
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
if (l_sock == INVALID_SOCKET) { // socket NOT initialized?
FPRINTF_S(stderr, "<TARGET> ERROR %s\n",
@ -194,12 +197,9 @@ void QS_onFlush(void) {
return;
}
QS_CRIT_STAT
QS_CRIT_ENTRY();
uint16_t nBytes = QS_TX_CHUNK;
uint8_t const *data;
while ((data = QS_getBlock(&nBytes)) != (uint8_t *)0) {
QS_CRIT_EXIT();
for (;;) { // for-ever until break or return
int nSent = send(l_sock, (char const *)data, (int)nBytes, 0);
if (nSent == SOCKET_ERROR) { // sending failed?
@ -227,9 +227,7 @@ void QS_onFlush(void) {
}
// set nBytes for the next call to QS_getBlock()
nBytes = QS_TX_CHUNK;
QS_CRIT_ENTRY();
}
QS_CRIT_EXIT();
}
//............................................................................
QSTimeCtr QS_onGetTime(void) {

View File

@ -22,7 +22,7 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-08-20
//! @date Last updated on: 2023-12-13
//! @version Last updated for: @ref qpc_7_3_0
//!
//! @file
@ -186,6 +186,9 @@ void QS_onReset(void) {
exit(0);
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
if (l_sock == INVALID_SOCKET) { // socket NOT initialized?
FPRINTF_S(stderr, "<TARGET> ERROR %s\n",
@ -194,12 +197,9 @@ void QS_onFlush(void) {
return;
}
QS_CRIT_STAT
QS_CRIT_ENTRY();
uint16_t nBytes = QS_TX_CHUNK;
uint8_t const *data;
while ((data = QS_getBlock(&nBytes)) != (uint8_t *)0) {
QS_CRIT_EXIT();
for (;;) { // for-ever until break or return
int nSent = send(l_sock, (char const *)data, (int)nBytes, 0);
if (nSent == SOCKET_ERROR) { // sending failed?
@ -227,9 +227,7 @@ void QS_onFlush(void) {
}
// set nBytes for the next call to QS_getBlock()
nBytes = QS_TX_CHUNK;
QS_CRIT_ENTRY();
}
QS_CRIT_EXIT();
}
//............................................................................
QSTimeCtr QS_onGetTime(void) {

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-07-27
//! @version Last updated for: @ref qpc_7_3_0
//! @date Last updated on: 2023-12-13
//! @version Last updated for: @ref qpc_7_3_2
//!
//! @file
//! @brief Qube command-line QP execution environment
@ -425,6 +425,9 @@ void QS_onReset(void) {
exit(0);
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
for (;;) {
uint16_t nBytes = 1024U;

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-08-20
//! @version Last updated for: @ref qpc_7_3_0
//! @date Last updated on: 2023-12-13
//! @version Last updated for: @ref qpc_7_3_2
//!
//! @file
//! @brief QS/C QUTest port for Win32
@ -189,6 +189,9 @@ void QS_onReset(void) {
exit(0);
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
if (l_sock == INVALID_SOCKET) { // socket NOT initialized?
FPRINTF_S(stderr, "<TARGET> ERROR %s\n",
@ -197,12 +200,9 @@ void QS_onFlush(void) {
return;
}
QS_CRIT_STAT
QS_CRIT_ENTRY();
uint16_t nBytes = QS_TX_CHUNK;
uint8_t const *data;
while ((data = QS_getBlock(&nBytes)) != (uint8_t *)0) {
QS_CRIT_EXIT();
for (;;) { // for-ever until break or return
int nSent = send(l_sock, (char const *)data, (int)nBytes, 0);
if (nSent == SOCKET_ERROR) { // sending failed?
@ -231,9 +231,7 @@ void QS_onFlush(void) {
}
// set nBytes for the next call to QS_getBlock()
nBytes = QS_TX_CHUNK;
QS_CRIT_ENTRY();
}
QS_CRIT_EXIT();
}
//............................................................................
void QS_onTestLoop() {

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-08-20
//! @version Last updated for: @ref qpc_7_3_0
//! @date Last updated on: 2023-12-13
//! @version Last updated for: @ref qpc_7_3_2
//!
//! @file
//! @brief QS/C port for Win32 API
@ -189,6 +189,9 @@ void QS_onReset(void) {
exit(0);
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
if (l_sock == INVALID_SOCKET) { // socket NOT initialized?
FPRINTF_S(stderr, "<TARGET> ERROR %s\n",
@ -197,12 +200,9 @@ void QS_onFlush(void) {
return;
}
QS_CRIT_STAT
QS_CRIT_ENTRY();
uint16_t nBytes = QS_TX_CHUNK;
uint8_t const *data;
while ((data = QS_getBlock(&nBytes)) != (uint8_t *)0) {
QS_CRIT_EXIT();
for (;;) { // for-ever until break or return
int nSent = send(l_sock, (char const *)data, (int)nBytes, 0);
if (nSent == SOCKET_ERROR) { // sending failed?
@ -231,9 +231,7 @@ void QS_onFlush(void) {
}
// set nBytes for the next call to QS_getBlock()
nBytes = QS_TX_CHUNK;
QS_CRIT_ENTRY();
}
QS_CRIT_EXIT();
}
//............................................................................
QSTimeCtr QS_onGetTime(void) {

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-08-20
//! @version Last updated for: @ref qpc_7_3_0
//! @date Last updated on: 2023-12-13
//! @version Last updated for: @ref qpc_7_3_2
//!
//! @file
//! @brief QS/C port for Win32 API
@ -189,6 +189,9 @@ void QS_onReset(void) {
exit(0);
}
//............................................................................
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
void QS_onFlush(void) {
if (l_sock == INVALID_SOCKET) { // socket NOT initialized?
FPRINTF_S(stderr, "<TARGET> ERROR %s\n",
@ -197,12 +200,9 @@ void QS_onFlush(void) {
return;
}
QS_CRIT_STAT
QS_CRIT_ENTRY();
uint16_t nBytes = QS_TX_CHUNK;
uint8_t const *data;
while ((data = QS_getBlock(&nBytes)) != (uint8_t *)0) {
QS_CRIT_EXIT();
for (;;) { // for-ever until break or return
int nSent = send(l_sock, (char const *)data, (int)nBytes, 0);
if (nSent == SOCKET_ERROR) { // sending failed?
@ -231,9 +231,7 @@ void QS_onFlush(void) {
}
// set nBytes for the next call to QS_getBlock()
nBytes = QS_TX_CHUNK;
QS_CRIT_ENTRY();
}
QS_CRIT_EXIT();
}
//............................................................................
QSTimeCtr QS_onGetTime(void) {

158
qpc.md5 Normal file
View File

@ -0,0 +1,158 @@
90fc8a980af695bfa3f988013add92d3 *qpc.qm
6cc951a51c096b15fb4bd5bbe6858f5c *include/qequeue.h
09cc5d96f3104f0e4e9a97a1a97f50cc *include/qk.h
c0f2b4afbe4ad5b3c983d13a2aef8286 *include/qmpool.h
ffd2bb1a17621dd96d1818453d3d7007 *include/qp.h
839a5d76aaf1295e2de5bb244969f797 *include/qp_pkg.h
9744614cdf886408baecbe3e25c93bd1 *include/qpc.h
4fd36843783d0ef22edab24c1d4e8a84 *include/qs.h
9f1a378f4d3da832ab82d6852854790f *include/qs_dummy.h
2cd5e647af390579448fe43c4e14cd66 *include/qs_pkg.h
2a36b08d4f3ec92da6ae6f7c18ad83ca *include/qsafe.h
7579f1ca5b11222be505572dbb503611 *include/qstamp.h
9d37db5c9d302e467d959d1f503c98b1 *include/qv.h
e62d2e1a594016cd6abeb202acc1df22 *include/qxk.h
aa4beb0c1c489d339f81acdf97fa02ed *src/qf/qep_hsm.c
e6f86be36d260d4d29eacf2e5cf96af6 *src/qf/qep_msm.c
719f0b4942629f3a1c7ccaeb0bb9f899 *src/qf/qf_act.c
1df4ac38d5b5dd4db072803289844b34 *src/qf/qf_actq.c
6f9aa15e2a7520b5e3109e6ed4577f9f *src/qf/qf_defer.c
c8566cd72695b34dd8dbb3cc4181495b *src/qf/qf_dyn.c
66fb9f47942a9531993a608e419033da *src/qf/qf_mem.c
c7212f7311a26fa254d27c05a5e114dd *src/qf/qf_ps.c
611e2e312e81fd4641efa440566ed7b5 *src/qf/qf_qact.c
727c67bd41ce3df2a0bb0c56e1626159 *src/qf/qf_qeq.c
c794ac103dbd43249bc468d5bfbeb0f5 *src/qf/qf_qmact.c
d94385d52a42a10a89ed8dd0c04d03ba *src/qf/qf_time.c
5154d4020f0aa85b3f88010539891a1a *src/qk/qk.c
88d9f4f833f51932d903ec5d2f0b419d *src/qs/qs.c
43467d9dca59bcc1f4c1448423c9f537 *src/qs/qs_64bit.c
42ece61af726200df85aca054fb69372 *src/qs/qs_fp.c
5d8d31897278491e20ae9c1af346a931 *src/qs/qs_rx.c
f6ef223fdf21a5ef90adb9df128f6a8f *src/qs/qstamp.c
beed46faa74b149daed4fc21f5566fb5 *src/qs/qutest.c
ce6a8898d316894034d05a4aca855927 *src/qv/qv.c
0c0eada51c939f24e355ec27bf94e654 *src/qxk/qxk.c
62030a8233e326ca50b6a8b64fe2aaca *src/qxk/qxk_mutex.c
ed71aaed42e2456c5ea7104d2e07e86b *src/qxk/qxk_sema.c
a8f8dcfaa7e640b124810ed98d7d9d83 *src/qxk/qxk_xthr.c
873d55917e4e42f50f3efc6b9a1ad2b7 *ports/arm-cm/qk/armclang/qk_port.c
5fcbb1d62dcc33ad8e0f38dfcf6f88a3 *ports/arm-cm/qk/armclang/qp_port.h
f6c251ec335af215b842ff2ef686e93f *ports/arm-cm/qk/armclang/qs_port.h
76ac27ae7b33b9c84561c6140cf2fa89 *ports/arm-cm/qk/config/qp_config.h
c8c8942455818922dd8cc2bb21fe136d *ports/arm-cm/qk/gnu/qk_port.c
12847297533c3226ccf66f189df8b4ca *ports/arm-cm/qk/gnu/qp_port.h
f6c251ec335af215b842ff2ef686e93f *ports/arm-cm/qk/gnu/qs_port.h
5a13a1e828e51ab70749b65bac2da6e7 *ports/arm-cm/qk/iar/qk_port.c
a5152099566e2b5f43787d67d5d86aef *ports/arm-cm/qk/iar/qp_port.h
f6c251ec335af215b842ff2ef686e93f *ports/arm-cm/qk/iar/qs_port.h
a13c0887eb882d089ec5cb57c8f755ac *ports/arm-cm/qv/armclang/qp_port.h
f6c251ec335af215b842ff2ef686e93f *ports/arm-cm/qv/armclang/qs_port.h
8aa1d92d93bbc54bbc881a0ecc035860 *ports/arm-cm/qv/armclang/qv_port.c
6dc814aae7a65a6c9f151c6c2d077e16 *ports/arm-cm/qv/config/qp_config.h
6213045e2390e7a59644f40e1aaa189c *ports/arm-cm/qv/gnu/qp_port.h
f6c251ec335af215b842ff2ef686e93f *ports/arm-cm/qv/gnu/qs_port.h
5094485a6b14856ea14f523be704d56a *ports/arm-cm/qv/gnu/qv_port.c
517ee111b0df9926e6ba3d30be5210ea *ports/arm-cm/qv/iar/qp_port.h
f6c251ec335af215b842ff2ef686e93f *ports/arm-cm/qv/iar/qs_port.h
13e57e92ba30ab8bb697a914cabcffcb *ports/arm-cm/qv/iar/qv_port.c
40058ac0609321670e6e7816670e97af *ports/arm-cm/qxk/armclang/qp_port.h
f6c251ec335af215b842ff2ef686e93f *ports/arm-cm/qxk/armclang/qs_port.h
ae587133b180bdb5506d18faf64e9b52 *ports/arm-cm/qxk/armclang/qxk_port.c
d71bcb2761640bf3e95da47972805ad8 *ports/arm-cm/qxk/config/qp_config.h
35ec850c15f42e2eab924d06bf2d4165 *ports/arm-cm/qxk/gnu/qp_port.h
a0699895649b5d644e4068794b0e94dc *ports/arm-cm/qxk/gnu/qs_port.h
fca301449f83a519a3c7e311da25303b *ports/arm-cm/qxk/gnu/qxk_port.c
9145c3ae665b20e224bd91406668754c *ports/arm-cm/qxk/iar/qp_port.h
f6c251ec335af215b842ff2ef686e93f *ports/arm-cm/qxk/iar/qs_port.h
baa978074b1e87bcd5c227ca9a7445ca *ports/arm-cm/qxk/iar/qxk_port.c
f2a30b03ee9c2c0e1133976ee1e14b72 *ports/arm-cm/qutest/qp_port.h
c755db99d10db142bcb98018f55e2b7a *ports/arm-cm/qutest/qs_port.h
435664bf6d59fd321cdab9bc59f3225d *ports/arm-cr/qk/config/qp_config.h
957f53c5d716ee9f88d4d8b7418f8757 *ports/arm-cr/qk/gnu/qp_port.h
2d756fbf15d4c00837320a329eddf065 *ports/arm-cr/qk/gnu/qs_port.h
6a6a54ca44b045c2977cfaf621d32836 *ports/arm-cr/qk/iar/qp_port.h
2d756fbf15d4c00837320a329eddf065 *ports/arm-cr/qk/iar/qs_port.h
7aab625aad16d5b55ab530a7f468e70b *ports/arm-cr/qk/ti/qp_port.h
2d756fbf15d4c00837320a329eddf065 *ports/arm-cr/qk/ti/qs_port.h
b91fd7d938880060e3914db32a1a7885 *ports/arm-cr/qv/gnu/qp_port.h
2d756fbf15d4c00837320a329eddf065 *ports/arm-cr/qv/gnu/qs_port.h
e7b34d68bbf61b9e5c1706c8c2e2b4d3 *ports/arm-cr/qv/iar/qp_port.h
2d756fbf15d4c00837320a329eddf065 *ports/arm-cr/qv/iar/qs_port.h
734d65377844b288a3e5dcc5200302b6 *ports/arm-cr/qv/ti/qp_port.h
2d756fbf15d4c00837320a329eddf065 *ports/arm-cr/qv/ti/qs_port.h
975c3375c8ca11093bc92dbfb7000eaa *ports/msp430/qk/qp_port.h
dd181f9664fbe39a2900b99493a06191 *ports/msp430/qk/qs_port.h
3c7664e8ee8739bdd42bda3020ce5364 *ports/msp430/qv/qp_port.h
dd181f9664fbe39a2900b99493a06191 *ports/msp430/qv/qs_port.h
36e96bdca741c0fcde6562d843998861 *ports/msp430/qutest/qp_port.h
dd181f9664fbe39a2900b99493a06191 *ports/msp430/qutest/qs_port.h
c2ed34e686a5ac9afe06026731247bf4 *ports/pic32/qk/xc32/qk_port.c
e9dbc68a7233a4303a068b562be12049 *ports/pic32/qk/xc32/qp_port.h
2d756fbf15d4c00837320a329eddf065 *ports/pic32/qk/xc32/qs_port.h
ab9eacbab706ff105144eddecde681e0 *ports/pic32/qv/xc32/qp_port.h
2d756fbf15d4c00837320a329eddf065 *ports/pic32/qv/xc32/qs_port.h
91ca74cbac601ea77b9ffac46c44d68c *ports/pic32/qutest/xc32/qp_port.h
2d756fbf15d4c00837320a329eddf065 *ports/pic32/qutest/xc32/qs_port.h
bd9096e08c29f2b0fd2a5e83743d89df *ports/config/qp_config.h
2f9351770bf8fb3a7c41a98dc13f46f6 *ports/embos/qf_port.c
e858f83bd95f19d41443810e209befdc *ports/embos/qp_port.h
75df7abe15807abb5e7bf5ec08116aff *ports/embos/qs_port.h
959e595357a0c62b7b3c6dde08c887d0 *ports/freertos/qf_port.c
2f23e1356ef64095771c4dcc896e7890 *ports/freertos/qp_port.h
2d756fbf15d4c00837320a329eddf065 *ports/freertos/qs_port.h
318b73a8a574b8c2c9f212402f8d0d7b *ports/threadx/qf_port.c
52331cb3732a082bbda9fba6b6d8564b *ports/threadx/qp_port.h
96a132818a53ac1c6e46ace36dc75663 *ports/threadx/qs_port.h
97dbc9c6b8b0c2b46499b9070688dd3c *ports/threadx/README.md
4c2ef995035b4c902d9429c5b4e5e0b0 *ports/uc-os2/qf_port.c
b5f2aef2bd916c0c35eebb3b1e55bc7a *ports/uc-os2/qp_port.h
96a132818a53ac1c6e46ace36dc75663 *ports/uc-os2/qs_port.h
6ce09e456ded120d13d73a92e022fa3d *ports/qep-only/qp_port.h
f26311a1912e214477781255c7c71834 *ports/qep-only/safe_std.h
a414bb9f4041c7922665be37ec0d956b *ports/posix/qf_port.c
daa86cfb2a67ff8679ac4921ac0ba542 *ports/posix/qp_port.h
5902d6c50e3d3e87c4cbeb66485c01c9 *ports/posix/qs_port.c
306c23ae37e9b02f2f37f2d21331f28d *ports/posix/qs_port.h
6690cf3899e6461ed7604dba13cf7520 *ports/posix/README.md
f26311a1912e214477781255c7c71834 *ports/posix/safe_std.h
bf05c408b544eec04afa8d53c5a423b7 *ports/posix-qv/qf_port.c
b54e6fd734021f59024c255ed857b569 *ports/posix-qv/qp_port.h
94d91c859c62fd464f6ce61c9d4e82b1 *ports/posix-qv/qs_port.c
306c23ae37e9b02f2f37f2d21331f28d *ports/posix-qv/qs_port.h
a39965a1d1c41b224c8f328c9e28999b *ports/posix-qv/README.md
f26311a1912e214477781255c7c71834 *ports/posix-qv/safe_std.h
0c4c8b4b614528d34e4d8be10836d5c9 *ports/posix-qutest/qp_port.h
306c23ae37e9b02f2f37f2d21331f28d *ports/posix-qutest/qs_port.h
8b594d58ad38f7584f8c5338a3301c4e *ports/posix-qutest/qutest_port.c
7ad8c6857cb58384a1d124f48c0d7501 *ports/posix-qutest/README.md
f26311a1912e214477781255c7c71834 *ports/posix-qutest/safe_std.h
cd0040a8cc2c6051b2f8ea42f798d601 *ports/win32/Makefile
c5f08f89a2e411deba21ae2b74ffe2b5 *ports/win32/qf_port.c
d3d1743ecb60a4d464310da0238c07e0 *ports/win32/qp_port.h
89eb564328782d13956434f5d6a00ebf *ports/win32/qs_port.c
018ec5ae698a31c6fb0f2c002194c5bd *ports/win32/qs_port.h
635a4a93c62e4b3501c5e3371a08cd65 *ports/win32/qwin_gui.c
a8f227294c6673a22b050e1165a911e3 *ports/win32/qwin_gui.h
9af4450a3685e578e1774e5b707f6692 *ports/win32/README.md
f26311a1912e214477781255c7c71834 *ports/win32/safe_std.h
646ee957d104969de8723498b412dd73 *ports/win32-qv/qf_port.c
0a699a7aaaa710eb7a6670389d698aa0 *ports/win32-qv/qp_port.h
89eb564328782d13956434f5d6a00ebf *ports/win32-qv/qs_port.c
018ec5ae698a31c6fb0f2c002194c5bd *ports/win32-qv/qs_port.h
c935dbe9f32dd4d0584d4b47bc734d19 *ports/win32-qv/qwin_gui.c
37499e3a99c8c38d52d9b61be19319b7 *ports/win32-qv/qwin_gui.h
4cb22092a4b28d1c1b2efc1e58900b99 *ports/win32-qv/README.md
f26311a1912e214477781255c7c71834 *ports/win32-qv/safe_std.h
b7e27e6064994b2ac28de538fc980e0c *ports/win32-qutest/qp_port.h
018ec5ae698a31c6fb0f2c002194c5bd *ports/win32-qutest/qs_port.h
90efc263d134af535c528d7b88a7bb1e *ports/win32-qutest/qutest_port.c
faed3388f63c9ec3dca2a5c6cf808a95 *ports/win32-qutest/README.md
f26311a1912e214477781255c7c71834 *ports/win32-qutest/safe_std.h
2d72fa12f8a0c05bd23c0fc4fa41838c *zephyr/CMakeLists.txt
1c41081d80b88d187161f56605d1ea64 *zephyr/Kconfig
2140500a5b230057a2a6ed4b613f6353 *zephyr/module.yml
194564d5aa6b66d01ec1e8d39482889e *zephyr/qf_port.c
b00a40d7a66418fd8e7cae14babdc2b5 *zephyr/qp_port.h
64b537ae433a0d0c0949c4bca7b45603 *zephyr/qs_port.h
7079ec76204f2aab68c2202b9e9070c3 *zephyr/README.md

117
qpc.qm
View File

@ -423,6 +423,8 @@ me-&gt;temp.fun = Q_STATE_CAST(0);</code>
uint_fast8_t const qs_id);
void (*dispatch)(QAsm * const me, QEvt const * const e,
uint_fast8_t const qs_id);
bool (*isIn)(QAsm * const me, QStateHandler const s);
#ifdef Q_SPY
QStateHandler (*getStateHandler)(QAsm * const me);
#endif // Q_SPY
@ -444,7 +446,8 @@ manual coding</documentation>
<parameter name="initial" type="QStateHandler const"/>
<code>static struct QAsmVtable const vtable = { // QAsm virtual table
&amp;QHsm_init_,
&amp;QHsm_dispatch_
&amp;QHsm_dispatch_,
&amp;QHsm_isIn_
#ifdef Q_SPY
,&amp;QHsm_getStateHandler_
#endif
@ -774,23 +777,25 @@ me-&gt;temp.uint = ~me-&gt;state.uint;
<parameter name="me" type="QAsm * const"/>
<code>return me-&gt;state.fun;</code>
</operation>
<!--${QEP::QHsm::isIn}-->
<operation name="isIn" type="bool" visibility="0x00" properties="0x00">
<documentation>//! @public @memberof QHsm
<!--${QEP::QHsm::isIn_}-->
<operation name="isIn_" type="bool" visibility="0x00" properties="0x01">
<documentation>//! @private @memberof QHsm
//! @public @memberof QHsm</documentation>
<!--${QEP::QHsm::isIn::state}-->
//! @private @memberof QHsm</documentation>
<!--${QEP::QHsm::isIn_::me}-->
<parameter name="me" type="QAsm * const"/>
<!--${QEP::QHsm::isIn_::state}-->
<parameter name="state" type="QStateHandler const"/>
<code>QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_REQUIRE_INCRIT(602, me-&gt;super.state.uint
== (uintptr_t)(~me-&gt;super.temp.uint));
Q_REQUIRE_INCRIT(602, me-&gt;state.uint
== (uintptr_t)(~me-&gt;temp.uint));
QF_CRIT_EXIT();
bool inState = false; // assume that this HSM is not in 'state'
// scan the state hierarchy bottom-up
QStateHandler s = me-&gt;super.state.fun;
QStateHandler s = me-&gt;state.fun;
int_fast8_t limit = QHSM_MAX_NEST_DEPTH_ + 1; // loop hard limit
QState r = Q_RET_SUPER;
for (; (r != Q_RET_IGNORED) &amp;&amp; (limit &gt; 0); --limit) {
@ -800,7 +805,7 @@ for (; (r != Q_RET_IGNORED) &amp;&amp; (limit &gt; 0); --limit) {
}
else {
r = QHSM_RESERVED_EVT_(s, Q_EMPTY_SIG);
s = me-&gt;super.temp.fun;
s = me-&gt;temp.fun;
}
}
@ -809,7 +814,7 @@ Q_ENSURE_INCRIT(690, limit &gt; 0);
QF_CRIT_EXIT();
#ifndef Q_UNSAFE
me-&gt;super.temp.uint = ~me-&gt;super.state.uint;
me-&gt;temp.uint = ~me-&gt;state.uint;
#endif
return inState; // return the status</code>
@ -1039,7 +1044,8 @@ for manual coding</documentation>
<parameter name="initial" type="QStateHandler const"/>
<code>static struct QAsmVtable const vtable = { // QAsm virtual table
&amp;QMsm_init_,
&amp;QMsm_dispatch_
&amp;QMsm_dispatch_,
&amp;QMsm_isIn_
#ifdef Q_SPY
,&amp;QMsm_getStateHandler_
#endif
@ -1321,18 +1327,46 @@ me-&gt;temp.uint = ~me-&gt;state.uint;
<parameter name="me" type="QAsm * const"/>
<code>return me-&gt;state.obj-&gt;stateHandler;</code>
</operation>
<!--${QEP::QMsm::isIn_}-->
<operation name="isIn_" type="bool" visibility="0x00" properties="0x01">
<documentation>//! @private @memberof QMsm
//! @private @memberof QMsm</documentation>
<!--${QEP::QMsm::isIn_::me}-->
<parameter name="me" type="QAsm * const"/>
<!--${QEP::QMsm::isIn_::state}-->
<parameter name="state" type="QStateHandler const"/>
<code>bool inState = false; // assume that this SM is not in 'state'
QMState const *s = me-&gt;state.obj;
int_fast8_t limit = QMSM_MAX_NEST_DEPTH_ + 1; // loop hard limit
for (; (s != (QMState *)0) &amp;&amp; (limit &gt; 0); --limit) {
if (s-&gt;stateHandler == state) { // match found?
inState = true;
break;
}
else {
s = s-&gt;superstate; // advance to the superstate
}
}
QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_ENSURE_INCRIT(690, limit &gt; 0);
QF_CRIT_EXIT();
return inState;</code>
</operation>
<!--${QEP::QMsm::isInState}-->
<operation name="isInState" type="bool" visibility="0x00" properties="0x00">
<specifiers>const</specifiers>
<documentation>//! @public @memberof QMsm
//! @public @memberof QMsm</documentation>
<documentation>//! @deprecated instead use: QASM_IS_IN()</documentation>
<!--${QEP::QMsm::isInState::stateObj}-->
<parameter name="stateObj" type="QMState const * const"/>
<code>bool inState = false; // assume that this SM is not in 'state'
QMState const *s = me-&gt;super.state.obj;
int_fast8_t limit = 6; // loop hard limit
int_fast8_t limit = QMSM_MAX_NEST_DEPTH_ + 1; // loop hard limit
for (; (s != (QMState *)0) &amp;&amp; (limit &gt; 0); --limit) {
if (s == stateObj) { // match found?
inState = true;
@ -1345,7 +1379,7 @@ for (; (s != (QMState *)0) &amp;&amp; (limit &gt; 0); --limit) {
QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_ENSURE_INCRIT(690, limit &gt; 0);
Q_ENSURE_INCRIT(790, limit &gt; 0);
QF_CRIT_EXIT();
return inState;</code>
@ -1653,6 +1687,15 @@ return r;</code>
<code>\
(*((QAsm *)(me_))-&gt;vptr-&gt;dispatch)((QAsm *)(me_), (e_), 0U)</code>
</operation>
<!--${QEP-macros::QASM_IS_IN}-->
<operation name="QASM_IS_IN" type="void" visibility="0x03" properties="0x00">
<!--${QEP-macros::QASM_IS_IN::me_}-->
<parameter name="me_" type="&lt;QAsm subclass*&gt;"/>
<!--${QEP-macros::QASM_IS_IN::state_}-->
<parameter name="state_" type="QStateHandler"/>
<code>\
(*((QAsm *)(me_))-&gt;vptr-&gt;isIn)((QAsm *)(me_), (state_))</code>
</operation>
<!--${QEP-macros::Q_ASM_UPCAST}-->
<operation name="Q_ASM_UPCAST" type="" visibility="0x03" properties="0x00">
<!--${QEP-macros::Q_ASM_UPCAST::ptr_}-->
@ -2133,7 +2176,8 @@ QHsm_ctor((QHsm *)(me), initial);
// subclasses of QActive (e.g., in the debugger).
static struct QAsmVtable const vtable = { // QActive virtual table
&amp;QHsm_init_,
&amp;QHsm_dispatch_
&amp;QHsm_dispatch_,
&amp;QHsm_isIn_
#ifdef Q_SPY
,&amp;QHsm_getStateHandler_
#endif
@ -2917,7 +2961,8 @@ QMsm_ctor((QMsm *)(me), initial);
// subclasses of QActive (e.g., in the debugger).
static struct QAsmVtable const vtable = { // QMActive virtual table
&amp;QMsm_init_,
&amp;QMsm_dispatch_
&amp;QMsm_dispatch_,
&amp;QMsm_isIn_
#ifdef Q_SPY
,&amp;QMsm_getStateHandler_
#endif
@ -3375,7 +3420,8 @@ return inactive;</code>
static struct QAsmVtable const vtable = { // QTicker virtual table
&amp;QTicker_init_,
&amp;QTicker_dispatch_
&amp;QTicker_dispatch_,
&amp;QHsm_isIn_
#ifdef Q_SPY
,&amp;QHsm_getStateHandler_
#endif
@ -8094,7 +8140,8 @@ QS_CRIT_EXIT();</code>
//! @public @memberof QHsmDummy</documentation>
<code>static struct QAsmVtable const vtable = {
&amp;QHsmDummy_init_,
&amp;QHsmDummy_dispatch_
&amp;QHsmDummy_dispatch_,
&amp;QHsm_isIn_
#ifdef Q_SPY
,&amp;QHsm_getStateHandler_
#endif
@ -8170,7 +8217,8 @@ QActive_ctor(&amp;me-&gt;super, Q_STATE_CAST(0));
static struct QAsmVtable const vtable = {
&amp;QActiveDummy_init_,
&amp;QActiveDummy_dispatch_
&amp;QActiveDummy_dispatch_,
&amp;QHsm_isIn_
#ifdef Q_SPY
,&amp;QHsm_getStateHandler_
#endif
@ -8787,11 +8835,11 @@ $declare1 ${QP-FuSa}
#define QP_H_
//============================================================================
#define QP_VERSION 731U
#define QP_VERSION_STR &quot;7.3.1&quot;
#define QP_VERSION 732U
#define QP_VERSION_STR &quot;7.3.2&quot;
//! Encrypted current QP release (7.3.1) and date (2023-12-05)
#define QP_RELEASE 0x7630E7D4U
//! Encrypted current QP release (7.3.2) and date (2023-12-14)
#define QP_RELEASE 0x762F8843U
//============================================================================
//! @cond INTERNAL
@ -9578,6 +9626,9 @@ static inline void QF_psInit(
//! @deprecated instead use: QASM_DISPATCH()
#define QHSM_DISPATCH(me_, e_, qs_id_) QASM_DISPATCH((me_), (e_), (qs_id_))
//! @deprecated instead use: QASM_IS_IN()
#define QHsm_isIn(me_, state_) QHsm_isIn_((QAsm *)(me_), (state_))
//============================================================================
#if (QP_API_VERSION &lt; 691)
@ -9686,7 +9737,7 @@ $define ${QEP::QP_versionStr[8]}
$define ${QEP::QEvt::reserved_[4]}
enum {
// maximum depth of state nesting in a HSM (including the top level),
// maximum depth of state nesting in a QHsm (including the top level),
// must be &gt;= 3
QHSM_MAX_NEST_DEPTH_ = 6
};
@ -9739,6 +9790,11 @@ $define ${QEP::QHsm}</text>
Q_DEFINE_THIS_MODULE(&quot;qep_msm&quot;)
enum {
// maximum depth of state nesting in a QMsm (including the top level)
QMSM_MAX_NEST_DEPTH_ = 6
};
// top-state object for QMsm-style state machines
static struct QMState const l_msm_top_s = {
(struct QMState *)0,
@ -10856,6 +10912,7 @@ void QS_assertion_pre_(
QS_endRec_();
QS_onFlush();
// busy-wait until all QS data makes it over to the host
for (uint32_t volatile delay_ctr = delay;
delay_ctr &gt; 0U; --delay_ctr)
{}
@ -12230,14 +12287,16 @@ Q_NORETURN Q_onError(
char const * const module,
int_t const id)
{
// NOTE: called in a critical section
QS_beginRec_((uint_fast8_t)QS_ASSERT_FAIL);
QS_TIME_PRE_();
QS_U16_PRE_(id);
QS_STR_PRE_((module != (char *)0) ? module : &quot;?&quot;);
QS_endRec_();
QS_onFlush(); // flush the assertion record to the host
QS_onCleanup(); // cleanup after the failure
QS_onCleanup(); // cleanup before resetting
QS_onReset(); // reset the target to prevent the code from continuing
for (;;) { // QS_onReset() should not return, but to ensure no-return
}

View File

@ -1,199 +0,0 @@
8b8d56e339046359297fac0a6855b9d530797780a933e2530c3acb75ebe06162 include/qequeue.h
9604ce926107e1cd4388f560f8d9c45d8d99ef6137435fec9c23c2c9c7946dc0 include/qk.h
051d7f3547da2b1ca6c6ae9135020fd19364d4815adb6b4e89d08d1d690cb460 include/qmpool.h
83ca2ae4ffe44073eb7d4935ab9a273a70c5785668cc75a62499d6ac544f25ac include/qp.h
81958d337c9de3adc09c6b2029eb7c0ecc1971bd4c91d88e8f7f3f5d1e35cec3 include/qpc.h
d80140d884ab56d772aebbddc4261562f2fbd9c311fa14d632d7853798c1a43f include/qp_pkg.h
88e91affbdbe31acbce8b5393be8135415c0467821cc3cd1ecb13f23b79b4d19 include/qs.h
0b753874088d6483a6d7c52d482d07f631fcfddd873a12ba947f50327f68851b include/qsafe.h
f08bbc7f47fff3ba6efb7a07aee671550f8235c043c7fc0f00d928ca262b7a43 include/qstamp.h
b25eed33ede77bdbbfc638461a561d2d7f959b3aed0f7e8ebe71c793bbd2950e include/qs_dummy.h
925aec72edd4d2488975780bb9fe1f514d4757e92bdb5e48feac72aff949de20 include/qs_pkg.h
6211a986d01df9b9fac8bd3463db10832fbcf0f23c27764183c4d87aec1790e8 include/qv.h
42365efaa4bd3fc7722f2bb92f09110b4580db7e700df9a55b5112c007ccc77d include/qxk.h
35c2a3fe3388ef22658d27e365a41cdfc4863e89de0be4c488596048ba5076ae ports/arm-cm/qk/armclang/qk_port.c
79a9d9c179e491c8f40041f09f29888294915d4419f514100e3a47cc0ea9fb23 ports/arm-cm/qk/armclang/qp_port.h
36f6901265584f986751c266926fd408060bd58aa44df3d84885637d34f903ff ports/arm-cm/qk/armclang/qs_port.h
d4f2cb42524902299bfb49a85296682802023cd704c5f08bb75545767e8e29b1 ports/arm-cm/qk/config/qp_config.h
8cf1be22e0a88facd7c3c55a5f8ddad124f56bc494da19d75f8aca31464eb5ce ports/arm-cm/qk/gnu/qk_port.c
10dabc3fb16b50fce8a998b312d0556877b95c4a2260f957a915ba0b09d5396a ports/arm-cm/qk/gnu/qp_port.h
36f6901265584f986751c266926fd408060bd58aa44df3d84885637d34f903ff ports/arm-cm/qk/gnu/qs_port.h
9abc2c4f1de665cb37ebd3faab74dea02df6e37e2202b68a6980d13c8376f185 ports/arm-cm/qk/iar/qk_port.c
65129e261409d6ee27e6cfcedf81268705f6de16220533b793dfa87f1333d455 ports/arm-cm/qk/iar/qp_port.h
36f6901265584f986751c266926fd408060bd58aa44df3d84885637d34f903ff ports/arm-cm/qk/iar/qs_port.h
e614d285256839e4d4b0766c408bf4f27a0aad28f7f79efa51cd7cb0adc4a80a ports/arm-cm/qutest/qp_port.h
f075cd0aef2a1286c8370fc45826e8adac4756363788e91e21e75ef601ccf2fa ports/arm-cm/qutest/qs_port.h
d2e64313791f33c5eca8e07f4b31f07082b7d36cee23f0669250d99228aa9dd7 ports/arm-cm/qv/armclang/qp_port.h
36f6901265584f986751c266926fd408060bd58aa44df3d84885637d34f903ff ports/arm-cm/qv/armclang/qs_port.h
d2a781619a9afc080609a1e6880822ce13f3b9ae28280de816083fde1c16887a ports/arm-cm/qv/armclang/qv_port.c
5719c732219b33212279eca83f72c7c2fef18f074cbca073bec29b588fe58818 ports/arm-cm/qv/config/qp_config.h
475f6c3afe894eddaa48ce0a64ad0fd88140c432a43c1bb573c5d677cbcf9817 ports/arm-cm/qv/gnu/qp_port.h
36f6901265584f986751c266926fd408060bd58aa44df3d84885637d34f903ff ports/arm-cm/qv/gnu/qs_port.h
78837257aba6ca4dfab7f14564fb35d37cac8e662452391c22f12d959a844bad ports/arm-cm/qv/gnu/qv_port.c
308b825848e65596771466c444d37e96b5b24ca0773ac9b2cc02313eb08adafd ports/arm-cm/qv/iar/qp_port.h
36f6901265584f986751c266926fd408060bd58aa44df3d84885637d34f903ff ports/arm-cm/qv/iar/qs_port.h
74dbed4b56d13f22fabf33ac7d40442eab612f5b6bf2908b5681416cc78503af ports/arm-cm/qv/iar/qv_port.c
2d9bb7e9fbaefc33fe3e54f4461957c7ec17a4fbbca987c4358e6e6c153bbc70 ports/arm-cm/qxk/armclang/qp_port.h
36f6901265584f986751c266926fd408060bd58aa44df3d84885637d34f903ff ports/arm-cm/qxk/armclang/qs_port.h
ab23c51e0e584aaf768925cc0aedd1bce86abcd2138c68f2dc61a46c7d4db039 ports/arm-cm/qxk/armclang/qxk_port.c
3f09c2c09c7ba3b86e5b3f27cb28a2cbf377106a7e4a32323a39ec4133e55636 ports/arm-cm/qxk/config/qp_config.h
907a64e2c4b2a74381b0ea2758685d3ed4824b808bcc2484f719cf86fdc07616 ports/arm-cm/qxk/gnu/qp_port.h
5d3e7c55a43cd0cfe27947fab1f755afa86eb4b9236788c61e4ee353bac5f599 ports/arm-cm/qxk/gnu/qs_port.h
bd4cfb2ed33f4f9d5e1aa59693145d2b19e6abe9d357338bf58a9909a6e27ad0 ports/arm-cm/qxk/gnu/qxk_port.c
52c99884cf5905a649cf1e4d77a12da719e127c2dde53b2960156a2548ce7d74 ports/arm-cm/qxk/iar/qp_port.h
36f6901265584f986751c266926fd408060bd58aa44df3d84885637d34f903ff ports/arm-cm/qxk/iar/qs_port.h
4390bf82228dbad802c4c00abff82088c9d063153c0684fa49c81d2b12148d9d ports/arm-cm/qxk/iar/qxk_port.c
61d36fed7425ed8f03c833e5f5d5b0da36495bbad45b90893bcd29a3a432f0bb ports/arm-cm/qxk/llvm/README.txt
42b6d77594f3336cb129af601f5a36acd29116aaeb09fb98aa52b687303ae2fc ports/arm-cm/README.md
86dfc1a41b2bcd69a67d39375188309d614705c0cd060952d04171411a4f9ad3 ports/arm-cr/qk/config/qp_config.h
b8e04851c3fdd2a65f59cf793d2691c93a8bd989a03a0db3e3ae293c473fcbd3 ports/arm-cr/qk/gnu/qp_port.h
df1aa59bb139c33ce3baccea4d65bff6bb851ec85679f1bf49ab0648edf9f245 ports/arm-cr/qk/gnu/qs_port.h
ea74f4f2da1628f217a80e2d893653280ed56c4f671f01776f3ba86d266f7a38 ports/arm-cr/qk/iar/qp_port.h
df1aa59bb139c33ce3baccea4d65bff6bb851ec85679f1bf49ab0648edf9f245 ports/arm-cr/qk/iar/qs_port.h
d6aace1f2236aa1782d0c59932b2fa67c08b788d79f1f3e6a559fd6981b1b019 ports/arm-cr/qk/ti/qp_port.h
df1aa59bb139c33ce3baccea4d65bff6bb851ec85679f1bf49ab0648edf9f245 ports/arm-cr/qk/ti/qs_port.h
89aa7f3f6354a3a84d9e158612a847463c55844113c423c0386345dff316234d ports/arm-cr/qv/config/qp_config.h
4169f53fb025e8f19b54c32c5320e60697b4d3ff9b7dca92fbe77d2c5e352d7e ports/arm-cr/qv/gnu/qp_port.h
df1aa59bb139c33ce3baccea4d65bff6bb851ec85679f1bf49ab0648edf9f245 ports/arm-cr/qv/gnu/qs_port.h
055deb586d5c0a84136928820d554c111a6ff5c51d168126e9564813c6aea94c ports/arm-cr/qv/iar/qp_port.h
df1aa59bb139c33ce3baccea4d65bff6bb851ec85679f1bf49ab0648edf9f245 ports/arm-cr/qv/iar/qs_port.h
f1989ed492d57df46171f9b9795510737a6be71ef057c9c757f9c4cfda51c40a ports/arm-cr/qv/ti/qp_port.h
df1aa59bb139c33ce3baccea4d65bff6bb851ec85679f1bf49ab0648edf9f245 ports/arm-cr/qv/ti/qs_port.h
e313c6c17bcb6f1c71b661445167dd71cb7ba3fbf01cd89a9558146439d4d030 ports/config/qp_config.h
4af9593d9f24f6281535657efdaee27767981549ef97a133f486f4554e60ea36 ports/embos/qf_port.c
5bcc20749a2cc93a16f350a85df6837dee02db84e9b82e9dbecf28a9ecb1d4ac ports/embos/qp_port.h
37c8e1986d788090ecaeb5b0ee6d1c4d6e3a0003d05beb35ef57a8b88487f5b1 ports/embos/qs_port.h
a3c020cb080fed126af2962d8d509e70b7eaea411a18494236c0208ccc22bee2 ports/esp-idf/qf_port.c
49080034a11f076fe36b914be6df7e7c92a5a5a8c3892165e1d8e7b94da6d11e ports/esp-idf/qp_port.h
df1aa59bb139c33ce3baccea4d65bff6bb851ec85679f1bf49ab0648edf9f245 ports/esp-idf/qs_port.h
7d747365c0ccd14c4971e1433cb4c7eb693dc172f6623dff5b22ae5116a7e960 ports/esp-idf/README.md
30c1f575f09ca1841f322e2d1ab597a529e68808b24fcbc3c9d8c31bcfa59a9d ports/freertos/qf_port.c
98989b9756d84c1cbf403f9e2d4a98acae2b70d990372b0dd9a18c75fcf617a4 ports/freertos/qp_port.h
df1aa59bb139c33ce3baccea4d65bff6bb851ec85679f1bf49ab0648edf9f245 ports/freertos/qs_port.h
002821ee6610360f38701461689fd43d7d8278052bddbbf42e3e9c50cfa0aea0 ports/lint-plus/16bit/cpu.lnt
629a9bf2c5d50079a59becddc930f91a5a4addce81462b288ea578e6c37572c8 ports/lint-plus/16bit/qs_port.h
7fad54e3af2e399df105ab94b26684abd59d46b77c78a34c2dae92bde3dd18ae ports/lint-plus/16bit/stdint.h
f9fba84406cf69f6a112535903c2550eeb62d36221c694a3276f4a32a1db668c ports/lint-plus/32bit/cpu.lnt
c86621018906ede714a8a4ddd0f54e77588d8b787b84627f9e40d48aa04dccd7 ports/lint-plus/32bit/qs_port.h
3647a97fb66256b7477418a782249132e821c4bffee94d1bd96200633dd5c07c ports/lint-plus/32bit/stdint.h
034bcab98311689a93786599218d93ba6257f1d214446f2fb238ca1538d9c40f ports/lint-plus/au-barr.lnt
f021b228f0af091270e17333f35cc4d56678aae5c6efcebb39c64ae6d1ac6a21 ports/lint-plus/au-ds.lnt
2032fbfc41eeac759180330cbd598f08d41cfe9ae4cd71ab595ff8b796ea9cc5 ports/lint-plus/au-misra4.lnt
cd7c2b0574a9be5f74d5e2d51066153b115a293f159e72cf3c720194b64e2038 ports/lint-plus/au-ql-c99.lnt
46229192657dfb0d95419e40e094c8908fc34adf5e82fa71ae18739253242080 ports/lint-plus/lint_qf.log
5ae1e46b7367ce70f45f213b4f28743e8ad5100109b76929223633e7e0281b82 ports/lint-plus/lint_qk.log
073f1ba7b65ddfbd534fd84dc6c698d4a6e4f03162d336cf8cef628c53ba5868 ports/lint-plus/lint_qs.log
d43f388ad47cdc6ccc148ee8adeb580154c44377542f043f16d33ee1aed0d180 ports/lint-plus/lint_qv.log
fdbfb6a485e2c3c19e2359a997c0fe08b8e9ab70cc8decb8796928e350e5bed7 ports/lint-plus/lint_qxk.log
2d7e4acf2c02e07120b0854b1141f9023094ce9164258be9503fd2b85202ae42 ports/lint-plus/make.bat
024d0a692399635b1bdecb38b919f12636359b150fa2f7eaaae452561e8184b2 ports/lint-plus/options.lnt
460af8fac27d52c1427c4c1181eb251590478717ddbc873b1ea6c1ec6ece3488 ports/lint-plus/qk/qp_port.h
a2665c83c3357860d52915aaff6497499e7ec4ace9b1102217cd916e56154f7a ports/lint-plus/ql-style.lnt
96188f4b40c1cc7bb439f33bf6a77c490d1d7c58a16447bfc8b8f9bbde13ad8e ports/lint-plus/qpc.lnt
b82c8e8d68cf8bef30f2584843d3d0b526cfd3f323c70575d92c89cace30fcb6 ports/lint-plus/qv/qp_port.h
93d0a8f9648ec4ef5a1766fdd3f1e434255f763c9ce8ac304cd73107a6fea932 ports/lint-plus/qxk/qp_port.h
023d093fd26babffbff3de30a3e07f1d65b7b3ed8a969c5a36736dfa7062156c ports/lint-plus/std.lnt
7c793943c3e6649f8ee04019cf3ae70f35e11c16c3b88fabf01cdaa26b24daf0 ports/lint-plus/stdbool.h
f8061755072d975852b7b34383eb271a1171a45b81b178c719929c32794c4377 ports/msp430/qk/qp_port.h
a3a10044ff05824ebbe33e66c4c84635a78981314bb8cd195f76692d84a364e9 ports/msp430/qk/qs_port.h
065c6771d31e5d8dd48decb4fed44a705372d9ee4395fa512e2c229498d74c36 ports/msp430/qutest/qp_port.h
a3a10044ff05824ebbe33e66c4c84635a78981314bb8cd195f76692d84a364e9 ports/msp430/qutest/qs_port.h
b65d3e2d98647b65edb5df66be2c9686127de34e0355000dfe16e23b88ec57d8 ports/msp430/qv/qp_port.h
a3a10044ff05824ebbe33e66c4c84635a78981314bb8cd195f76692d84a364e9 ports/msp430/qv/qs_port.h
5f8ce0594ad46184c255c39016974696d0e01ed8ab0db8208d7ee4bde1d9f5a7 ports/msp430/README.md
802dd77af4048cb89db5989aed73e1cf89861b71f6be483438b82614b51019b6 ports/pic32/qk/xc32/qk_port.c
c7b29f966e8d3d0289e78c0e4422da89c2c2773258823e2b8022e58620640ce3 ports/pic32/qk/xc32/qp_port.h
df1aa59bb139c33ce3baccea4d65bff6bb851ec85679f1bf49ab0648edf9f245 ports/pic32/qk/xc32/qs_port.h
6c809eeb292f1f76e4d90a6f04fdcca43e49d2390aeaa278f0cb7ac302a174a5 ports/pic32/qutest/xc32/qp_port.h
df1aa59bb139c33ce3baccea4d65bff6bb851ec85679f1bf49ab0648edf9f245 ports/pic32/qutest/xc32/qs_port.h
45a8e1a636127d562cc60b0a1b4c7fec1b70bed62dac9f375e03d268c0c6bc9f ports/pic32/qv/xc32/qp_port.h
df1aa59bb139c33ce3baccea4d65bff6bb851ec85679f1bf49ab0648edf9f245 ports/pic32/qv/xc32/qs_port.h
6dcd3091f8115971875fa5e3c8aec6305cbfc63dc204f4ef3b169c31d0a45153 ports/posix/qf_port.c
1a17653377fb952a5399837baf56832d905fba2c6a624052415a89baa1e3dacc ports/posix/qp_port.h
4a3e0972730b352cab598cd1f88a6e0d730e10cdd6973229e030b4f6d43577dd ports/posix/qs_port.c
7de8db6db071167ac2e378fb4dd230bc6048af82a904c7f6a7455f8321f07702 ports/posix/qs_port.h
cd74d192006f86d5855d25e8b29b4c9e698dbc659fea3c11c1be992853fd5d07 ports/posix/README.md
36571350408c0588430d2a84a1e29111a932bc0bf11caa4edd765026c7c03ef8 ports/posix/safe_std.h
399ad69a1f088627a429adbb7fd86d2864439d34dae0d105d335d08bd47cbb80 ports/posix-qutest/qp_port.h
7de8db6db071167ac2e378fb4dd230bc6048af82a904c7f6a7455f8321f07702 ports/posix-qutest/qs_port.h
d58a6400c4c23975d0c53440191c1b1bc0e81f6a9a28f52c387203a713e37bcb ports/posix-qutest/qutest_port.c
5fa89ee29a59ee9faeb5b7c9451480d712dbfbb62f13a4f3ba201adf026ead6c ports/posix-qutest/README.md
36571350408c0588430d2a84a1e29111a932bc0bf11caa4edd765026c7c03ef8 ports/posix-qutest/safe_std.h
a9f7bc380a234dde7dadf0f601dd3477994439ee27afc715ffd12887a4a01fa2 ports/posix-qv/qf_port.c
3eda6a3ec604bdf2512a85744c2976669231c5f7df314bb578cbecccc5d27d8a ports/posix-qv/qp_port.h
abe7fa13ac872012993971e3c4ee91314d13c20ea2aea02a08cf2cabb622ff2b ports/posix-qv/qs_port.c
7de8db6db071167ac2e378fb4dd230bc6048af82a904c7f6a7455f8321f07702 ports/posix-qv/qs_port.h
b5eeaab70640ea7d21776be457838850cabda37d7811047afc02dd8284f77856 ports/posix-qv/README.md
36571350408c0588430d2a84a1e29111a932bc0bf11caa4edd765026c7c03ef8 ports/posix-qv/safe_std.h
9a67124e33c4b7750f876eaf281e66d9cac20bf47a032175e110651fb5713552 ports/qep-only/qp_port.h
36571350408c0588430d2a84a1e29111a932bc0bf11caa4edd765026c7c03ef8 ports/qep-only/safe_std.h
6f3e6913ff8e9bdaf3169d8cb3b32fa6fbb371d23027dbf34907313edbb61432 ports/qube/qp_port.h
a5fd631eef518ea2c874b487291d5013e831b50fc51efae459fde4496aa90bb3 ports/qube/qs_port.h
da94cf5c01292bed07e5952c1b7f3c84f7688ed5211e50d3cbbd4a7a49950281 ports/qube/qube.c
3b8ab30532bcff5cd9cbe32ced8a253fdcb6288206a04c4232b5e577ebb6864e ports/qube/README.txt
36571350408c0588430d2a84a1e29111a932bc0bf11caa4edd765026c7c03ef8 ports/qube/safe_std.h
746761180c1722950a4317f68ad6fd2d99bdb9f67c7524bd1c81de87748451c9 ports/risc-v/qv/gnu/qp_port.h
773652922d77de04a8c9b74edc3077b6932013b4d3c3a1aa76fe6bc54313df53 ports/risc-v/qv/gnu/qs_port.h
8c6aec7f001e90a6a1dcb6fb520afe48c994e8a334b105096e66bd40caf493f1 ports/risc-v/qv/README.md
425aff96a38a978c22971f0c804002e31b9f1e099beb5dcb729b1fea2544d767 ports/threadx/qf_port.c
36b760ee6518a8188d6fad59c90b28e4503af5677bc3541075cc9a87e42a8831 ports/threadx/qp_port.h
d4c51ba6444f22eb1677b5218788547e6a4750b06434077893a64203b8456775 ports/threadx/qs_port.h
d50b43a5fc2f6e06e15088f8edfcae2e8b2042e04964b2c31e9f8a4c7487ac55 ports/threadx/README.md
b0c623a822fc9bd1318e7c03796ab902701d5b3d3a127d4d9271e6681a6b0927 ports/uc-os2/qf_port.c
e49d1f600d79798e8b570e11c227238d30f2db2f84830b7edddb76c34bfcba5a ports/uc-os2/qp_port.h
d4c51ba6444f22eb1677b5218788547e6a4750b06434077893a64203b8456775 ports/uc-os2/qs_port.h
b30dbd0bfcd4544e93dc4354b436f8587247f14c4bacc6ebbed6bdd08374686a ports/win32/Makefile
e8e28c9e0fa9e7a3a72c83680e87d7cd364604bfef5773590e671f522871dee3 ports/win32/qf_port.c
8000c872698b55fff0b0fee4b317e511e05874207095368bba74fb1275b421fb ports/win32/qp_port.h
2b95e055beb9711726b98a3940dd349f681828f731be66710ec1995f2b10aadc ports/win32/qs_port.c
26844e65da53d25109c81ede57980f0b3ee52338e643495701e6904c0788430a ports/win32/qs_port.h
b7bb01b22c929ceeca3bf9567b68c353ca202030a1c2e3b5c1091ac9770c0f45 ports/win32/qwin_gui.c
71fe6e88fe1e8b95e9d11b689094e73e04edb107abd27175e55b021f69b1cdd6 ports/win32/qwin_gui.h
bf4455826daf0b67d383196e00ec32ef8499ccc8ce8b9547c89008a95f7e9e67 ports/win32/README.md
36571350408c0588430d2a84a1e29111a932bc0bf11caa4edd765026c7c03ef8 ports/win32/safe_std.h
182eb5cfaf7d2906a92845ad9ea1b566f8c02ec2f3dc7017b127d17e7b74189a ports/win32-qutest/qp_port.h
26844e65da53d25109c81ede57980f0b3ee52338e643495701e6904c0788430a ports/win32-qutest/qs_port.h
242f54ea3b3864817fbc5f9fe96dd9b19562e1eec6a051f991e34b30c877a3c0 ports/win32-qutest/qutest_port.c
88e02b2c95659dc25359bf0a5f8e808fb32f372f78793684119414ea9edd2804 ports/win32-qutest/README.md
36571350408c0588430d2a84a1e29111a932bc0bf11caa4edd765026c7c03ef8 ports/win32-qutest/safe_std.h
d604c988379ca919c58c6008268d45ad841ce08c7282ffc3207d9f68ad1f5751 ports/win32-qv/qf_port.c
e1e7e4489956948cccb55d23508bf16f25268bbbbb4d69a81826a996599b23cb ports/win32-qv/qp_port.h
2b95e055beb9711726b98a3940dd349f681828f731be66710ec1995f2b10aadc ports/win32-qv/qs_port.c
26844e65da53d25109c81ede57980f0b3ee52338e643495701e6904c0788430a ports/win32-qv/qs_port.h
3e6d59cf42356cdca02fe9282cdd0cc3598bc178e19811f31a3405e8c20a8be4 ports/win32-qv/qwin_gui.c
20cece106a3f0e75278c7c5dc980e74a80072a0044a4be811124f5d411d75844 ports/win32-qv/qwin_gui.h
0a7285b6c324b65f77b913ab514b7c88a2c5c382815ef4646be16f446badd6b3 ports/win32-qv/README.md
36571350408c0588430d2a84a1e29111a932bc0bf11caa4edd765026c7c03ef8 ports/win32-qv/safe_std.h
ca5fb4ef580f327eb2225a85186c197727fb190af2401721a31ffc505214b6f3 ports/zephyr/README.md
007f5e994f4107f7587a906baaffbb53cdc0314346dd2d46c5582f9128fd27ac qpc.qm
3969c57f4f6c153b80de6cee22f77dbcd3cb9094ac7eee12d5aeb5436355c7d9 src/qf/qep_hsm.c
569e2219d2aa4a9c4d9fcaf469e03aee21e30ab47e3c95bd6906f71fd5151186 src/qf/qep_msm.c
7efa2d38ea4e4cd31b2978518083955d1d2cd454fa5b970f84ac3bd745be36ea src/qf/qf_act.c
1944ef681653ba5f1391e0b07be2fb1b259df6856964e66a35e72bc1ad7a0b52 src/qf/qf_actq.c
a6f37b91631d225988c01e0fdfa67bf6084b4bc3977168256a93e7fefd12f8bc src/qf/qf_defer.c
3eaaeb888d02a147cb674df55498de633256b27d7e7b71de3896d822889a816a src/qf/qf_dyn.c
4e736e0e38af286bc50c37871c5b20031aa36eed173ee9efb8b961571f765c0e src/qf/qf_mem.c
d53cb77a8d3f9d08a3444f4e4617363f0e554e6f79bd69f82b42307b9370ec83 src/qf/qf_ps.c
8195a07f64cb5874b4f302ed79625b058c00475e4bfccde2b0fd80db67e68f9c src/qf/qf_qact.c
ac60466c58ce79c208620060bee2198e70ec8709f5887034dfc62e3aa930eae2 src/qf/qf_qeq.c
04886ebb5bdeddc0d935f7e22cae8f7180085f9ef36821cd8e012d0fafed01e7 src/qf/qf_qmact.c
c089aa0a1a4ca69340fafc542465c5b1a870915ce5df2745d0f97e32ca17b463 src/qf/qf_time.c
b8690165c902d0c5319f317ebab0a3cddc0c97246a8065491e733ad19d5fabf7 src/qk/qk.c
d811897d335ce952e01eae76420612a1fcb547f32f698039b89da9af598aaaa8 src/qs/qs.c
e920c00c47eeefca8912b0bfcfe3cbe8fc33f4cbe8581cdadea87aef2311c45e src/qs/qstamp.c
5a463c1e0d1d36c5b0f0a316838623ed0873c86fd2e65cd840cbda088aaca80c src/qs/qs_64bit.c
bfcf373f22651aaba53cf50bb4d449c24f4f7910f8d34d6ecd4fb88757838242 src/qs/qs_fp.c
60ba07a0847c79dd282c88bd660151171e68f52c426a9c87a541d31ad9fee369 src/qs/qs_rx.c
de1393f82a66b40bf2c5683ce4856d1d20ac99a690b788e8bd2544b180da9cdd src/qs/qutest.c
25bdefafeeeba8e9cdae48faddf5b48826c4143acec8f8d0d6c402612614f038 src/qv/qv.c
6685d6ece401e0bd7436b03a624b1894ca2b86aab55996537ad7d0e7a0568a5e src/qxk/qxk.c
e2c41882972c815374859673b40405a4e8ca70193ef0facf7eda711c76e8bfde src/qxk/qxk_mutex.c
295fea200489ba3613aa29f368e9e84ecb05bafeac2399ba5aa96adf36a1474a src/qxk/qxk_sema.c
90533b63aacfe82c7464708809467e5bf9166c685ad91adceea2eb9087be78bc src/qxk/qxk_xthr.c
34234689822c1c12355f32aa3831eaf637d2de2b4ecb5f556caa4b0284441b08 zephyr/CMakeLists.txt
68ec317e1540a0b535d3a157208a765d128d28b80d61e2966017aabdf3eb8e53 zephyr/Kconfig
4de1df3aa8fcb9966f18c4f6ce858cb1a4e7398d0d97e00912416ff68186bf3c zephyr/module.yml
eea0977c5b74bf75284bfa124550aad13254eb82bd79a7f937e2cbc6df89c866 zephyr/qf_port.c
5c543328217094155c982b99d6713f95a09fb10850c4f751993e18c4ee519521 zephyr/qp_port.h
ec6cc1da9fd7ee413b2c90d61c9630f00912e5dce2acad43c438e93db9afc804 zephyr/qs_port.h
7e5a1cfe4f6fcb9ac4a0ac3a3fc9117e3880a92830a7edb0cd47e349bd143a26 zephyr/README.md

42
qpc_md5.bat Normal file
View File

@ -0,0 +1,42 @@
@setlocal
:: usage
@echo Usage: qpc_md5 [gen]
@echo examples:
@echo qpc_md5 : check the md5 sums in the file qpcp.md5
@echo qpc_md5 gen : generate the md5 file qpcp.md5
@echo.
@if NOT "%1"=="gen" goto check
@echo generating qpcp.md5...
@md5sum qpc.qm ^
include/* ^
src/qf/* src/qk/* src/qs/* src/qv/* src/qxk/* ^
ports/arm-cm/qk/armclang/* ports/arm-cm/qk/config/* ports/arm-cm/qk/gnu/* ports/arm-cm/qk/iar/* ^
ports/arm-cm/qv/armclang/* ports/arm-cm/qv/config/* ports/arm-cm/qv/gnu/* ports/arm-cm/qv/iar/* ^
ports/arm-cm/qxk/armclang/* ports/arm-cm/qxk/config/* ports/arm-cm/qxk/gnu/* ports/arm-cm/qxk/iar/* ^
ports/arm-cm/qutest/* ^
ports/arm-cr/qk/config/* ^
ports/arm-cr/qk/gnu/* ports/arm-cr/qk/iar/* ports/arm-cr/qk/ti/* ^
ports/arm-cr/qv/gnu/* ports/arm-cr/qv/iar/* ports/arm-cr/qv/ti/* ^
ports/msp430/qk/* ports/msp430/qv/* ports/msp430/qutest/* ^
ports/pic32/qk/xc32/* ports/pic32/qv/xc32/* ports/pic32/qutest/xc32/* ^
ports/config/* ^
ports/embos/* ^
ports/freertos/* ^
ports/threadx/* ^
ports/uc-os2/* ^
ports/qep-only/* ^
ports/posix/* ports/posix-qv/* ports/posix-qutest/* ^
ports/win32/* ports/win32-qv/* ports/win32-qutest/* ^
zephyr/* ^
> qpc.md5
@echo done
@goto end
:check
md5sum --check --warn qpc.md5
:end
@endlocal

View File

@ -80,7 +80,7 @@ QEvt const QEvt_reserved_[4] = {
//$enddef${QEP::QEvt::reserved_[4]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
enum {
// maximum depth of state nesting in a HSM (including the top level),
// maximum depth of state nesting in a QHsm (including the top level),
// must be >= 3
QHSM_MAX_NEST_DEPTH_ = 6
};
@ -124,7 +124,8 @@ void QHsm_ctor(QHsm * const me,
{
static struct QAsmVtable const vtable = { // QAsm virtual table
&QHsm_init_,
&QHsm_dispatch_
&QHsm_dispatch_,
&QHsm_isIn_
#ifdef Q_SPY
,&QHsm_getStateHandler_
#endif
@ -448,21 +449,22 @@ QStateHandler QHsm_getStateHandler_(QAsm * const me) {
}
#endif // def Q_SPY
//${QEP::QHsm::isIn} .........................................................
//! @public @memberof QHsm
bool QHsm_isIn(QHsm * const me,
//${QEP::QHsm::isIn_} ........................................................
//! @private @memberof QHsm
bool QHsm_isIn_(
QAsm * const me,
QStateHandler const state)
{
QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_REQUIRE_INCRIT(602, me->super.state.uint
== (uintptr_t)(~me->super.temp.uint));
Q_REQUIRE_INCRIT(602, me->state.uint
== (uintptr_t)(~me->temp.uint));
QF_CRIT_EXIT();
bool inState = false; // assume that this HSM is not in 'state'
// scan the state hierarchy bottom-up
QStateHandler s = me->super.state.fun;
QStateHandler s = me->state.fun;
int_fast8_t limit = QHSM_MAX_NEST_DEPTH_ + 1; // loop hard limit
QState r = Q_RET_SUPER;
for (; (r != Q_RET_IGNORED) && (limit > 0); --limit) {
@ -472,7 +474,7 @@ bool QHsm_isIn(QHsm * const me,
}
else {
r = QHSM_RESERVED_EVT_(s, Q_EMPTY_SIG);
s = me->super.temp.fun;
s = me->temp.fun;
}
}
@ -481,7 +483,7 @@ bool QHsm_isIn(QHsm * const me,
QF_CRIT_EXIT();
#ifndef Q_UNSAFE
me->super.temp.uint = ~me->super.state.uint;
me->temp.uint = ~me->state.uint;
#endif
return inState; // return the status

View File

@ -56,6 +56,11 @@
Q_DEFINE_THIS_MODULE("qep_msm")
enum {
// maximum depth of state nesting in a QMsm (including the top level)
QMSM_MAX_NEST_DEPTH_ = 6
};
// top-state object for QMsm-style state machines
static struct QMState const l_msm_top_s = {
(struct QMState *)0,
@ -91,7 +96,8 @@ void QMsm_ctor(QMsm * const me,
{
static struct QAsmVtable const vtable = { // QAsm virtual table
&QMsm_init_,
&QMsm_dispatch_
&QMsm_dispatch_,
&QMsm_isIn_
#ifdef Q_SPY
,&QMsm_getStateHandler_
#endif
@ -359,15 +365,42 @@ void QMsm_dispatch_(
#endif
}
//${QEP::QMsm::isIn_} ........................................................
//! @private @memberof QMsm
bool QMsm_isIn_(
QAsm * const me,
QStateHandler const state)
{
bool inState = false; // assume that this SM is not in 'state'
QMState const *s = me->state.obj;
int_fast8_t limit = QMSM_MAX_NEST_DEPTH_ + 1; // loop hard limit
for (; (s != (QMState *)0) && (limit > 0); --limit) {
if (s->stateHandler == state) { // match found?
inState = true;
break;
}
else {
s = s->superstate; // advance to the superstate
}
}
QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_ENSURE_INCRIT(690, limit > 0);
QF_CRIT_EXIT();
return inState;
}
//${QEP::QMsm::isInState} ....................................................
//! @public @memberof QMsm
bool QMsm_isInState(QMsm const * const me,
QMState const * const stateObj)
{
bool inState = false; // assume that this SM is not in 'state'
QMState const *s = me->super.state.obj;
int_fast8_t limit = 6; // loop hard limit
int_fast8_t limit = QMSM_MAX_NEST_DEPTH_ + 1; // loop hard limit
for (; (s != (QMState *)0) && (limit > 0); --limit) {
if (s == stateObj) { // match found?
inState = true;
@ -380,7 +413,7 @@ bool QMsm_isInState(QMsm const * const me,
QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_ENSURE_INCRIT(690, limit > 0);
Q_ENSURE_INCRIT(790, limit > 0);
QF_CRIT_EXIT();
return inState;

View File

@ -376,7 +376,8 @@ void QTicker_ctor(QTicker * const me,
static struct QAsmVtable const vtable = { // QTicker virtual table
&QTicker_init_,
&QTicker_dispatch_
&QTicker_dispatch_,
&QHsm_isIn_
#ifdef Q_SPY
,&QHsm_getStateHandler_
#endif

View File

@ -82,7 +82,8 @@ void QActive_ctor(QActive * const me,
// subclasses of QActive (e.g., in the debugger).
static struct QAsmVtable const vtable = { // QActive virtual table
&QHsm_init_,
&QHsm_dispatch_
&QHsm_dispatch_,
&QHsm_isIn_
#ifdef Q_SPY
,&QHsm_getStateHandler_
#endif

View File

@ -84,7 +84,8 @@ void QMActive_ctor(QMActive * const me,
// subclasses of QActive (e.g., in the debugger).
static struct QAsmVtable const vtable = { // QMActive virtual table
&QMsm_init_,
&QMsm_dispatch_
&QMsm_dispatch_,
&QMsm_isIn_
#ifdef Q_SPY
,&QMsm_getStateHandler_
#endif

View File

@ -874,6 +874,7 @@ void QS_assertion_pre_(
QS_endRec_();
QS_onFlush();
// busy-wait until all QS data makes it over to the host
for (uint32_t volatile delay_ctr = delay;
delay_ctr > 0U; --delay_ctr)
{}

View File

@ -115,14 +115,16 @@ Q_NORETURN Q_onError(
char const * const module,
int_t const id)
{
// NOTE: called in a critical section
QS_beginRec_((uint_fast8_t)QS_ASSERT_FAIL);
QS_TIME_PRE_();
QS_U16_PRE_(id);
QS_STR_PRE_((module != (char *)0) ? module : "?");
QS_endRec_();
QS_onFlush(); // flush the assertion record to the host
QS_onCleanup(); // cleanup after the failure
QS_onCleanup(); // cleanup before resetting
QS_onReset(); // reset the target to prevent the code from continuing
for (;;) { // QS_onReset() should not return, but to ensure no-return
}
@ -357,7 +359,8 @@ void QTimeEvt_tick1_(
void QHsmDummy_ctor(QHsmDummy * const me) {
static struct QAsmVtable const vtable = {
&QHsmDummy_init_,
&QHsmDummy_dispatch_
&QHsmDummy_dispatch_,
&QHsm_isIn_
#ifdef Q_SPY
,&QHsm_getStateHandler_
#endif
@ -423,7 +426,8 @@ void QActiveDummy_ctor(QActiveDummy * const me) {
static struct QAsmVtable const vtable = {
&QActiveDummy_init_,
&QActiveDummy_dispatch_
&QActiveDummy_dispatch_,
&QHsm_isIn_
#ifdef Q_SPY
,&QHsm_getStateHandler_
#endif

View File

@ -120,7 +120,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U066BFF505153848667095842 -O207 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM)</Name>
<Name>-U066BFF505153848667095842 -O207 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(0BC11477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32C0x_32.FLM -FS08000000 -FL08000 -FP0($$Device:STM32C031C6Tx$CMSIS\Flash\STM32C0x_32.FLM) -WA0 -WE0 -WVCE4 -WS2710 -WM0 -WP2</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -152,50 +152,66 @@
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>316</LineNumber>
<LineNumber>0</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134218244</Address>
<Address>134223226</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\..\..\3rd_party\nucleo-c031c6\arm\startup_stm32c031xx.s</Filename>
<Filename></Filename>
<ExecCommand></ExecCommand>
<Expression>\\test\../../../3rd_party/nucleo-c031c6/arm/startup_stm32c031xx.s\316</Expression>
<Expression></Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>78</LineNumber>
<LineNumber>316</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219190</Address>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\bsp_nucleo-c031c6.c</Filename>
<BreakIfRCount>0</BreakIfRCount>
<Filename>..\..\..\3rd_party\nucleo-c031c6\arm\startup_stm32c031xx.s</Filename>
<ExecCommand></ExecCommand>
<Expression>\\test\bsp_nucleo-c031c6.c\78</Expression>
<Expression></Expression>
</Bp>
<Bp>
<Number>2</Number>
<Type>0</Type>
<LineNumber>118</LineNumber>
<LineNumber>78</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134243930</Address>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\bsp_nucleo-c031c6.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>3</Number>
<Type>0</Type>
<LineNumber>118</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\test_sched.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\test\test_sched.c\118</Expression>
<Expression></Expression>
</Bp>
</Breakpoint>
<WatchWindow1>
@ -603,7 +619,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>26</FileNumber>
<FileNumber>25</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -615,7 +631,7 @@
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>27</FileNumber>
<FileNumber>26</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -627,7 +643,7 @@
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>28</FileNumber>
<FileNumber>27</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -647,7 +663,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>30</FileNumber>
<FileNumber>28</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -659,7 +675,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>31</FileNumber>
<FileNumber>29</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -671,7 +687,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>32</FileNumber>
<FileNumber>30</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -683,7 +699,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>33</FileNumber>
<FileNumber>31</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -695,7 +711,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>34</FileNumber>
<FileNumber>32</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -707,7 +723,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>35</FileNumber>
<FileNumber>33</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>

View File

@ -10,7 +10,7 @@
<TargetName>qutest</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
@ -186,6 +186,7 @@
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>