ChibiOS/RT
2.5.1
chtypes.h
Go to the documentation of this file.
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    RC/STM8/chtypes.h
00023  * @brief   STM8 (Raisonance) port system types.
00024  *
00025  * @addtogroup STM8_RAISONANCE_CORE
00026  * @{
00027  */
00028 
00029 #ifndef _CHTYPES_H_
00030 #define _CHTYPES_H_
00031 
00032 #define __need_NULL
00033 #define __need_size_t
00034 #include <stddef.h>
00035 
00036 //#if !defined(_STDINT_H) && !defined(__STDINT_H_)
00037 //#include <stdint.h>
00038 //#endif
00039 
00040 typedef unsigned char   uint8_t;        /**< C99-style 8 bits unsigned.     */
00041 typedef signed char     int8_t;         /**< C99-style 8 bits signed.       */
00042 typedef unsigned int    uint16_t;       /**< C99-style 16 bits unsigned.    */
00043 typedef signed int      int16_t;        /**< C99-style 16 bits signed.      */
00044 typedef unsigned long   uint32_t;       /**< C99-style 32 bits unsigned.    */
00045 typedef signed long     int32_t;        /**< C99-style 32 bits signed.      */
00046 typedef uint8_t         uint_fast8_t;   /**< C99-style 8 bits unsigned.     */
00047 typedef uint16_t        uint_fast16_t;  /**< C99-style 16 bits unsigned.    */
00048 typedef uint32_t        uint_fast32_t;  /**< C99-style 32 bits unsigned.    */
00049 
00050 typedef int8_t          bool_t;         /**< Fast boolean type.             */
00051 typedef uint8_t         tmode_t;        /**< Thread flags.                  */
00052 typedef uint8_t         tstate_t;       /**< Thread state.                  */
00053 typedef uint8_t         trefs_t;        /**< Thread references counter.     */
00054 typedef uint8_t         tslices_t;      /**< Thread time slices counter.    */
00055 typedef uint8_t         tprio_t;        /**< Thread priority.               */
00056 typedef int16_t         msg_t;          /**< Inter-thread message.          */
00057 typedef int8_t          eventid_t;      /**< Event Id.                      */
00058 typedef uint8_t         eventmask_t;    /**< Event mask.                    */
00059 typedef uint8_t         flagsmask_t;    /**< Event flags.                   */
00060 typedef uint16_t        systime_t;      /**< System time.                   */
00061 typedef int8_t          cnt_t;          /**< Resources counter.             */
00062 
00063 /**
00064  * @brief   Inline function modifier.
00065  */
00066 #define INLINE inline
00067 
00068 /**
00069  * @brief   ROM constant modifier.
00070  * @note    Uses the "const" keyword in this port.
00071  */
00072 #define ROMCONST code
00073 
00074 /**
00075  * @brief   Packed structure modifier (within).
00076  * @note    Empty in this port.
00077  */
00078 #define PACK_STRUCT_STRUCT
00079 
00080 /**
00081  * @brief   Packed structure modifier (before).
00082  * @note    Empty in this port.
00083  */
00084 #define PACK_STRUCT_BEGIN
00085 
00086 /**
00087  * @brief   Packed structure modifier (after).
00088  * @note    Empty in this port.
00089  */
00090 #define PACK_STRUCT_END
00091 
00092 #endif /* _CHTYPES_H_ */
00093 
00094 /** @} */