11<?xml version =" 1.0" encoding =" UTF-8" ?>
2- <model version =" 7.0.0 " links =" 1" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" http://www.state-machine.com/qm/qm7.xsd" >
2+ <model version =" 7.0.1 " links =" 1" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" http://www.state-machine.com/qm/qm7.xsd" >
33 <documentation >About this example:
44-------------------
55Dining Philosopher Problem console application for workstations
@@ -461,6 +461,18 @@ me->fork[n] = FREE;</action>
461461 </package >
462462 <!-- ${.}-->
463463 <directory name =" ." >
464+ <!-- ${.::qp_config.h}-->
465+ <file name =" qp_config.h" >
466+ <text >#ifndef QP_CONFIG_H_
467+ #define QP_CONFIG_H_
468+
469+ // put here macros that override the default QP/C settings
470+
471+ // Activate the QF console access
472+ #define QF_CONSOLE
473+
474+ #endif // QP_CONFIG_H_</text >
475+ </file >
464476 <!-- ${.::bsp.h}-->
465477 <file name =" bsp.h" >
466478 <text >#ifndef BSP_H_
@@ -494,6 +506,10 @@ void BSP_ledOff(void);
494506
495507//Q_DEFINE_THIS_FILE
496508
509+ #if (QP_VERSION < 800U)
510+ #error this application requires qpc version 8.0.0 or higher
511+ #endif
512+
497513// local variables -----------------------------------------------------------
498514static uint32_t l_rnd; // random seed
499515
@@ -561,7 +577,7 @@ void BSP_start(void) {
561577 static QEvt const *philoQueueSto[N_PHILO][10];
562578 for (uint8_t n = 0U; n < N_PHILO; ++n) {
563579 Philo_ctor(n);
564- QACTIVE_START (AO_Philo[n],
580+ QActive_start (AO_Philo[n],
565581 n + 3U, // QP prio. of the AO
566582 philoQueueSto[n], // event queue storage
567583 Q_DIM(philoQueueSto[n]), // queue length [events]
@@ -571,7 +587,7 @@ void BSP_start(void) {
571587
572588 static QEvt const *tableQueueSto[N_PHILO];
573589 Table_ctor();
574- QACTIVE_START (AO_Table,
590+ QActive_start (AO_Table,
575591 N_PHILO + 7U, // QP prio. of the AO
576592 tableQueueSto, // event queue storage
577593 Q_DIM(tableQueueSto), // queue length [events]
@@ -621,7 +637,7 @@ void QF_onCleanup(void) {
621637}
622638//............................................................................
623639void QF_onClockTick(void) {
624- QF_TICK_X (0U, & l_clock_tick); // perform the QF clock tick processing
640+ QTIMEEVT_TICK_X (0U, & l_clock_tick); // perform clock tick processing
625641
626642 QS_RX_INPUT(); // handle the QS-RX input
627643 QS_OUTPUT(); // handle the QS output
@@ -632,11 +648,11 @@ void QF_onClockTick(void) {
632648 break;
633649 }
634650 case 'p': {
635- QF_PUBLISH (Q_NEW(QEvt, PAUSE_SIG), & l_clock_tick);
651+ QACTIVE_PUBLISH (Q_NEW(QEvt, PAUSE_SIG), & l_clock_tick);
636652 break;
637653 }
638654 case 's': {
639- QF_PUBLISH (Q_NEW(QEvt, SERVE_SIG), & l_clock_tick);
655+ QACTIVE_PUBLISH (Q_NEW(QEvt, SERVE_SIG), & l_clock_tick);
640656 break;
641657 }
642658 default: {
0 commit comments