//定义的常见形式
/* exact-width signed integer types */
typedef signed char int8_t;//one byte
typedef signed short int int16_t;//two byte
typedef signed int int32_t;//four byte
typedef signed __INT64 int64_t;
/* exact-width unsigned integer types */
typedef unsigned char uint8_t;//one byte
typedef unsigned short int uint16_t;//two byte
typedef unsigned int uint32_t;//four byte
typedef unsigned __INT64 uint64_t;
//对应不同整型的数据范围
/* minimum values of exact-width signed integer types */
#define INT8_MIN -128
#define INT16_MIN -32768
#define INT32_MIN (~0x7fffffff) /* -2147483648 is unsigned */
#define INT64_MIN __INT64_C(~0x7fffffffffffffff) /* -9223372036854775808 is unsigned */
/* maximum values of exact-width signed integer types */
#define INT8_MAX 127
#define INT16_MAX 32767
#define INT32_MAX 2147483647
#define INT64_MAX __INT64_C(9223372036854775807)
/* maximum values of exact-width unsigned integer types */
#define UINT8_MAX 255
#define UINT16_MAX 65535
#define UINT32_MAX 4294967295u
#define UINT64_MAX __UINT64_C(18446744073709551615)
参考:基于STM32库开发函数文件---#include <stdint.h>