|
ChibiOS/RT
2.5.1 |
00001 /* 00002 ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, 00003 2011,2012 Giovanni Di Sirio. 00004 00005 This file is part of ChibiOS/RT. 00006 00007 ChibiOS/RT is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 ChibiOS/RT is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 /** 00022 * @file ARM/chtypes.h 00023 * @brief ARM7/9 architecture port system types. 00024 * 00025 * @addtogroup ARM_CORE 00026 * @{ 00027 */ 00028 00029 #ifndef _CHTYPES_H_ 00030 #define _CHTYPES_H_ 00031 00032 #define __need_NULL 00033 #define __need_size_t 00034 #define __need_ptrdiff_t 00035 #include <stddef.h> 00036 00037 #if !defined(_STDINT_H) && !defined(__STDINT_H_) 00038 #include <stdint.h> 00039 #endif 00040 00041 typedef int32_t bool_t; /**< Fast boolean type. */ 00042 typedef uint8_t tmode_t; /**< Thread flags. */ 00043 typedef uint8_t tstate_t; /**< Thread state. */ 00044 typedef uint8_t trefs_t; /**< Thread references counter. */ 00045 typedef uint8_t tslices_t; /**< Thread time slices counter. */ 00046 typedef uint32_t tprio_t; /**< Thread priority. */ 00047 typedef int32_t msg_t; /**< Inter-thread message. */ 00048 typedef int32_t eventid_t; /**< Event Id. */ 00049 typedef uint32_t eventmask_t; /**< Event mask. */ 00050 typedef uint32_t flagsmask_t; /**< Event flags. */ 00051 typedef uint32_t systime_t; /**< System time. */ 00052 typedef int32_t cnt_t; /**< Resources counter. */ 00053 00054 /** 00055 * @brief Inline function modifier. 00056 */ 00057 #define INLINE inline 00058 00059 /** 00060 * @brief ROM constant modifier. 00061 * @note It is set to use the "const" keyword in this port. 00062 */ 00063 #define ROMCONST const 00064 00065 /** 00066 * @brief Packed structure modifier (within). 00067 * @note It uses the "packed" GCC attribute. 00068 */ 00069 #define PACK_STRUCT_STRUCT __attribute__((packed)) 00070 00071 /** 00072 * @brief Packed structure modifier (before). 00073 * @note Empty in this port. 00074 */ 00075 #define PACK_STRUCT_BEGIN 00076 00077 /** 00078 * @brief Packed structure modifier (after). 00079 * @note Empty in this port. 00080 */ 00081 #define PACK_STRUCT_END 00082 00083 #endif /* _CHTYPES_H_ */ 00084 00085 /** @} */