QP/C++ 6.9.3
qxk_port.hpp File Reference

QXK/C++ port example, Generic C++ compiler. More...

#include "qxk.hpp"
Include dependency graph for qxk_port.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define QXK_ISR_CONTEXT_()   (getSR() != 0U)
 determination if the code executes in the ISR context (used internally in QXK only) More...
 
#define QXK_CONTEXT_SWITCH_()   (trigSWI())
 trigger context switch (used internally in QXK only) More...
 
#define QXK_ON_CONTEXT_SW   1
 activate the context-switch callback More...
 
#define QXK_ISR_ENTRY()
 Define the ISR entry sequence, if the compiler supports writing interrupts in C++. More...
 
#define QXK_ISR_EXIT()
 Define the ISR exit sequence, if the compiler supports writing interrupts in C++. More...
 

Functions

std::uint32_t getSR (void)
 
void trigSWI (void)
 

Detailed Description

QXK/C++ port example, Generic C++ compiler.

Definition in file qxk_port.hpp.

Macro Definition Documentation

◆ QXK_ISR_CONTEXT_

#define QXK_ISR_CONTEXT_ ( )    (getSR() != 0U)

determination if the code executes in the ISR context (used internally in QXK only)

Definition at line 47 of file qxk_port.hpp.

◆ QXK_CONTEXT_SWITCH_

#define QXK_CONTEXT_SWITCH_ ( )    (trigSWI())

trigger context switch (used internally in QXK only)

Definition at line 50 of file qxk_port.hpp.

◆ QXK_ON_CONTEXT_SW

#define QXK_ON_CONTEXT_SW   1

activate the context-switch callback

Definition at line 54 of file qxk_port.hpp.

◆ QXK_ISR_ENTRY

#define QXK_ISR_ENTRY ( )
Value:
do { \
} while (false)
QXK_Attr QXK_attr_
global attributes of the QXK kernel
Definition: qxk.cpp:60
std::uint8_t volatile intNest
ISR nesting level.
Definition: qxk.hpp:80

Define the ISR entry sequence, if the compiler supports writing interrupts in C++.

Note
This is just an example of QK_ISR_ENTRY. You need to define the macro appropriately for the CPU/compiler you're using. Also, some QK ports will not define this macro, but instead will provide ISR skeleton code in assembly.

Definition at line 65 of file qxk_port.hpp.

◆ QXK_ISR_EXIT

#define QXK_ISR_EXIT ( )
Value:
do { \
if (QXK_attr_.intNest == 0U) { \
if (QXK_sched_() != 0U) { \
QXK_activate_(); \
} \
} \
else { \
Q_ERROR(); \
} \
} while (false)
std::uint_fast8_t QXK_sched_(void) noexcept
QXK scheduler finds the highest-priority thread ready to run.
Definition: qxk.cpp:346

Define the ISR exit sequence, if the compiler supports writing interrupts in C++.

Note
This is just an example of QK_ISR_EXIT. You need to define the macro appropriately for the CPU/compiler you're using. Also, some QK ports will not define this macro, but instead will provide ISR skeleton code in assembly.

Definition at line 76 of file qxk_port.hpp.

Function Documentation

◆ getSR()

std::uint32_t getSR ( void  )

◆ trigSWI()

void trigSWI ( void  )