Skip to content

Commit 55b51e3

Browse files
committed
7.1.0-beta3
zephyr 3.1.99
1 parent 014f83b commit 55b51e3

File tree

17 files changed

+307
-319
lines changed

17 files changed

+307
-319
lines changed

examples/zephyr/blinky/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
CONFIG_NUM_COOP_PRIORITIES=29
55
CONFIG_NUM_PREEMPT_PRIORITIES=40
6+
CONFIG_THREAD_NAME=y
67
CONFIG_REBOOT=y
78

89
# for QSPY...

examples/zephyr/blinky/src/blinky.c

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,34 @@
1-
/*****************************************************************************
2-
* Product: Simple Blinky example
3-
* Last Updated for Version: 5.6.5
4-
* Date of the Last Update: 2016-06-03
5-
*
6-
* Q u a n t u m L e a P s
7-
* ---------------------------
8-
* innovating embedded systems
9-
*
1+
/*============================================================================
2+
* QP/C Real-Time Embedded Framework (RTEF)
103
* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
114
*
12-
* This program is open source software: you can redistribute it and/or
13-
* modify it under the terms of the GNU General Public License as published
14-
* by the Free Software Foundation, either version 3 of the License, or
15-
* (at your option) any later version.
5+
* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
166
*
17-
* Alternatively, this program may be distributed and modified under the
18-
* terms of Quantum Leaps commercial licenses, which expressly supersede
19-
* the GNU General Public License and are specifically designed for
20-
* licensees interested in retaining the proprietary status of their code.
7+
* This software is dual-licensed under the terms of the open source GNU
8+
* General Public License version 3 (or any later version), or alternatively,
9+
* under the terms of one of the closed source Quantum Leaps commercial
10+
* licenses.
2111
*
22-
* This program is distributed in the hope that it will be useful,
23-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
24-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25-
* GNU General Public License for more details.
12+
* The terms of the open source GNU General Public License version 3
13+
* can be found at: <www.gnu.org/licenses/gpl-3.0>
2614
*
27-
* You should have received a copy of the GNU General Public License
28-
* along with this program. If not, see <www.gnu.org/licenses/>.
15+
* The terms of the closed source Quantum Leaps commercial licenses
16+
* can be found at: <www.state-machine.com/licensing>
17+
*
18+
* Redistributions in source code must retain this top-level comment block.
19+
* Plagiarizing this software to sidestep the license obligations is illegal.
2920
*
3021
* Contact information:
31-
* Web: www.state-machine.com
22+
* <www.state-machine.com>
3223
33-
*****************************************************************************/
24+
============================================================================*/
25+
/*!
26+
* @date Last updated on: 2022-08-24
27+
* @version Last updated for: Zephyr 3.1.99 and @ref qpc_7_1_0
28+
*
29+
* @file
30+
* @brief Blinky example
31+
*/
3432
#include "qpc.h"
3533
#include "blinky.h"
3634
#include "bsp.h"

examples/zephyr/blinky/src/blinky.h

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,34 @@
1-
/*****************************************************************************
2-
* Product: simple "Blinky" example
3-
* Last Updated for Version: 5.4.0
4-
* Date of the Last Update: 2015-03-07
1+
/*============================================================================
2+
* QP/C Real-Time Embedded Framework (RTEF)
3+
* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
54
*
6-
* Q u a n t u m L e a P s
7-
* ---------------------------
8-
* innovating embedded systems
5+
* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
96
*
10-
* Copyright (C) 2005 Quantum Leaps, LLC. state-machine.com.
7+
* This software is dual-licensed under the terms of the open source GNU
8+
* General Public License version 3 (or any later version), or alternatively,
9+
* under the terms of one of the closed source Quantum Leaps commercial
10+
* licenses.
1111
*
12-
* This program is open source software: you can redistribute it and/or
13-
* modify it under the terms of the GNU General Public License as published
14-
* by the Free Software Foundation, either version 3 of the License, or
15-
* (at your option) any later version.
12+
* The terms of the open source GNU General Public License version 3
13+
* can be found at: <www.gnu.org/licenses/gpl-3.0>
1614
*
17-
* Alternatively, this program may be distributed and modified under the
18-
* terms of Quantum Leaps commercial licenses, which expressly supersede
19-
* the GNU General Public License and are specifically designed for
20-
* licensees interested in retaining the proprietary status of their code.
15+
* The terms of the closed source Quantum Leaps commercial licenses
16+
* can be found at: <www.state-machine.com/licensing>
2117
*
22-
* This program is distributed in the hope that it will be useful,
23-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
24-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25-
* GNU General Public License for more details.
26-
*
27-
* You should have received a copy of the GNU General Public License
28-
* along with this program. If not, see <www.gnu.org/licenses/>.
18+
* Redistributions in source code must retain this top-level comment block.
19+
* Plagiarizing this software to sidestep the license obligations is illegal.
2920
*
3021
* Contact information:
31-
* <www.state-machine.com/licensing>
22+
* <www.state-machine.com>
3223
33-
*****************************************************************************/
24+
============================================================================*/
25+
/*!
26+
* @date Last updated on: 2022-08-24
27+
* @version Last updated for: Zephyr 3.1.99 and @ref qpc_7_1_0
28+
*
29+
* @file
30+
* @brief Blinky example
31+
*/
3432
#ifndef BLINKY_H
3533
#define BLINKY_H
3634

