QP-nano  6.1.1
qpn_conf.h File Reference

QP-nano configuration file, generic C compiler. More...

Go to the source code of this file.

Macros

#define Q_PARAM_SIZE   4
 The size (in bytes) of the single scalar parameter representation in the QEvent struct. More...
 
#define QF_TIMEEVT_CTR_SIZE   2
 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, generic C compiler.

Definition in file qpn_conf.h.

Macro Definition Documentation

◆ Q_PARAM_SIZE

#define Q_PARAM_SIZE   4

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
This macro can be defined in the QP-nano port header file qpn_port.h to configure the parameter of 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, or 4, correspond to event parameters of uint8_t, uint16_t, and uint32_t, respectively.
See also
QEvt, Q_PAR(), QF_post(), QF_postNoLock()

Definition at line 55 of file qpn_conf.h.

◆ QF_TIMEEVT_CTR_SIZE

#define QF_TIMEEVT_CTR_SIZE   2

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
This macro can be defined in the QP-nano port header file qpn_port.h to configure the internal tick counters of Time Events. If the macro is not defined, the default of no time event counter will be chosen. The valid QF_TIMEEVT_CTR_SIZE 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 72 of file qpn_conf.h.

◆ QF_TIMEEVT_PERIODIC

#define QF_TIMEEVT_PERIODIC

Configuration switch to enable/disable periodic time events.

Description
This macro determines if 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 90 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 101 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 110 of file qpn_conf.h.