QP/C  6.3.7
qxk_port.h File Reference

QXK/C port example for a generic C compiler. More...

#include "qxk.h"
Include dependency graph for qxk_port.h:
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() != (uint32_t)0)
 determination if the code executes in the ISR context (used internally in QXK only) More...
 
#define QXK_ON_CONTEXT_SW   1
 activate the context-switch callback More...
 
#define QXK_CONTEXT_SWITCH_()   (trigSWI())
 trigger context switch (used internally in QXK only) 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

uint32_t getSR (void)
 
void trigSWI (void)
 

Detailed Description

QXK/C port example for a generic C compiler.

Definition in file qxk_port.h.

Macro Definition Documentation

◆ QXK_ISR_CONTEXT_

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

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

Definition at line 48 of file qxk_port.h.

◆ QXK_ON_CONTEXT_SW

#define QXK_ON_CONTEXT_SW   1

activate the context-switch callback

Definition at line 51 of file qxk_port.h.

◆ QXK_CONTEXT_SWITCH_

#define QXK_CONTEXT_SWITCH_ ( )    (trigSWI())

trigger context switch (used internally in QXK only)

Definition at line 54 of file qxk_port.h.

◆ QXK_ISR_ENTRY

#define QXK_ISR_ENTRY ( )
Value:
do { \
QF_INT_DISABLE(); \
++QXK_intNest_; \
QF_QS_ISR_ENTRY(QXK_intNest_, QXK_currPrio_); \
QF_INT_ENABLE(); \
} while (0)

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

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

Definition at line 66 of file qxk_port.h.

◆ QXK_ISR_EXIT

#define QXK_ISR_EXIT ( )
Value:
do { \
QF_INT_DISABLE(); \
--QXK_intNest_; \
if (QXK_intNest_ == (uint_fast8_t)0) { \
QXK_sched_(); \
} \
QF_INT_ENABLE(); \
} while (0)
unsigned int uint_fast8_t
fast at-least 8-bit unsigned int
Definition: stdint.h:35

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

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

Definition at line 82 of file qxk_port.h.

Function Documentation

◆ getSR()

uint32_t getSR ( void  )

◆ trigSWI()

void trigSWI ( void  )