QP-nano  6.8.1
qpn_conf.h File Reference

QP-nano configuration file. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define Q_PARAM_SIZE   4U
 The size (in bytes) of the single scalar parameter representation in the QEvent struct. More...
 
#define QF_TIMEEVT_CTR_SIZE   2U
 The size (in bytes) of the time event-counter representation in the QActive struct. More...
 
#define QF_TIMEEVT_PERIODIC
 Configuration switch to enable/disable periodic time events. More...
 
#define QF_TIMEEVT_USAGE
 Configuration switch to enable/disable keeping track of QF time event usage. More...
 
#define QK_SCHED_LOCK
 The preprocessor switch to enable the QK-nano scheduler locking. More...
 

Detailed Description

QP-nano configuration file.

Description
This header file provides the compile-time configuration of the QP-nano framework. A version of the qpn_conf.h header file needs to be provided with every QP-nano application.

Definition in file qpn_conf.h.

Macro Definition Documentation

◆ Q_PARAM_SIZE

#define Q_PARAM_SIZE   4U

The size (in bytes) of the single scalar parameter representation in the QEvent struct.

Valid values: none (0), 1, 2, or 4; default none (0).

Description
The value of this macro configures the parameter size of QP-nano Events. If the macro is not defined, the default of no event parameter will be chosen. The valid Q_PARAM_SIZE values of 1, 2, 4, or 8, correspond to event parameters of uint8_t, uint16_t, uint32_t, and uint64_t, respectively.
See also
QEvt, Q_PAR(), QF_post(), QF_postNoLock()

Definition at line 59 of file qpn_conf.h.

◆ QF_TIMEEVT_CTR_SIZE

#define QF_TIMEEVT_CTR_SIZE   2U

The size (in bytes) of the time event-counter representation in the QActive struct.

Valid values: none (0), 1, 2, or 4; default none (0).

Description
The value of this macro configures the internal tick counter size of QP-nano Time Events. If the macro is not defined, the default of no time event counter will be chosen. The valid values of 1, 2, or 4, correspond to tick counters of uint8_t, uint16_t, and uint32_t, respectively. The tick counter representation determines the dynamic range of time delays that a Time Event can handle.
See also
QTimeEvtCtr

Definition at line 75 of file qpn_conf.h.

◆ QF_TIMEEVT_PERIODIC

#define QF_TIMEEVT_PERIODIC

Configuration switch to enable/disable periodic time events.

Description
The value of this macro configures the QF-nano timer is capable of firing periodically or is limited to one-shot only. The reason for not allowing periodic time events is that they require additional storage (inside QActive) for the timeout interval.

When the macro QF_TIMEEVT_PERIODIC is not defined, the function QActive_armX() takes 3 arguments: the active object pointer, the tick rate of the timer, and the one-shot timeout.

When the macro QF_TIMEEVT_PERIODIC is not defined, the function QActive_armX() takes additional 4-th argument: the interval to re-arm the time event automatically until QActive_disarmX() is called.

Definition at line 93 of file qpn_conf.h.

◆ QF_TIMEEVT_USAGE

#define QF_TIMEEVT_USAGE

Configuration switch to enable/disable keeping track of QF time event usage.

Description
The QF-nano keeps track of the armed time events by means of the timer-sets (a separate one for each clock tick rate). The main use of the timer-sets is to quickly determine which time events at a given tick rate are still armed to enter the most appropriate low-power mode of the MCU.

Definition at line 104 of file qpn_conf.h.

◆ QK_SCHED_LOCK

#define QK_SCHED_LOCK

The preprocessor switch to enable the QK-nano scheduler locking.

Description
QK-nano keeps supports selective scheduler locking up to a specified ceiling priority. This scheduler locking can be used, for example, as a non-blocking mutual exclusion mechanism (formerly QK-nano mutex).

Definition at line 113 of file qpn_conf.h.