source: UsbWattMeter/trunk/asp_dcre/arch/msvc/tool_stddef.h@ 164

Last change on this file since 164 was 164, checked in by coas-nagasima, 6 years ago

TOPPERS/ECNLサンプルアプリ「USB充電器電力計」を追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-chdr
File size: 6.0 KB
Line 
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-2008 by Embedded and Real-Time Systems Laboratory
8 * Graduate School of Information Science, Nagoya Univ., JAPAN
9 * Copyright (C) 2014 Cores Co., Ltd. Japan
10 *
11 * ã‹L’˜ìŒ ŽÒ‚́CˆÈ‰º‚Ì(1)`(4)‚ÌðŒ‚ð–ž‚½‚·ê‡‚ÉŒÀ‚èC–{ƒ\ƒtƒgƒEƒF
12 * ƒAi–{ƒ\ƒtƒgƒEƒFƒA‚ð‰ü•Ï‚µ‚½‚à‚Ì‚ðŠÜ‚ށDˆÈ‰º“¯‚¶j‚ðŽg—pE•¡»E‰ü
13 * •ÏEÄ”z•ziˆÈ‰ºC—˜—p‚ƌĂԁj‚·‚邱‚Ƃ𖳏ž‚Å‹–‘ø‚·‚éD
14 * (1) –{ƒ\ƒtƒgƒEƒFƒA‚ðƒ\[ƒXƒR[ƒh‚ÌŒ`‚Å—˜—p‚·‚éê‡‚ɂ́Cã‹L‚Ì’˜ì
15 * Œ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’肪C‚»‚Ì‚Ü‚Ü‚ÌŒ`‚Ń\[
16 * ƒXƒR[ƒh’†‚ÉŠÜ‚Ü‚ê‚Ä‚¢‚邱‚ƁD
17 * (2) –{ƒ\ƒtƒgƒEƒFƒA‚ðCƒ‰ƒCƒuƒ‰ƒŠŒ`Ž®‚ȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
18 * —p‚Å‚«‚éŒ`‚ōĔz•z‚·‚éê‡‚ɂ́CÄ”z•z‚É”º‚¤ƒhƒLƒ…
19ƒƒ“ƒgi—˜—p
20 * ŽÒƒ}ƒjƒ…
21ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L
22 * ‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
23 * (3) –{ƒ\ƒtƒgƒEƒFƒA‚ðC‹@Ší‚É‘g‚ݍž‚ނȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
24 * —p‚Å‚«‚È‚¢Œ`‚ōĔz•z‚·‚éê‡‚ɂ́CŽŸ‚Ì‚¢‚¸‚ê‚©‚ÌðŒ‚ð–ž‚½‚·‚±
25 * ‚ƁD
26 * (a) Ä”z•z‚É”º‚¤ƒhƒLƒ…
27ƒƒ“ƒgi—˜—pŽÒƒ}ƒjƒ…
28ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜
29 * ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
30 * (b) Ä”z•z‚ÌŒ`‘Ô‚ðC•Ê‚É’è‚ß‚é•û–@‚É‚æ‚Á‚āCTOPPERSƒvƒƒWƒFƒNƒg‚É
31 * •ñ‚·‚邱‚ƁD
32 * (4) –{ƒ\ƒtƒgƒEƒFƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚é‚¢‚©‚Ȃ鑹
33 * ŠQ‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð–Ɛӂ·‚邱‚ƁD
34 * ‚Ü‚½C–{ƒ\ƒtƒgƒEƒFƒA‚̃†[ƒU‚Ü‚½‚̓Gƒ“ƒhƒ†[ƒU‚©‚ç‚Ì‚¢‚©‚Ȃ闝
35 * —R‚ÉŠî‚­¿‹‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð
36 * –Ɛӂ·‚邱‚ƁD
37 *
38 * –{ƒ\ƒtƒgƒEƒFƒA‚́C–³•ÛØ‚Å’ñ‹Ÿ‚³‚ê‚Ä‚¢‚é‚à‚Ì‚Å‚ ‚éDã‹L’˜ìŒ ŽÒ‚¨
39 * ‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚́C–{ƒ\ƒtƒgƒEƒFƒA‚ÉŠÖ‚µ‚āC“Á’è‚ÌŽg—p–Ú“I
40 * ‚ɑ΂·‚é“K‡«‚àŠÜ‚߂āC‚¢‚©‚È‚é•ÛØ‚às‚í‚È‚¢D‚Ü‚½C–{ƒ\ƒtƒgƒEƒF
41 * ƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚½‚¢‚©‚Ȃ鑹ŠQ‚ÉŠÖ‚µ‚Ä‚àC‚»
42 * ‚̐ӔC‚𕉂í‚È‚¢D
43 *
44 * @(#) $Id: tool_stddef.h 164 2016-03-07 11:33:50Z coas-nagasima $
45 */
46
47/*
48 * t_stddef.h‚ÌŠJ”­ŠÂ‹«ˆË‘¶•”iMSVC—pj
49 */
50
51#ifndef TOPPERS_TOOL_STDDEF_H
52#define TOPPERS_TOOL_STDDEF_H
53
54/*
55 * ƒRƒ“ƒpƒCƒ‰‚ÌŠg’£‹@”\‚Ì‚½‚߂̃}ƒNƒ’è‹`
56 */
57#ifndef __cplusplus /* C++‚É‚Íinline ‚ª‚ ‚é */
58#if __STDC_VERSION__ < 199901L /* C99‚É‚Íinline ‚ª‚ ‚é */
59#define inline __inline /* ƒCƒ“ƒ‰ƒCƒ“ŠÖ” */
60#endif /* __STDC_VERSION__ < 199901L */
61#endif /* __cplusplus */
62
63#define Inline static __inline /* ƒCƒ“ƒ‰ƒCƒ“ŠÖ” */
64
65#define NoReturn
66 /* ƒŠƒ^[ƒ“‚µ‚È‚¢ŠÖ” */
67
68/*
69 * ŠJ”­ŠÂ‹«‚Ì•W€ƒCƒ“ƒNƒ‹[ƒhƒtƒ@ƒCƒ‹‚Ì—˜—p
70 *
71 * NULL‚Ì’è‹`‚ðstddef.h‚©‚çCINT_MAXCINT_MINCUINT_MAXCLONG_MAXC
72 * LONG_MINCULONG_MAXCCHAR_BIT‚Ì’è‹`‚ðlimits.h‚©‚çŽæ‚荞‚ށD
73 *
74 * C++/EC++‚ł́C•W€Žd—lã‚Í‚±‚ê‚ç‚̃Cƒ“ƒNƒ‹[ƒhƒtƒ@ƒCƒ‹‚ª—pˆÓ‚³‚ê‚Ä
75 * ‚¢‚é‚Æ‚ÍŒÀ‚ç‚È‚¢‚Ì‚Å’ˆÓ‚ª•K—v‚Å‚ ‚éi‚Ù‚Æ‚ñ‚Ç‚ÌŠJ”­ŠÂ‹«‚Å—pˆÓ‚³‚ê
76 * ‚Ä‚¢‚éjD
77 */
78#ifndef TOPPERS_MACRO_ONLY
79#include <stddef.h>
80#include <limits.h>
81#endif /* TOPPERS_MACRO_ONLY */
82
83/*
84 * stdint.h‚Ì‘ã—p‚Æ‚È‚é’è‹`
85 *
86 * ŠJ”­ŠÂ‹«‚Éstdint.h‚ª—pˆÓ‚³‚ê‚Ä‚¨‚炸CŠe®”Œ^‚̃TƒCƒY‚ª‚ ‚éƒpƒ^[
87 * ƒ“‚É“–‚Ä‚Í‚Ü‚éê‡‚ɁCstdint.h‚Ì‘ã—p‚Æ‚È‚é’è‹`‚ð—^‚¦‚éD
88 *
89 * TOPPERS_STDINT_TYPE1: char/short/int/long long‚̃rƒbƒg’·‚ª‚»‚ꂼ‚ê
90 * 8/16/32/64ƒrƒbƒg‚ŁCƒ|ƒCƒ“ƒ^‚̃rƒbƒg’·‚ªlong
91 * ‚̃rƒbƒg’·‚ƈê’v‚·‚éê‡
92 */
93#ifdef TOPPERS_STDINT_TYPE1
94
95/*
96 * ƒRƒ“ƒpƒCƒ‰ˆË‘¶‚̃f[ƒ^Œ^‚Ì’è‹`
97 */
98#ifndef TOPPERS_MACRO_ONLY
99
100typedef signed char int8_t; /* •„†•t‚«8ƒrƒbƒg®” */
101typedef unsigned char uint8_t; /* •„†–³‚µ8ƒrƒbƒg®” */
102
103typedef signed short int16_t; /* •„†•t‚«16ƒrƒbƒg®” */
104typedef unsigned short uint16_t; /* •„†–³‚µ16ƒrƒbƒg®” */
105
106typedef signed int int32_t; /* •„†•t‚«32ƒrƒbƒg®” */
107typedef unsigned int uint32_t; /* •„†–³‚µ32ƒrƒbƒg®” */
108
109typedef signed long long int64_t; /* •„†•t‚«64ƒrƒbƒg®” */
110typedef unsigned long long uint64_t; /* •„†–³‚µ64ƒrƒbƒg®” */
111
112typedef int8_t int_least8_t; /* 8ƒrƒbƒgˆÈã‚Ì•„†•t‚«®” */
113typedef uint8_t uint_least8_t; /* 8ƒrƒbƒgˆÈã‚Ì•„†–³‚µ®” */
114
115//typedef long intptr_t; /* ƒ|ƒCƒ“ƒ^‚ðŠi”[‚Å‚«‚é•„†•t‚«®” */
116//typedef unsigned long uintptr_t; /* ƒ|ƒCƒ“ƒ^‚ðŠi”[‚Å‚«‚é•„†–³‚µ®” */
117
118#endif /* TOPPERS_MACRO_ONLY */
119
120/*
121 * ƒRƒ“ƒpƒCƒ‰ˆË‘¶‚̃f[ƒ^Œ^‚̐®”’萔‚ðì‚éƒ}ƒNƒ
122 */
123#ifndef INT8_C
124#define INT8_C(val) (val)
125#endif /* INT8_C */
126
127#ifndef UINT8_C
128#define UINT8_C(val) (val ## U)
129#endif /* UINT8_C */
130
131#ifndef INT16_C
132#define INT16_C(val) (val)
133#endif /* INT16_C */
134
135#ifndef UINT16_C
136#define UINT16_C(val) (val ## U)
137#endif /* UINT16_C */
138
139#ifndef INT32_C
140#define INT32_C(val) (val)
141#endif /* INT32_C */
142
143#ifndef UINT32_C
144#define UINT32_C(val) (val ## U)
145#endif /* UINT32_C */
146
147#ifndef INT64_C
148#define INT64_C(val) (val ## LL)
149#endif /* INT64_C */
150
151#ifndef UINT64_C
152#define UINT64_C(val) (val ## ULL)
153#endif /* UINT64_C */
154
155/*
156 * ƒRƒ“ƒpƒCƒ‰ˆË‘¶‚̃f[ƒ^Œ^‚ÉŠi”[‚Å‚«‚éÅ‘å’l‚ƍŏ¬’l‚Ì’è‹`
157 */
158#define INT8_MAX SCHAR_MAX
159#define INT8_MIN SCHAR_MIN
160#define UINT8_MAX UCHAR_MAX
161
162#define INT16_MAX SHRT_MAX
163#define INT16_MIN SHRT_MIN
164#define UINT16_MAX USHRT_MAX
165
166#define INT32_MAX INT_MAX
167#define INT32_MIN INT_MIN
168#define UINT32_MAX UINT_MAX
169
170#define INT64_MAX LLONG_MAX
171#define INT64_MIN LLONG_MIN
172#define UINT64_MAX ULLONG_MAX
173
174#define INT_LEAST8_MAX INT8_MAX
175#define INT_LEAST8_MIN INT8_MIN
176#define UINT_LEAST8_MAX INT8_MAX
177
178#endif /* TOPPERS_STDINT_TYPE1 */
179
180/*
181 * •‚“®¬”“_Œ^‚ÉŠÖ‚·‚é’è‹`
182 *
183 * TOPPERS_STDFLOAT_TYPE1: float‚ªIEEE754€‹’‚Ì’P¸“x•‚“®¬”“_”C
184 * double‚ª”{¸“x•‚“®¬”“_”‚̏ꍇ
185 */
186#ifdef TOPPERS_STDFLOAT_TYPE1
187#ifndef TOPPERS_MACRO_ONLY
188
189typedef float float32_t; /* IEEE754€‹’‚Ì’P¸“x•‚“®¬”“_” */
190typedef double double64_t; /* IEEE754€‹’‚Ì”{¸“x•‚“®¬”“_” */
191
192#endif /* TOPPERS_MACRO_ONLY */
193
194#define FLOAT32_MIN 1.17549435e-38F
195#define FLOAT32_MAX 3.40282347e+38F
196#define DOUBLE64_MIN 2.2250738585072014e-308
197#define DOUBLE64_MAX 1.7976931348623157e+308
198
199#endif /* TOPPERS_STDFLOAT_TYPE1 */
200
201#define TOPPERS_EMPTY_LABEL(x,y) x y[1]
202
203#endif /* TOPPERS_TOOL_STDDEF_H */
Note: See TracBrowser for help on using the repository browser.