qpcpp/ports/uc-os2/qs_port.hpp

57 lines
2.1 KiB
C++
Raw Normal View History

//============================================================================
// QS/C++ port to uC-OS2 RTOS, generic C++11 compiler
// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
2020-10-01 12:50:17 -04:00
//
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
2020-10-01 12:50:17 -04:00
//
// This software is dual-licensed under the terms of the open source GNU
// General Public License version 3 (or any later version), or alternatively,
// under the terms of one of the closed source Quantum Leaps commercial
// licenses.
2020-10-01 12:50:17 -04:00
//
// The terms of the open source GNU General Public License version 3
// can be found at: <www.gnu.org/licenses/gpl-3.0>
2020-10-01 12:50:17 -04:00
//
// The terms of the closed source Quantum Leaps commercial licenses
// can be found at: <www.state-machine.com/licensing>
2020-10-01 12:50:17 -04:00
//
// Redistributions in source code must retain this top-level comment block.
// Plagiarizing this software to sidestep the license obligations is illegal.
2020-10-01 12:50:17 -04:00
//
// Contact information:
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
2022-08-11 15:36:19 -04:00
//! @date Last updated on: 2022-06-12
//! @version Last updated for: @ref qpcpp_7_0_1
//!
//! @file
//! @brief QS/C++ port to uC-OS2, generic C++11 compiler
2018-11-22 11:34:13 -05:00
2019-10-27 12:26:31 -04:00
#ifndef QS_PORT_HPP
#define QS_PORT_HPP
2018-11-22 11:34:13 -05:00
2020-03-17 21:33:58 -04:00
#define QS_TIME_SIZE 4U
#define QS_OBJ_PTR_SIZE 4U
#define QS_FUN_PTR_SIZE 4U
2018-11-22 11:34:13 -05:00
//============================================================================
2018-11-22 11:34:13 -05:00
// NOTE: QS might be used with or without other QP components, in which case
// the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY,
// and QF_CRIT_EXIT are needed. In this port QS is configured to be used with
2019-10-27 12:26:31 -04:00
// the QF framework, by simply including "qf_port.hpp" *before* "qs.hpp".
2018-11-22 11:34:13 -05:00
//
2022-08-11 15:36:19 -04:00
#ifndef QF_PORT_HPP
2019-10-27 12:26:31 -04:00
#include "qf_port.hpp" // use QS with QF
2022-08-11 15:36:19 -04:00
#endif
2020-07-18 17:58:58 -04:00
2022-08-11 15:36:19 -04:00
#if (OS_CRITICAL_METHOD == 3U)
2020-10-01 12:50:17 -04:00
#define QS_CRIT_STAT_ OS_CPU_SR cpu_sr;
#define QS_CRIT_E_() OS_ENTER_CRITICAL()
#define QS_CRIT_X_() OS_EXIT_CRITICAL(); QS_REC_DONE()
2020-07-18 17:58:58 -04:00
#endif // OS_CRITICAL_METHOD
2019-10-27 12:26:31 -04:00
#include "qs.hpp" // QS platform-independent public interface
2018-11-22 11:34:13 -05:00
2019-10-27 12:26:31 -04:00
#endif // QS_PORT_HPP