qpcpp/ports/lint-plus/qxk/qf_port.hpp

60 lines
2.0 KiB
C++
Raw Normal View History

//============================================================================
// QP/C++ Real-Time Embedded Framework (RTEF)
// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
//
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
//
// 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.
//
// The terms of the open source GNU General Public License version 3
// can be found at: <www.gnu.org/licenses/gpl-3.0>
//
// The terms of the closed source Quantum Leaps commercial licenses
// can be found at: <www.state-machine.com/licensing>
//
// Redistributions in source code must retain this top-level comment block.
// Plagiarizing this software to sidestep the license obligations is illegal.
//
// Contact information:
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
2022-08-11 15:36:19 -04:00
//! @date Last updated on: 2022-06-30
//! @version Last updated for: @ref qpcpp_7_0_1
//!
//! @file
//! @brief QF/C++ port example, Generic C++11 compiler
//! @description
//! This is an example QP/C++ port with the documentation for the main
//! items, such as configuration macros, functions, and includes.
2015-12-31 14:56:37 -05:00
2019-10-27 12:26:31 -04:00
#ifndef QF_PORT_HPP
#define QF_PORT_HPP
2015-12-31 14:56:37 -05:00
2022-08-11 15:36:19 -04:00
// interrupt disabling mechanism
2015-12-31 14:56:37 -05:00
#define QF_INT_DISABLE() intDisable()
#define QF_INT_ENABLE() intEnable()
2022-08-11 15:36:19 -04:00
// QF critical section mechanism
2020-07-18 17:58:58 -04:00
#define QF_CRIT_STAT_TYPE unsigned
2015-12-31 14:56:37 -05:00
#define QF_CRIT_ENTRY(stat_) ((stat_) = critEntry())
#define QF_CRIT_EXIT(stat_) critExit(stat_)
2022-08-11 15:36:19 -04:00
#include "qep_port.hpp" // QEP port
#include "qxk_port.hpp" // QXK dual-mode kernel port
2015-12-31 14:56:37 -05:00
2019-12-31 15:56:23 -05:00
extern "C" {
2020-03-17 21:33:58 -04:00
2020-07-18 17:58:58 -04:00
void intDisable(void);
void intEnable(void);
2020-03-17 21:33:58 -04:00
QF_CRIT_STAT_TYPE critEntry(void);
void critExit(QF_CRIT_STAT_TYPE stat);
} // extern "C"
2019-12-31 15:56:23 -05:00
2019-10-27 12:26:31 -04:00
#endif // QF_PORT_HPP