examples/zephyr/blinky/src/bsp.c

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,68 @@
1+
/*============================================================================
2+
* QP/C Real-Time Embedded Framework (RTEF)
3+
* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
4+
*
5+
* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
6+
*
7+
* This software is dual-licensed under the terms of the open source GNU
8+
* General Public License version 3 (or any later version), or alternatively,
9+
* under the terms of one of the closed source Quantum Leaps commercial
10+
* licenses.
11+
*
12+
* The terms of the open source GNU General Public License version 3
13+
* can be found at: <www.gnu.org/licenses/gpl-3.0>
14+
*
15+
* The terms of the closed source Quantum Leaps commercial licenses
16+
* can be found at: <www.state-machine.com/licensing>
17+
*
18+
* Redistributions in source code must retain this top-level comment block.
19+
* Plagiarizing this software to sidestep the license obligations is illegal.
20+
*
21+
* Contact information:
22+
* <www.state-machine.com>
23+
24+
============================================================================*/
25+
/*!
26+
* @date Last updated on: 2022-08-24
27+
* @version Last updated for: Zephyr 3.1.99 and @ref qpc_7_1_0
28+
*
29+
* @file
30+
* @brief BSP for Zephyr, Blinky example
31+
*/
132
#include "qpc.h"
233
#include "bsp.h"
334

4-
#include <drivers/gpio.h>
5-
#include <sys/reboot.h>
35+
#include <zephyr/drivers/gpio.h>
36+
#include <zephyr/sys/reboot.h>
637
/* other drivers, if necessary ... */
738

839
Q_DEFINE_THIS_FILE
940

1041
/* The devicetree node identifier for the "led0" alias. */
1142
#define LED0_NODE DT_ALIAS(led0)
1243

13-
#if DT_NODE_HAS_STATUS(LED0_NODE, okay)
14-
#define LED0 DT_GPIO_LABEL(LED0_NODE, gpios)
15-
#define PIN DT_GPIO_PIN(LED0_NODE, gpios)
16-
#define FLAGS DT_GPIO_FLAGS(LED0_NODE, gpios)
17-
#else
18-
/* A build error here means your board isn't set up to blink an LED. */
19-
#error "Unsupported board: led0 devicetree alias is not defined"
20-
#define LED0 ""
21-
#define PIN 0
22-
#define FLAGS 0
23-
#endif
24-
25-
static struct device const *dev_LED0;
44+
static struct gpio_dt_spec const l_led0 = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
2645
static struct k_timer QF_tick_timer;
2746
static void QF_tick_function(struct k_timer *tid) {
2847
(void)tid; /* unused parameter */
2948
QTIMEEVT_TICK_X(0U, (void *)0);
3049
}
3150

3251
void BSP_init(void) {
33-
dev_LED0 = device_get_binding(LED0);
34-
Q_ASSERT(dev_LED0 != NULL);
35-
36-
int ret = gpio_pin_configure(dev_LED0, PIN, GPIO_OUTPUT_ACTIVE | FLAGS);
52+
int ret = gpio_pin_configure_dt(&l_led0, GPIO_OUTPUT_ACTIVE);
3753
Q_ASSERT(ret >= 0);
3854

3955
k_timer_init(&QF_tick_timer, &QF_tick_function, NULL);
4056
}
4157

4258
void BSP_ledOn(void) {
4359
printk("BSP_ledOn\n");
44-
gpio_pin_set(dev_LED0, PIN, true);
60+
gpio_pin_set_dt(&l_led0, true);
4561
}
4662

4763
void BSP_ledOff(void) {
4864
printk("BSP_ledOff\n");
49-
gpio_pin_set(dev_LED0, PIN, false);
65+
gpio_pin_set_dt(&l_led0, false);
5066
}
5167

5268
/* QF callbacks ============================================================*/

