📄 stdint_8h-source.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>AVR221 - PID controller: stdint.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.7 --><div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div><h1>stdint.h</h1><a href="stdint_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">/* ISO C9x 7.18 Integer types <stdint.h></span>00002 <span class="comment"> * Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794)</span>00003 <span class="comment"> *</span>00004 <span class="comment"> * THIS SOFTWARE IS NOT COPYRIGHTED</span>00005 <span class="comment"> *</span>00006 <span class="comment"> * Contributor: ATMEL Norway AS</span>00007 <span class="comment"> * Adapted to IAR C Compiler for Atmel AVR 8-bit RISC MCU.</span>00008 <span class="comment"> *</span>00009 <span class="comment"> * This source code is offered for use in the public domain. You may</span>00010 <span class="comment"> * use, modify or distribute it freely.</span>00011 <span class="comment"> *</span>00012 <span class="comment"> * This code is distributed in the hope that it will be useful but</span>00013 <span class="comment"> * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY</span>00014 <span class="comment"> * DISCLAIMED. This includes but is not limited to warranties of</span>00015 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span>00016 <span class="comment"> *</span>00017 <span class="comment"> * Date: 2005-12-20</span>00018 <span class="comment"> */</span>00019 00020 00021 <span class="preprocessor">#ifndef _STDINT_H</span>00022 <span class="preprocessor"></span><span class="preprocessor">#define _STDINT_H</span>00023 <span class="preprocessor"></span><span class="preprocessor">#include <stddef.h></span>00024 00025 <span class="comment">/* 7.18.1.1 Exact-width integer types */</span><a name="l00026"></a><a class="code" href="stdint_8h.html#a55">00026</a> <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">char</span> <a class="code" href="stdint_8h.html#a55">int8_t</a>;<a name="l00027"></a><a class="code" href="stdint_8h.html#a56">00027</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="stdint_8h.html#a56">uint8_t</a>;<a name="l00028"></a><a class="code" href="stdint_8h.html#a57">00028</a> <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">short</span> <a class="code" href="stdint_8h.html#a57">int16_t</a>;<a name="l00029"></a><a class="code" href="stdint_8h.html#a58">00029</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="stdint_8h.html#a58">uint16_t</a>;<a name="l00030"></a><a class="code" href="stdint_8h.html#a59">00030</a> <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">long</span> <a class="code" href="stdint_8h.html#a59">int32_t</a>;<a name="l00031"></a><a class="code" href="stdint_8h.html#a60">00031</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="stdint_8h.html#a60">uint32_t</a>;<a name="l00032"></a><a class="code" href="stdint_8h.html#a61">00032</a> <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="stdint_8h.html#a61">int64_t</a>;<a name="l00033"></a><a class="code" href="stdint_8h.html#a62">00033</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="stdint_8h.html#a62">uint64_t</a>;00034 00035 <span class="comment">/* 7.18.1.2 Minimum-width integer types */</span><a name="l00036"></a><a class="code" href="stdint_8h.html#a63">00036</a> <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">char</span> <a class="code" href="stdint_8h.html#a63">int_least8_t</a>;<a name="l00037"></a><a class="code" href="stdint_8h.html#a64">00037</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="stdint_8h.html#a64">uint_least8_t</a>;<a name="l00038"></a><a class="code" href="stdint_8h.html#a65">00038</a> <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">short</span> <a class="code" href="stdint_8h.html#a65">int_least16_t</a>;<a name="l00039"></a><a class="code" href="stdint_8h.html#a66">00039</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="stdint_8h.html#a66">uint_least16_t</a>;<a name="l00040"></a><a class="code" href="stdint_8h.html#a67">00040</a> <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">long</span> <a class="code" href="stdint_8h.html#a67">int_least32_t</a>;<a name="l00041"></a><a class="code" href="stdint_8h.html#a68">00041</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="stdint_8h.html#a68">uint_least32_t</a>;<a name="l00042"></a><a class="code" href="stdint_8h.html#a69">00042</a> <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="stdint_8h.html#a69">int_least64_t</a>;<a name="l00043"></a><a class="code" href="stdint_8h.html#a70">00043</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="stdint_8h.html#a70">uint_least64_t</a>;00044 00045 <span class="comment">/* 7.18.1.3 Fastest minimum-width integer types</span>00046 <span class="comment"> * Not actually guaranteed to be fastest for all purposes</span>00047 <span class="comment"> * Here we use the exact-width types for 8 and 16-bit ints.</span>00048 <span class="comment"> */</span><a name="l00049"></a><a class="code" href="stdint_8h.html#a71">00049</a> <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">char</span> <a class="code" href="stdint_8h.html#a71">int_fast8_t</a>;<a name="l00050"></a><a class="code" href="stdint_8h.html#a72">00050</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="stdint_8h.html#a72">uint_fast8_t</a>;<a name="l00051"></a><a class="code" href="stdint_8h.html#a73">00051</a> <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">short</span> <a class="code" href="stdint_8h.html#a73">int_fast16_t</a>;<a name="l00052"></a><a class="code" href="stdint_8h.html#a74">00052</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="stdint_8h.html#a74">uint_fast16_t</a>;<a name="l00053"></a><a class="code" href="stdint_8h.html#a75">00053</a> <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">long</span> <a class="code" href="stdint_8h.html#a75">int_fast32_t</a>;<a name="l00054"></a><a class="code" href="stdint_8h.html#a76">00054</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="stdint_8h.html#a76">uint_fast32_t</a>;<a name="l00055"></a><a class="code" href="stdint_8h.html#a77">00055</a> <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="stdint_8h.html#a77">int_fast64_t</a>;<a name="l00056"></a><a class="code" href="stdint_8h.html#a78">00056</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="stdint_8h.html#a78">uint_fast64_t</a>;00057 00058 <span class="comment">/* 7.18.1.4 Integer types capable of holding object pointers */</span>00059 <span class="comment">// Already defined by IAR, and differs between specific devices.</span>00060 <span class="comment">//typedef signed int intptr_t;</span>00061 <span class="comment">//typedef unsigned uintptr_t;</span>00062 00063 <span class="comment">/* 7.18.1.5 Greatest-width integer types */</span><a name="l00064"></a><a class="code" href="stdint_8h.html#a79">00064</a> <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="stdint_8h.html#a79">intmax_t</a>;<a name="l00065"></a><a class="code" href="stdint_8h.html#a80">00065</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="stdint_8h.html#a80">uintmax_t</a>;00066 00067 <span class="comment">/* 7.18.2 Limits of specified-width integer types */</span>00068 <span class="preprocessor">#if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)</span>00069 <span class="preprocessor"></span>00070 <span class="comment">/* 7.18.2.1 Limits of exact-width integer types */</span><a name="l00071"></a><a class="code" href="stdint_8h.html#a0">00071</a> <span class="preprocessor">#define INT8_MIN (-128)</span><a name="l00072"></a><a class="code" href="stdint_8h.html#a1">00072</a> <span class="preprocessor"></span><span class="preprocessor">#define INT16_MIN (-32768)</span><a name="l00073"></a><a class="code" href="stdint_8h.html#a2">00073</a> <span class="preprocessor"></span><span class="preprocessor">#define INT32_MIN (-2147483647 - 1)</span><a name="l00074"></a><a class="code" href="stdint_8h.html#a3">00074</a> <span class="preprocessor"></span><span class="preprocessor">#define INT64_MIN (-9223372036854775807LL - 1)</span>00075 <span class="preprocessor"></span><a name="l00076"></a><a class="code" href="stdint_8h.html#a4">00076</a> <span class="preprocessor">#define INT8_MAX 127</span><a name="l00077"></a><a class="code" href="stdint_8h.html#a5">00077</a> <span class="preprocessor"></span><span class="preprocessor">#define INT16_MAX 32767</span><a name="l00078"></a><a class="code" href="stdint_8h.html#a6">00078</a> <span class="preprocessor"></span><span class="preprocessor">#define INT32_MAX 2147483647</span><a name="l00079"></a><a class="code" href="stdint_8h.html#a7">00079</a> <span class="preprocessor"></span><span class="preprocessor">#define INT64_MAX 9223372036854775807LL</span>00080 <span class="preprocessor"></span><a name="l00081"></a><a class="code" href="stdint_8h.html#a8">00081</a> <span class="preprocessor">#define UINT8_MAX 0xff </span><span class="comment">/* 255U */</span><a name="l00082"></a><a class="code" href="stdint_8h.html#a9">00082</a> <span class="preprocessor">#define UINT16_MAX 0xffff </span><span class="comment">/* 65535U */</span><a name="l00083"></a><a class="code" href="stdint_8h.html#a10">00083</a> <span class="preprocessor">#define UINT32_MAX 0xffffffff </span><span class="comment">/* 4294967295U */</span>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -