qf_port.h File Reference

QF port to QK for a "generic" C compiler. More...

#include "qep_port.h"
#include "qk_port.h"
#include "qf.h"

Go to the source code of this file.

Defines

#define QF_MAX_ACTIVE   63
 The maximum number of active objects in the application.
#define QF_EVENT_SIZ_SIZE   2
 The size (in bytes) of the event-size representation in the QF. Valid values: 1, 2, or 4; default 2.
#define QF_EQUEUE_CTR_SIZE   1
 The size (in bytes) of the ring-buffer counters used in the native QF event queue implementation. Valid values: 1, 2, or 4; default 1.
#define QF_MPOOL_SIZ_SIZE   2
 The size (in bytes) of the block-size representation in the native QF event pool. Valid values: 1, 2, or 4; default QF_EVENT_SIZ_SIZE.
#define QF_MPOOL_CTR_SIZE   2
 The size (in bytes) of the block-counter representation in the native QF event pool. Valid values: 1, 2, or 4; default 2.
#define QF_TIMEEVT_CTR_SIZE   2
 The size (in bytes) of the time event-counter representation in the QTimeEvt struct. Valid values: 1, 2, or 4; default 2.
#define QF_INT_KEY_TYPE   int
 Define the type of the interrupt lock key.
#define QF_INT_LOCK(key_)   ((key_) = intLock())
 Define the interrupt locking policy.
#define QF_INT_UNLOCK(key_)   intUnlock(key_)
 Define the interrupt unlocking policy.

Detailed Description

QF port to QK for a "generic" C compiler.

Note:
This is just an example of a QF port used for "linting" the QF. Ports of QF are located in the directory <qpc_3>/ports.

Definition in file qf_port.h.


Define Documentation

#define QF_EQUEUE_CTR_SIZE   1

The size (in bytes) of the ring-buffer counters used in the native QF event queue implementation. Valid values: 1, 2, or 4; default 1.

This macro can be defined in the QF ports to configure the QEQueueCtr type. If the macro is not defined, the default of 1 byte will be chosen in qequeue.h. The valid QF_EQUEUE_CTR_SIZE values of 1, 2, or 4, correspond to QEQueueCtr of uint8_t, uint16_t, and uint32_t, respectively. The QEQueueCtr data type determines the dynamic range of numerical values of ring-buffer counters inside event queues, or, in other words, the maximum number of events that the native QF event queue can manage.

See also:
QEQueue
Note:
Once you choose a certain value of QF_EQUEUE_CTR_SIZE, you must consistently use the same value in building all the QP component libraries and your own application code. The consistency is guaranteed if you define this macro only once in the qf_port.h header file and henceforth include this header file in all builds.

Definition at line 98 of file qf_port.h.

#define QF_EVENT_SIZ_SIZE   2

The size (in bytes) of the event-size representation in the QF. Valid values: 1, 2, or 4; default 2.

This macro can be defined in the QF ports to configure the QEventSize type. If the macro is not defined, the default of 2 byte will be chosen in qf.h. The valid QF_EVENT_SIZ_SIZE values of 1, 2, or 4, correspond to QEventSize of uint8_t, uint16_t, and uint32_t, respectively. The QEventSize data type determines the dynamic range of event-sizes in your application.

See also:
QF_poolInit(), QF_new_()
Note:
Once you choose a certain value of QF_EVENT_SIZ_SIZE, you must consistently use the same value in building all the QP component libraries and your own application code. The consistency is guaranteed if you define this macro only once in the qf_port.h header file and henceforth include this header file in all builds.

Definition at line 78 of file qf_port.h.

#define QF_INT_KEY_TYPE   int

Define the type of the interrupt lock key.

Defining this macro configures the "saving and restoring interrupt status" policy of locking and unlocking interrupts. Coversely, if this macro is not defined, the simple "unconditional interrupt locking and unlocking" is used.

Definition at line 168 of file qf_port.h.

#define QF_INT_LOCK ( key_   )     ((key_) = intLock())

Define the interrupt locking policy.

This macro establishes a critical section (typically by locking interrupts). When the "saving and restoring interrupt status" policy is used, the macro sets the "interrupt key" to the interrupt status just before locking interrupts. When the policy of "unconditional interrupt unlocking" is used, the macro does not use the "interrupt key" parameter.

Note:
the QF_INT_LOCK macro should always be used in pair with the macro QF_INT_UNLOCK.

