[93] | 1 | /*
|
---|
| 2 | * TOPPERS Software
|
---|
| 3 | * Toyohashi Open Platform for Embedded Real-Time Systems
|
---|
| 4 | *
|
---|
| 5 | * Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
|
---|
| 6 | * Toyohashi Univ. of Technology, JAPAN
|
---|
| 7 | * Copyright (C) 2004-2006 by Embedded and Real-Time Systems Laboratory
|
---|
| 8 | * Graduate School of Information Science, Nagoya Univ., JAPAN
|
---|
| 9 | * Copyright (C) 2007 by Witz Corporation, JAPAN
|
---|
| 10 | * Copyright (C) 2011,2014 by Naoki Saito
|
---|
| 11 | * Nagoya Municipal Industrial Research Institute, JAPAN
|
---|
| 12 | *
|
---|
| 13 | * ãLì ÒÍCȺÌ(1)`(4)Ìðð½·êÉÀèC{\tgEF
|
---|
| 14 | * Ai{\tgEFAðüϵ½àÌðÜÞDȺ¯¶jðgpE¡»Eü
|
---|
| 15 | * ÏEÄzziȺCpÆÄÔj·é±Æð³Åø·éD
|
---|
| 16 | * (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
|
---|
| 17 | * \¦C±Ìpð¨æѺL̳ÛØKèªC»ÌÜÜÌ`Å\[
|
---|
| 18 | * XR[hÉÜÜêÄ¢é±ÆD
|
---|
| 19 | * (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJÉg
|
---|
| 20 | * pÅ«é`ÅÄzz·éêÉÍCÄzzɺ¤hL
|
---|
| 21 | gip
|
---|
| 22 | * Ò}j
|
---|
| 23 | AÈÇjÉCãLÌì \¦C±Ìpð¨æѺL
|
---|
| 24 | * ̳ÛØKèðfÚ·é±ÆD
|
---|
| 25 | * (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJÉg
|
---|
| 26 | * pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
|
---|
| 27 | * ÆD
|
---|
| 28 | * (a) Äzzɺ¤hL
|
---|
| 29 | gipÒ}j
|
---|
| 30 | AÈÇjÉCãLÌ
|
---|
| 31 | * ì \¦C±Ìpð¨æѺL̳ÛØKèðfÚ·é±ÆD
|
---|
| 32 | * (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
|
---|
| 33 | * ñ·é±ÆD
|
---|
| 34 | * (4) {\tgEFAÌpÉæè¼ÚIܽÍÔÚIɶ¶é¢©Èé¹
|
---|
| 35 | * Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
|
---|
| 36 | * ܽC{\tgEFAÌ[UܽÍGh[U©çÌ¢©Èé
|
---|
| 37 | * RÉîÿ©çàCãLì Ò¨æÑTOPPERSvWFNgð
|
---|
| 38 | * ÆÓ·é±ÆD
|
---|
| 39 | *
|
---|
| 40 | * {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
|
---|
| 41 | * æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄCÁèÌgpÚI
|
---|
| 42 | * ÉηéK«àÜßÄC¢©ÈéÛØàsíÈ¢DܽC{\tgEF
|
---|
| 43 | * AÌpÉæè¼ÚIܽÍÔÚIɶ¶½¢©Èé¹QÉÖµÄàC»
|
---|
| 44 | * ÌÓCðíÈ¢D
|
---|
| 45 | *
|
---|
| 46 | */
|
---|
| 47 |
|
---|
| 48 | /*
|
---|
| 49 | * t_stddef.hÌJ«˶ilTXGNgjNX CA78K0Rpj
|
---|
| 50 | *
|
---|
| 51 | * ±ÌCN[ht@CÍCtarget_stddef.h ÌæªÅCN[h³êéD
|
---|
| 52 | */
|
---|
| 53 |
|
---|
| 54 | #if !defined( TOPPERS_TOOL_STDDEF_H )
|
---|
| 55 | #define TOPPERS_TOOL_STDDEF_H
|
---|
| 56 |
|
---|
| 57 | /*
|
---|
| 58 | * RpCÌg£@\̽ßÌ}Nè`
|
---|
| 59 | */
|
---|
| 60 | /*
|
---|
| 61 | * inline ¯ÊqÍRpCªT|[gµÈ¢D
|
---|
| 62 | */
|
---|
| 63 | #define inline
|
---|
| 64 | #define Inline static
|
---|
| 65 |
|
---|
| 66 | /*
|
---|
| 67 | * RpCÅÍ __asm ¯ÊqªT|[g³êÄ¢éªgpµÈ¢½ß¢è`Æ·éD
|
---|
| 68 | */
|
---|
| 69 |
|
---|
| 70 | /*
|
---|
| 71 | * ^[µÈ¢ÖÅ é±Æ𦷽ßÌL[[h
|
---|
| 72 | * ÀÛÉͽàµÈ¢
|
---|
| 73 | */
|
---|
| 74 | #define NoReturn
|
---|
| 75 |
|
---|
| 76 |
|
---|
| 77 | /*
|
---|
| 78 | * J«ÌWCN[ht@CÌp
|
---|
| 79 | *
|
---|
| 80 | * NULLÌè`ðstddef.h©çCINT_MAXCINT_MINCUINT_MAXCLONG_MAXC
|
---|
| 81 | * LONG_MINCULONG_MAXCCHAR_BITÌè`ðlimits.h©çæèÞD
|
---|
| 82 | */
|
---|
| 83 | #ifndef TOPPERS_MACRO_ONLY
|
---|
| 84 | #include <stddef.h>
|
---|
| 85 | #include <limits.h>
|
---|
| 86 | #endif /* TOPPERS_MACRO_ONLY */
|
---|
| 87 |
|
---|
| 88 | /*
|
---|
| 89 | * stdint.hÌãpÆÈéè`
|
---|
| 90 | *
|
---|
| 91 | * C99 Ì stdint.h ªpÓ³êĢȢ½ßC»ÌãpÆÈéè`ð^¦éD
|
---|
| 92 | */
|
---|
| 93 |
|
---|
| 94 | /*
|
---|
| 95 | * RpC˶Ìf[^^Ìè`
|
---|
| 96 | */
|
---|
| 97 | #ifndef TOPPERS_MACRO_ONLY
|
---|
| 98 |
|
---|
| 99 | typedef signed char int8_t; /* t«8rbg® */
|
---|
| 100 | typedef unsigned char uint8_t; /* ³µ8rbg® */
|
---|
| 101 |
|
---|
| 102 | typedef signed short int16_t; /* t«16rbg® */
|
---|
| 103 | typedef unsigned short uint16_t; /* ³µ16rbg® */
|
---|
| 104 |
|
---|
| 105 | typedef signed long int32_t; /* t«32rbg® */
|
---|
| 106 | typedef unsigned long uint32_t; /* ³µ32rbg® */
|
---|
| 107 |
|
---|
| 108 | /* 64rbg®^Í¢T|[g */
|
---|
| 109 |
|
---|
| 110 | typedef int8_t int_least8_t; /* 8rbgÈãÌt«® */
|
---|
| 111 | typedef uint8_t uint_least8_t; /* 8rbgÈã̳µ® */
|
---|
| 112 |
|
---|
| 113 | typedef long intptr_t; /* |C^ði[Å«ét«® */
|
---|
| 114 | typedef unsigned long uintptr_t; /* |C^ði[Å«é³µ® */
|
---|
| 115 |
|
---|
| 116 | #endif /* TOPPERS_MACRO_ONLY */
|
---|
| 117 |
|
---|
| 118 | /*
|
---|
| 119 | * RpC˶Ìf[^^Ì®èðìé}N(C99)
|
---|
| 120 | * pÓ³êĢȢ½ßC±±Åè`·éD
|
---|
| 121 | */
|
---|
| 122 | #ifndef INT8_C
|
---|
| 123 | #define INT8_C(val) ((int8_t)(val))
|
---|
| 124 | #endif /* INT8_C */
|
---|
| 125 |
|
---|
| 126 | #ifndef UINT8_C
|
---|
| 127 | #define UINT8_C(val) ((uint8_t)(val ## U))
|
---|
| 128 | #endif /* UINT8_C */
|
---|
| 129 |
|
---|
| 130 | #ifndef INT16_C
|
---|
| 131 | #define INT16_C(val) ((int16_t)(val))
|
---|
| 132 | #endif /* INT16_C */
|
---|
| 133 |
|
---|
| 134 | #ifndef UINT16_C
|
---|
| 135 | #define UINT16_C(val) ((uint16_t)(val ## U))
|
---|
| 136 | #endif /* UINT16_C */
|
---|
| 137 |
|
---|
| 138 | #ifndef INT32_C
|
---|
| 139 | #define INT32_C(val) ((int32_t)(val))
|
---|
| 140 | #endif /* INT32_C */
|
---|
| 141 |
|
---|
| 142 | #ifndef UINT32_C
|
---|
| 143 | #define UINT32_C(val) ((uint32_t)(val ## U))
|
---|
| 144 | #endif /* UINT32_C */
|
---|
| 145 |
|
---|
| 146 | /*
|
---|
| 147 | * RpC˶Ìf[^^Éi[Å«éÅålÆŬlÌè`(C99)
|
---|
| 148 | * pÓ³êĢȢ½ßC±±Åè`·éD
|
---|
| 149 | */
|
---|
| 150 | #define INT8_MAX SCHAR_MAX
|
---|
| 151 | #define INT8_MIN SCHAR_MIN
|
---|
| 152 | #define UINT8_MAX UCHAR_MAX
|
---|
| 153 |
|
---|
| 154 | #define INT16_MAX SHRT_MAX
|
---|
| 155 | #define INT16_MIN SHRT_MIN
|
---|
| 156 | #define UINT16_MAX USHRT_MAX
|
---|
| 157 |
|
---|
| 158 | #define INT32_MAX LONG_MAX
|
---|
| 159 | #define INT32_MIN LONG_MIN
|
---|
| 160 | #define UINT32_MAX ULONG_MAX
|
---|
| 161 |
|
---|
| 162 | #define INT_LEAST8_MAX INT8_MAX
|
---|
| 163 | #define INT_LEAST8_MIN INT8_MIN
|
---|
| 164 | #define UINT_LEAST8_MAX INT8_MAX
|
---|
| 165 |
|
---|
| 166 | /*
|
---|
| 167 | * ®¬_^ÉÖ·éè`
|
---|
| 168 | */
|
---|
| 169 | #ifndef TOPPERS_MACRO_ONLY
|
---|
| 170 |
|
---|
| 171 | typedef float float32_t; /* IEEE754ÌP¸x®¬_ */
|
---|
| 172 | /* {¸x®¬_Í¢T|[gÅ èCdoubleàfloatƯ¶32rbg */
|
---|
| 173 |
|
---|
| 174 | #endif /* TOPPERS_MACRO_ONLY */
|
---|
| 175 |
|
---|
| 176 | #define FLOAT32_MIN 1.17549435e-38F
|
---|
| 177 | #define FLOAT32_MAX 3.40282347e+38F
|
---|
| 178 |
|
---|
| 179 | /*
|
---|
| 180 | * óxÌè`
|
---|
| 181 | * 嫳[ÌzñÍxÉÈé½ßA
|
---|
| 182 | * ±±ÅÊrè`·éB
|
---|
| 183 | */
|
---|
| 184 | #define TOPPERS_EMPTY_LABEL(x,y) x y[1]
|
---|
| 185 |
|
---|
| 186 | #endif /* TOPPERS_TOOL_STDDEF_H */
|
---|
| 187 |
|
---|