QP-nano  6.9.0
Real-Time Embedded Framework
qvn/qfn_port.h File Reference

QF-nano port for Lint, cooperative QV-nano kernel, generic C compiler. More...

#include <stdint.h>
#include <stdbool.h>
#include "qepn.h"
#include "qfn.h"
#include "qvn.h"

Go to the source code of this file.

Macros

#define QF_INT_DISABLE()   int_disable()
 
#define QF_INT_ENABLE()   int_enable()
 
#define QV_INIT()   QV_init()
 
#define QV_CPU_SLEEP()
 

Functions

void QV_init (void)
 
void int_disable (void)
 
void int_enable (void)
 

Macro Definition Documentation

◆ QF_INT_DISABLE

#define QF_INT_DISABLE ( )    int_disable()
Description
This header file contains the port and customization of QP-nano to the specific CPU and compiler. Typically, this header file includes the platform-independent header file qpn.h.

Definition at line 49 of file qvn/qfn_port.h.

◆ QF_INT_ENABLE

#define QF_INT_ENABLE ( )    int_enable()

Definition at line 50 of file qvn/qfn_port.h.

◆ QV_INIT

#define QV_INIT ( )    QV_init()

Macro that specifies QV-nano initialization

Description
Some QV-nano ports might need initialization (e.g., seeting the priorities of exceptions PendSV and SVCall in ARM Cortex-M port). The QV_INIT() macro in this case calls the initialization defined in assembly.
Note
The macro QV_INIT() can be left undefined.

Definition at line 61 of file qvn/qfn_port.h.

◆ QV_CPU_SLEEP

#define QV_CPU_SLEEP ( )
Value:
do { \
__disable_interrupt(); \
QF_INT_ENABLE(); \
__WFI(); \
__enable_interrupt(); \
} while (false)

Macro to put the CPU to sleep safely in the cooperative QV kernel (inside QV_onIdle()).

Description
This macro is provided in some QP ports for the QV cooperative kernel and in general it depends on the interrupt disabling policy.
Note
The provided code is just an example (for ARM Cortex-M).

Definition at line 74 of file qvn/qfn_port.h.

Function Documentation

◆ QV_init()

void QV_init ( void  )

◆ int_disable()

void int_disable ( void  )

example of a function to disable interrupts

◆ int_enable()

void int_enable ( void  )

example of a function to enable interrupts