Sample QP/C++ port. More...
Go to the source code of this file.
Macros | |
#define | Q_NORETURN [[ noreturn ]] void |
No-return specifier for the Q_onError() callback function. | |
#define | QACTIVE_EQUEUE_TYPE QEQueue |
QP::QActive event queue type used in various QP/C++ ports. | |
#define | QACTIVE_OS_OBJ_TYPE void* |
QP::QActive "OS-object" type used in various QP/C++ ports. | |
#define | QACTIVE_THREAD_TYPE void const * |
QP::QActive "thread" type used in various QP/C++ ports. | |
#define | QF_INT_DISABLE() |
Disable interrupts. | |
#define | QF_INT_ENABLE() |
Enable interrupts. | |
#define | QF_CRIT_STAT std::uint32_t crit_stat_; |
#define | QF_CRIT_ENTRY() |
#define | QF_CRIT_EXIT() |
#define | QV_CPU_SLEEP() |
! def QF_MEM_ISOLATE | |
#define | QK_ISR_CONTEXT_() |
#define | QK_ISR_ENTRY() |
Define the ISR entry sequence. | |
#define | QK_ISR_EXIT() |
#define | QXK_ISR_CONTEXT_() |
Check if the code executes in the ISR context. | |
#define | QXK_CONTEXT_SWITCH_() |
Trigger context switch (used internally in QXK only) | |
#define | QXK_ISR_ENTRY() |
Define the ISR entry sequence. | |
#define | QXK_ISR_EXIT() |
Define the ISR exit sequence. | |
Functions | |
void | intDisable (void) |
void | intEnable (void) |
std::uint32_t | critEntry (void) |
void | critExit (std::uint32_t stat) |
std::uint32_t | QK_get_IPSR (void) |
Sample QP/C++ port.
This is just an example of a QF port for a generic C99 compiler. Other specific QF ports will define the QF facilities differently.
Definition in file qp_port.hpp.
#define Q_NORETURN [[ noreturn ]] void |
No-return specifier for the Q_onError() callback function.
If the Q_NORETURN
macro is undefined, the default definition uses the C++11 specifier [[ noreturn ]]
.
Q_NORETURN
macro can be defined in the QP port (typically in qep_port.hpp
). If such definition is provided the default won't be used. Definition at line 22 of file qp_port.hpp.
#define QACTIVE_EQUEUE_TYPE QEQueue |
QP::QActive event queue type used in various QP/C++ ports.
Definition at line 26 of file qp_port.hpp.
#define QACTIVE_OS_OBJ_TYPE void* |
QP::QActive "OS-object" type used in various QP/C++ ports.
Definition at line 29 of file qp_port.hpp.
#define QACTIVE_THREAD_TYPE void const * |
QP::QActive "thread" type used in various QP/C++ ports.
Definition at line 32 of file qp_port.hpp.
#define QF_INT_DISABLE | ( | ) |
#define QF_INT_ENABLE | ( | ) |
Enable interrupts.
Definition at line 39 of file qp_port.hpp.
#define QF_CRIT_STAT std::uint32_t crit_stat_; |
Define the critical section status that was present before entering the critical section.
For critical sections that are allowed to nest, the critical section status must be saved and restored at the end. This macro provides the storage for saving the status.
Definition at line 54 of file qp_port.hpp.
#define QF_CRIT_ENTRY | ( | ) |
Enter the critical section
If the critical section status is provided, the macro saves the critical section status from before entering the critical section. Otherwise, the macro just unconditionally enters the critical section without saving the status.
Definition at line 63 of file qp_port.hpp.
#define QF_CRIT_EXIT | ( | ) |
Exit the critical section
If the critical section status is provided, the macro restores the critical section status saved by QF_CRIT_ENTRY(). Otherwise, the macro just unconditionally exits the critical section.
Definition at line 71 of file qp_port.hpp.
#define QV_CPU_SLEEP | ( | ) |
! def QF_MEM_ISOLATE
Macro to put the CPU to sleep safely in the non-preemptive QV kernel (to be called from QV::onIdle()).
Definition at line 100 of file qp_port.hpp.
#define QK_ISR_CONTEXT_ | ( | ) |
#define QK_ISR_ENTRY | ( | ) |
#define QK_ISR_EXIT | ( | ) |
Define the ISR exit sequence
Definition at line 123 of file qp_port.hpp.
#define QXK_ISR_CONTEXT_ | ( | ) |
Check if the code executes in the ISR context.
Definition at line 137 of file qp_port.hpp.
#define QXK_CONTEXT_SWITCH_ | ( | ) |
Trigger context switch (used internally in QXK only)
Definition at line 140 of file qp_port.hpp.
#define QXK_ISR_ENTRY | ( | ) |
#define QXK_ISR_EXIT | ( | ) |
Define the ISR exit sequence.
Definition at line 146 of file qp_port.hpp.
void intDisable | ( | void | ) |
void intEnable | ( | void | ) |
std::uint32_t critEntry | ( | void | ) |
void critExit | ( | std::uint32_t | stat | ) |
std::uint32_t QK_get_IPSR | ( | void | ) |