1- /* ****************************************************************************
1+ /* $file${.::blinky.ino} ####################################################*/
2+ /*
23* Model: blinky.qm
3- * File: ./ blinky.ino
4+ * File: ${.:: blinky.ino}
45*
5- * This code has been generated by QM tool (see state-machine.com/qm).
6+ * This code has been generated by QM tool (https:// state-machine.com/qm).
67* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
78*
89* This program is open source software: you can redistribute it and/or
1314* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
1415* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1516* for more details.
16- **************************************************************************** * /
17- /* ${.::blinky.ino} ......................................................... */
17+ */
18+ /* $endhead$ {.::blinky.ino} ################################################# */
1819#include " qpn.h" // QP-nano framework
1920#include " Arduino.h" // Arduino API
2021
2122// ============================================================================
2223// declare all AO classes...
23-
24- #if ((QP_VERSION < 591) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8)))
25- #error qpn version 5.9.1 or higher required
26- #endif
27-
24+ /* $declare${AOs::Blinky} ###################################################*/
2825/* ${AOs::Blinky} ...........................................................*/
2926typedef struct Blinky {
3027/* protected: */
@@ -35,7 +32,7 @@ typedef struct Blinky {
3532static QState Blinky_initial (Blinky * const me);
3633static QState Blinky_off (Blinky * const me);
3734static QState Blinky_on (Blinky * const me);
38-
35+ /* $enddecl${AOs::Blinky} ################################################### */
3936// ...
4037
4138// AO instances and event queue buffers for them...
@@ -110,10 +107,15 @@ void Q_onAssert(char const Q_ROM * const file, int line) {
110107
111108// ============================================================================
112109// define all AO classes (state machine)...
110+ /* $define${AOs::Blinky} ####################################################*/
111+ /* Check for the minimum required QP version */
112+ #if ((QP_VERSION < 601) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8)))
113+ #error qpn version 6.0.1 or higher required
114+ #endif
113115/* ${AOs::Blinky} ...........................................................*/
114116/* ${AOs::Blinky::SM} .......................................................*/
115117static QState Blinky_initial (Blinky * const me) {
116- /* ${AOs::Blinky::SM::initial} */
118+ /* ${AOs::Blinky::SM::initial} */
117119 QActive_armX ((QActive *)me, 0U ,
118120 BSP_TICKS_PER_SEC/2U , BSP_TICKS_PER_SEC/2U );
119121 return Q_TRAN (&Blinky_off);
@@ -122,13 +124,13 @@ static QState Blinky_initial(Blinky * const me) {
122124static QState Blinky_off (Blinky * const me) {
123125 QState status_;
124126 switch (Q_SIG (me)) {
125- /* ${AOs::Blinky::SM::off} */
127+ /* ${AOs::Blinky::SM::off} */
126128 case Q_ENTRY_SIG: {
127129 digitalWrite (LED_L, LOW);
128130 status_ = Q_HANDLED ();
129131 break ;
130132 }
131- /* ${AOs::Blinky::SM::off::Q_TIMEOUT} */
133+ /* ${AOs::Blinky::SM::off::Q_TIMEOUT} */
132134 case Q_TIMEOUT_SIG: {
133135 status_ = Q_TRAN (&Blinky_on);
134136 break ;
@@ -144,13 +146,13 @@ static QState Blinky_off(Blinky * const me) {
144146static QState Blinky_on (Blinky * const me) {
145147 QState status_;
146148 switch (Q_SIG (me)) {
147- /* ${AOs::Blinky::SM::on} */
149+ /* ${AOs::Blinky::SM::on} */
148150 case Q_ENTRY_SIG: {
149151 digitalWrite (LED_L, HIGH);
150152 status_ = Q_HANDLED ();
151153 break ;
152154 }
153- /* ${AOs::Blinky::SM::on::Q_TIMEOUT} */
155+ /* ${AOs::Blinky::SM::on::Q_TIMEOUT} */
154156 case Q_TIMEOUT_SIG: {
155157 status_ = Q_TRAN (&Blinky_off);
156158 break ;
@@ -162,6 +164,5 @@ static QState Blinky_on(Blinky * const me) {
162164 }
163165 return status_;
164166}
165-
167+ /* $enddef${AOs::Blinky} #################################################### */
166168// ...
167-
0 commit comments