examples/zephyr/blinky/src/bsp.h

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,34 @@
1-
/*****************************************************************************
2-
* Product: DPP example
3-
* Last Updated for Version: 5.6.0
4-
* Date of the Last Update: 2015-11-22
5-
*
6-
* Q u a n t u m L e a P s
7-
* ---------------------------
8-
* innovating embedded systems
9-
*
1+
/*============================================================================
2+
* QP/C Real-Time Embedded Framework (RTEF)
103
* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
114
*
12-
* This program is open source software: you can redistribute it and/or
13-
* modify it under the terms of the GNU General Public License as published
14-
* by the Free Software Foundation, either version 3 of the License, or
15-
* (at your option) any later version.
5+
* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
166
*
17-
* Alternatively, this program may be distributed and modified under the
18-
* terms of Quantum Leaps commercial licenses, which expressly supersede
19-
* the GNU General Public License and are specifically designed for
20-
* licensees interested in retaining the proprietary status of their code.
7+
* This software is dual-licensed under the terms of the open source GNU
8+
* General Public License version 3 (or any later version), or alternatively,
9+
* under the terms of one of the closed source Quantum Leaps commercial
10+
* licenses.
2111
*
22-
* This program is distributed in the hope that it will be useful,
23-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
24-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25-
* GNU General Public License for more details.
12+
* The terms of the open source GNU General Public License version 3
13+
* can be found at: <www.gnu.org/licenses/gpl-3.0>
2614
*
27-
* You should have received a copy of the GNU General Public License
28-
* along with this program. If not, see <www.gnu.org/licenses/>.
15+
* The terms of the closed source Quantum Leaps commercial licenses
16+
* can be found at: <www.state-machine.com/licensing>
17+
*
18+
* Redistributions in source code must retain this top-level comment block.
19+
* Plagiarizing this software to sidestep the license obligations is illegal.
2920
*
3021
* Contact information:
31-
* <www.state-machine.com/licensing>
22+
* <www.state-machine.com>
3223
33-
*****************************************************************************/
24+
============================================================================*/
25+
/*!
26+
* @date Last updated on: 2022-08-24
27+
* @version Last updated for: Zephyr 3.1.99 and @ref qpc_7_1_0
28+
*
29+
* @file
30+
* @brief BSP for Zephyr, Blinky example
31+
*/
3432
#ifndef BSP_H
3533
#define BSP_H
3634

examples/zephyr/blinky/src/main.c

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,34 @@
1-
/*****************************************************************************
2-
* Product: "Blinky" example
3-
* Last updated for version 7.0.1
4-
* Last updated on 2022-06-04
5-
*
6-
* Q u a n t u m L e a P s
7-
* ------------------------
8-
* Modern Embedded Software
9-
*
1+
/*============================================================================
2+
* QP/C Real-Time Embedded Framework (RTEF)
103
* Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
114
*
12-
* This program is open source software: you can redistribute it and/or
13-
* modify it under the terms of the GNU General Public License as published
14-
* by the Free Software Foundation, either version 3 of the License, or
15-
* (at your option) any later version.
5+
* SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
166
*
17-
* Alternatively, this program may be distributed and modified under the
18-
* terms of Quantum Leaps commercial licenses, which expressly supersede
19-
* the GNU General Public License and are specifically designed for
20-
* licensees interested in retaining the proprietary status of their code.
7+
* This software is dual-licensed under the terms of the open source GNU
8+
* General Public License version 3 (or any later version), or alternatively,
9+
* under the terms of one of the closed source Quantum Leaps commercial
10+
* licenses.
2111
*
22-
* This program is distributed in the hope that it will be useful,
23-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
24-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25-
* GNU General Public License for more details.
12+
* The terms of the open source GNU General Public License version 3
13+
* can be found at: <www.gnu.org/licenses/gpl-3.0>
2614
*
27-
* You should have received a copy of the GNU General Public License
28-
* along with this program. If not, see <www.gnu.org/licenses/>.
15+
* The terms of the closed source Quantum Leaps commercial licenses
16+
* can be found at: <www.state-machine.com/licensing>
17+
*
18+
* Redistributions in source code must retain this top-level comment block.
19+
* Plagiarizing this software to sidestep the license obligations is illegal.
2920
*
3021
* Contact information:
31-
* <www.state-machine.com/licensing>
22+
* <www.state-machine.com>
3223
33-
*****************************************************************************/
24+
============================================================================*/
25+
/*!
26+
* @date Last updated on: 2022-08-24
27+
* @version Last updated for: Zephyr 3.1.99 and @ref qpc_7_1_0
28+
*
29+
* @file
30+
* @brief main() for Zephyr, Blinky example
31+
*/
3432
#include "qpc.h"
3533
#include "blinky.h"
3634
#include "bsp.h"
@@ -52,12 +50,12 @@ int main() {
5250
/* instantiate and start the active objects... */
5351
Blinky_ctor();
5452
QActive_setAttr(AO_Blinky,
55-
0, /* thread opions */
53+
0, /* thread options */
5654
"Blinky"); /* thread name */
5755
QACTIVE_START(AO_Blinky, /* AO pointer to start */
5856
1U, /* unique QP priority of the AO */
5957
l_blinkyQSto, /* storage for the AO's queue */
60-
Q_DIM(l_blinkyQSto), /* lenght of the queue [entries] */
58+
Q_DIM(l_blinkyQSto), /* length of the queue [entries] */
6159
(void *)l_blinkyStack, /* stack storage */
6260
K_THREAD_STACK_SIZEOF(l_blinkyStack), /* stack size [bytes] */
6361
(void *)0); /* initial event (or 0) */

examples/zephyr/dpp/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
CONFIG_NUM_COOP_PRIORITIES=29
55
CONFIG_NUM_PREEMPT_PRIORITIES=40
6+
CONFIG_THREAD_NAME=y
67
CONFIG_REBOOT=y
78

89
# for QSPY...

0 commit comments

Comments
 (0)