Definition at line 181 of file qf_port.h.

#define QF_INT_UNLOCK ( key_   )     intUnlock(key_)

Define the interrupt unlocking policy.

This macro leaves a critical section (typically by unlocking interrupts). When the "saving and restoring interrupt status" policy is used, the macro restores the interrupt status from the "interrupt key" parameter. When the policy of "unconditional interrupt unlocking" is used, the macro unconditionally unlocks interrupts ignoring the "interrupt key" parameter.

Note:
the QF_INT_LOCK macro should always be used in pair with the macro QF_INT_UNLOCK.

Definition at line 194 of file qf_port.h.

#define QF_MAX_ACTIVE   63

The maximum number of active objects in the application.

This macro should be defined in the QF ports and should be in range of 1..63, inclusive. The value of this macro determines the maximum priority level of an active object in the system. Not all priority levels must be used, but the maximum priority cannot exceed QF_MAX_ACTIVE.

If the macro is not defined, the default value is 63, which is the maximum. Defining the value below the maximum saves some memory, mostly for the subscriber-lists.

See also:
QSubscrList.
Note:
Once you choose a certain value of QF_MAX_ACTIVE, you must consistently use the same value in building all the QP component libraries and your own application code. The consistency is guaranteed if you define this macro only once in the qf_port.h header file and henceforth include this header file in all builds.

Definition at line 59 of file qf_port.h.

Referenced by QActive_start(), QActive_subscribe(), QActive_unsubscribe(), QActive_unsubscribeAll(), and QF_getQueueMargin().

#define QF_MPOOL_CTR_SIZE   2

The size (in bytes) of the block-counter representation in the native QF event pool. Valid values: 1, 2, or 4; default 2.

This macro can be defined in the QF ports to configure the QMPoolCtr type. If the macro is not defined, the default of 2 bytes will be chosen in qmpool.h. The valid QF_MPOOL_CTR_SIZE values of 1, 2, or 4, correspond to QMPoolSize of uint8_t, uint16_t, and uint32_t, respectively. The QMPoolCtr data type determines the dynamic range of block-counters that the native QMPool can handle, or, in other words, the maximum number of blocks that the native QF event pool can manage.

See also:
QMPool
Note:
Once you choose a certain value of QF_MPOOL_CTR_SIZE, you must consistently use the same value in building all the QP component libraries and your own application code. The consistency is guaranteed if you define this macro only once in the qf_port.h header file and henceforth include this header file in all builds.

Definition at line 140 of file qf_port.h.

#define QF_MPOOL_SIZ_SIZE   2

The size (in bytes) of the block-size representation in the native QF event pool. Valid values: 1, 2, or 4; default QF_EVENT_SIZ_SIZE.

This macro can be defined in the QF ports to configure the QMPoolSize type. If the macro is not defined, the default of QF_EVENT_SIZ_SIZE will be chosen in qmpool.h, because the memory pool is primarily used for implementing event pools.

The valid QF_MPOOL_SIZ_SIZE values of 1, 2, or 4, correspond to QMPoolSize of uint8_t, uint16_t, and uint32_t, respectively. The QMPoolSize data type determines the dynamic range of block-sizes that the native QMPool can hanle.

See also:
QF_EVENT_SIZ_SIZE, QMPool
Note:
Once you choose a certain value of QF_MPOOL_SIZ_SIZE, you must consistently use the same value in building all the QP component libraries and your own application code. The consistency is guaranteed if you define this macro only once in the qf_port.h header file and henceforth include this header file in all builds.

Definition at line 120 of file qf_port.h.

#define QF_TIMEEVT_CTR_SIZE   2

The size (in bytes) of the time event-counter representation in the QTimeEvt struct. Valid values: 1, 2, or 4; default 2.

This macro can be defined in the QF ports to configure the internal tick counters of Time Events. If the macro is not defined, the default of 2 bytes will be chosen in qf.h. 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:
QTimeEvt
Note:
Once you choose a certain value of QF_TIMEEVT_CTR_SIZE, you must consistently use the same value in building all the QP component libraries and your own application code. The consistency is guaranteed if you define this macro only once in the qf_port.h header file and henceforth include this header file in all builds.

Definition at line 159 of file qf_port.h.

Generated on Tue Mar 16 19:38:11 2010 for QP/C by  doxygen 1.6.3