qpc/ports/arm-cm/qv/iar/qv_port.h
MMS e032055963 7.1.3
7.1.3

Replaced QF_EVT_REF_CTR_INC_() with QEvt_refCtr_inc_() in ports
- embOS
- ESP-IDF
- Qt

7.1.3

7.1.3

7.1.3

7.1.3

7.1.3

7.1.3

7.1.2

first commit after fixing history

Revert "7.1.2"

This reverts commit 90cf4e1471b5e9c0853af97af8ec0bc67c7e19c6.

7.1.2

first commit after fixing the history

7.0.1
2023-02-18 09:17:17 -05:00

72 lines
2.3 KiB
C

/*============================================================================
* 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>
============================================================================*/
/*!
* @date Last updated on: 2022-06-12
* @version Last updated for: @ref qpc_7_0_1
*
* @file
* @brief QV/C port to ARM Cortex-M, IAR-ARM toolset
*/
#ifndef QV_PORT_H
#define QV_PORT_H
#if (__CORE__ == __ARM6M__) /* Cortex-M0/M0+/M1 ? */
/* macro to put the CPU to sleep inside QV_onIdle() */
#define QV_CPU_SLEEP() do { \
__WFI(); \
QF_INT_ENABLE(); \
} while (false)
#define QV_ARM_ERRATUM_838869() ((void)0)
#else /* Cortex-M3/M4/M7(v7-M) */
/* macro to put the CPU to sleep inside QV_onIdle() */
#define QV_CPU_SLEEP() do { \
QF_PRIMASK_DISABLE(); \
QF_INT_ENABLE(); \
__WFI(); \
QF_PRIMASK_ENABLE(); \
} while (false)
/* initialization of the QV kernel for Cortex-M3/M4/M4F */
#define QV_INIT() QV_init()
void QV_init(void);
/* The following macro implements the recommended workaround for the
* ARM Erratum 838869. Specifically, for Cortex-M3/M4/M7 the DSB
* (memory barrier) instruction needs to be added before exiting an ISR.
* This macro should be inserted at the end of ISRs.
*/
#define QV_ARM_ERRATUM_838869() __DSB()
#endif
#include "qv.h" /* QV platform-independent public interface */
#endif /* QV_PORT_H */