|
QP/C
|
00001 /***************************************************************************** 00002 * Product: QP/C 00003 * Last Updated for Version: 4.4.00 00004 * Date of the Last Update: Jan 23, 2012 00005 * 00006 * Q u a n t u m L e a P s 00007 * --------------------------- 00008 * innovating embedded systems 00009 * 00010 * Copyright (C) 2002-2012 Quantum Leaps, LLC. All rights reserved. 00011 * 00012 * This software may be distributed and modified under the terms of the GNU 00013 * General Public License version 2 (GPL) as published by the Free Software 00014 * Foundation and appearing in the file GPL.TXT included in the packaging of 00015 * this file. Please note that GPL Section 2[b] requires that all works based 00016 * on this software must also be made publicly available under the terms of 00017 * the GPL ("Copyleft"). 00018 * 00019 * Alternatively, this software may be distributed and modified under the 00020 * terms of Quantum Leaps commercial licenses, which expressly supersede 00021 * the GPL and are specifically designed for licensees interested in 00022 * retaining the proprietary status of their code. 00023 * 00024 * Contact information: 00025 * Quantum Leaps Web site: http://www.quantum-leaps.com 00026 * e-mail: info@quantum-leaps.com 00027 *****************************************************************************/ 00028 #ifndef qevent_h 00029 #define qevent_h 00030 00040 /****************************************************************************/ 00047 #define QP_VERSION 0x4400U 00048 00049 #ifndef Q_ROM 00050 00063 #define Q_ROM 00064 #endif 00065 #ifndef Q_ROM_VAR /* if NOT defined, provide the default definition */ 00066 00081 #define Q_ROM_VAR 00082 #endif 00083 #ifndef Q_ROM_BYTE 00084 00098 #define Q_ROM_BYTE(rom_var_) (rom_var_) 00099 #endif 00100 00101 /****************************************************************************/ 00102 #ifndef Q_SIGNAL_SIZE 00103 00111 #define Q_SIGNAL_SIZE 2 00112 #endif 00113 #if (Q_SIGNAL_SIZE == 1) 00114 typedef uint8_t QSignal; 00115 #elif (Q_SIGNAL_SIZE == 2) 00116 00126 typedef uint16_t QSignal; 00127 #elif (Q_SIGNAL_SIZE == 4) 00128 typedef uint32_t QSignal; 00129 #else 00130 #error "Q_SIGNAL_SIZE defined incorrectly, expected 1, 2, or 4" 00131 #endif 00132 00133 /****************************************************************************/ 00146 typedef struct QEventTag { 00147 QSignal sig; 00148 uint8_t poolId_; 00149 uint8_t refCtr_; 00150 } QEvent; 00151 00152 /****************************************************************************/ 00154 #define Q_DIM(array_) (sizeof(array_) / sizeof(array_[0])) 00155 00156 /****************************************************************************/ 00157 /* typedefs for basic numerical types; MISRA-C 2004 rule 6.3(req). */ 00164 typedef char char_t; 00165 00167 typedef float float32_t; 00168 00170 typedef double float64_t; 00171 00180 #define Q_UINT2PTR_CAST(type_, uint_) ((type_ *)(uint_)) 00181 00182 #endif /* qevent_h */
1.7.6.1