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.


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


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

Macro Definition Documentation


#define QF_INT_DISABLE ( )    int_disable()
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.


#define QF_INT_ENABLE ( )    int_enable()

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


#define QV_INIT ( )    QV_init()

Macro that specifies QV-nano initialization

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.
The macro QV_INIT() can be left undefined.

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


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

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

This macro is provided in some QP ports for the QV cooperative kernel and in general it depends on the interrupt disabling policy.
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