QP/C++
Static Public Member Functions
QK Class Reference

QK services. More...

#include <qk.h>

List of all members.

Static Public Member Functions

static char const Q_ROM *Q_ROM_VAR getVersion (void)
 get the current QK version number string
static void onIdle (void)
 QK idle callback (customized in BSPs for QK)
static QMutex mutexLock (uint8_t prioCeiling)
 QK priority-ceiling mutex lock.
static void mutexUnlock (QMutex mutex)
 QK priority-ceiling mutex unlock.

Detailed Description

QK services.

This class groups together QK services. It has only static members and should not be instantiated. to the QK class (as static class members). However, to avoid C++ potential name-mangling problems in assembly language, these elements are defined outside of the QK class and use the extern "C" linkage specification.

Definition at line 211 of file qk.h.


Member Function Documentation

char const Q_ROM *Q_ROM_VAR QK::getVersion ( void  ) [static]

get the current QK version number string

Returns:
version of the QK as a constant 6-character string of the form x.y.zz, where x is a 1-digit major version number, y is a 1-digit minor version number, and zz is a 2-digit release number.

Definition at line 21 of file lint_qk_4.1.07.txt.

References QS::aoObj_, QF::init(), QPSet8::insert(), QPSet64::insert(), mutexLock(), Q_DEFINE_THIS_MODULE, Q_REQUIRE, QF_INT_KEY_TYPE, QF_MAX_ACTIVE, QK_ceilingPrio_, QK_TLS, QP_VERSION, QS_QK_MUTEX_LOCK, QS_QK_MUTEX_UNLOCK, QS_QK_SCHEDULE, QPSet8::remove(), QPSet64::remove(), QF::run(), and QF::stop().

QMutex QK::mutexLock ( uint8_t  prioCeiling) [static]

QK priority-ceiling mutex lock.

Lock the QK scheduler up to the priority level prioCeiling. The code between QK::mutexLock() and QK::mutexUnlock() should be kept to the minimum.

    QMutex mux;
    . . .
    mux = QK::mutexLock(PRIO_CEILING);

    // access the shared resource

    QK::mutexUnlock(mux);

    . . . 

Definition at line 49 of file qk_mutex.cpp.

References QK_ceilingPrio_, QS_BEGIN_NOCRIT_, QS_END_NOCRIT_, QS_QK_MUTEX_LOCK, and QS_U8_.

Referenced by getVersion().

void QK::mutexUnlock ( QMutex  mutex) [static]

QK priority-ceiling mutex unlock.

Note:
This function should be always paired with QK::mutexLock(). The code between QK::mutexLock() and QK::mutexUnlock() should be kept to the minimum.
    QMutex mux;
    . . .
    mux = QK::mutexLock(PRIO_CEILING);

    // access the shared resource

    QK::mutexUnlock(mux);

    . . . 

Definition at line 67 of file qk_mutex.cpp.

References QK_ceilingPrio_, QK_sched_(), QK_schedPrio_(), QS_BEGIN_NOCRIT_, QS_END_NOCRIT_, QS_QK_MUTEX_UNLOCK, and QS_U8_.

static void QK::onIdle ( void  ) [static]

QK idle callback (customized in BSPs for QK)

QK::onIdle() is called continously by the QK idle loop. This callback gives the application an opportunity to enter a power-saving CPU mode, or perform some other idle processing.

Note:
QK::onIdle() is invoked with interrupts unlocked and must also return with interrupts unlocked.
See also:
QF::onIdle()

The documentation for this class was generated from the following files: