📄 stdint.h
字号:
/** \ingroup avr_stdint
largest positive value an int32_t can hold. */
#define INT32_MAX 0x7fffffffL
/** \ingroup avr_stdint
smallest negative value an int32_t can hold. */
#define INT32_MIN (-INT32_MAX - 1L)
/** \ingroup avr_stdint
largest value an uint32_t can hold. */
#define UINT32_MAX (__CONCAT(INT32_MAX, U) * 2UL + 1UL)
#endif /* __USING_MINT8 */
/** \ingroup avr_stdint
largest positive value an int64_t can hold. */
#define INT64_MAX 0x7fffffffffffffffLL
/** \ingroup avr_stdint
smallest negative value an int64_t can hold. */
#define INT64_MIN (-INT64_MAX - 1LL)
/** \ingroup avr_stdint
largest value an uint64_t can hold. */
#define UINT64_MAX (__CONCAT(INT64_MAX, U) * 2ULL + 1ULL)
/*@}*/
/** \name Limits of minimum-width integer types */
/*@{*/
/** \ingroup avr_stdint
largest positive value an int_least8_t can hold. */
#define INT_LEAST8_MAX INT8_MAX
/** \ingroup avr_stdint
smallest negative value an int_least8_t can hold. */
#define INT_LEAST8_MIN INT8_MIN
/** \ingroup avr_stdint
largest value an uint_least8_t can hold. */
#define UINT_LEAST8_MAX UINT8_MAX
/** \ingroup avr_stdint
largest positive value an int_least16_t can hold. */
#define INT_LEAST16_MAX INT16_MAX
/** \ingroup avr_stdint
smallest negative value an int_least16_t can hold. */
#define INT_LEAST16_MIN INT16_MIN
/** \ingroup avr_stdint
largest value an uint_least16_t can hold. */
#define UINT_LEAST16_MAX UINT16_MAX
/** \ingroup avr_stdint
largest positive value an int_least32_t can hold. */
#define INT_LEAST32_MAX INT32_MAX
/** \ingroup avr_stdint
smallest negative value an int_least32_t can hold. */
#define INT_LEAST32_MIN INT32_MIN
/** \ingroup avr_stdint
largest value an uint_least32_t can hold. */
#define UINT_LEAST32_MAX UINT32_MAX
/** \ingroup avr_stdint
largest positive value an int_least64_t can hold. */
#define INT_LEAST64_MAX INT64_MAX
/** \ingroup avr_stdint
smallest negative value an int_least64_t can hold. */
#define INT_LEAST64_MIN INT64_MIN
/** \ingroup avr_stdint
largest value an uint_least64_t can hold. */
#define UINT_LEAST64_MAX UINT64_MAX
/*@}*/
/** \name Limits of fastest minimum-width integer types */
/*@{*/
/** \ingroup avr_stdint
largest positive value an int_fast8_t can hold. */
#define INT_FAST8_MAX INT8_MAX
/** \ingroup avr_stdint
smallest negative value an int_fast8_t can hold. */
#define INT_FAST8_MIN INT8_MIN
/** \ingroup avr_stdint
largest value an uint_fast8_t can hold. */
#define UINT_FAST8_MAX UINT8_MAX
/** \ingroup avr_stdint
largest positive value an int_fast16_t can hold. */
#define INT_FAST16_MAX INT16_MAX
/** \ingroup avr_stdint
smallest negative value an int_fast16_t can hold. */
#define INT_FAST16_MIN INT16_MIN
/** \ingroup avr_stdint
largest value an uint_fast16_t can hold. */
#define UINT_FAST16_MAX UINT16_MAX
/** \ingroup avr_stdint
largest positive value an int_fast32_t can hold. */
#define INT_FAST32_MAX INT32_MAX
/** \ingroup avr_stdint
smallest negative value an int_fast32_t can hold. */
#define INT_FAST32_MIN INT32_MIN
/** \ingroup avr_stdint
largest value an uint_fast32_t can hold. */
#define UINT_FAST32_MAX UINT32_MAX
/** \ingroup avr_stdint
largest positive value an int_fast64_t can hold. */
#define INT_FAST64_MAX INT64_MAX
/** \ingroup avr_stdint
smallest negative value an int_fast64_t can hold. */
#define INT_FAST64_MIN INT64_MIN
/** \ingroup avr_stdint
largest value an uint_fast64_t can hold. */
#define UINT_FAST64_MAX UINT64_MAX
/*@}*/
/** \name Limits of integer types capable of holding object pointers */
/*@{*/
/** \ingroup avr_stdint
largest positive value an intptr_t can hold. */
#define INTPTR_MAX INT16_MAX
/** \ingroup avr_stdint
smallest negative value an intptr_t can hold. */
#define INTPTR_MIN INT16_MIN
/** \ingroup avr_stdint
largest value an uintptr_t can hold. */
#define UINTPTR_MAX UINT16_MAX
/*@}*/
/** \name Limits of greatest-width integer types */
/*@{*/
/** \ingroup avr_stdint
largest positive value an intmax_t can hold. */
#define INTMAX_MAX INT64_MAX
/** \ingroup avr_stdint
smallest negative value an intmax_t can hold. */
#define INTMAX_MIN INT64_MIN
/** \ingroup avr_stdint
largest value an uintmax_t can hold. */
#define UINTMAX_MAX UINT64_MAX
/*@}*/
/** \name Limits of other integer types
C++ implementations should define these macros only when
__STDC_LIMIT_MACROS is defined before <stdint.h> is included */
/*@{*/
/** \ingroup avr_stdint
largest positive value a ptrdiff_t can hold. */
#define PTRDIFF_MAX INT16_MAX
/** \ingroup avr_stdint
smallest negative value a ptrdiff_t can hold. */
#define PTRDIFF_MIN INT16_MIN
/* Limits of sig_atomic_t */
/* signal.h is currently not implemented (not avr/signal.h) */
/** \ingroup avr_stdint
largest positive value a sig_atomic_t can hold. */
#define SIG_ATOMIC_MAX INT8_MAX
/** \ingroup avr_stdint
smallest negative value a sig_atomic_t can hold. */
#define SIG_ATOMIC_MIN INT8_MIN
/** \ingroup avr_stdint
largest value a size_t can hold. */
#define SIZE_MAX (__CONCAT(INT16_MAX, U))
/* Limits of wchar_t */
/* wchar.h is currently not implemented */
/* #define WCHAR_MAX */
/* #define WCHAR_MIN */
/* Limits of wint_t */
/* wchar.h is currently not implemented */
/* #define WINT_MAX */
/* #define WINT_MIN */
#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
/** \name Macros for integer constants
C++ implementations should define these macros only when
__STDC_CONSTANT_MACROS is defined before <stdint.h> is included.
These definitions are valid for integer constants without suffix and
for macros defined as integer constant without suffix */
/** \ingroup avr_stdint
define a constant of type int8_t */
#define INT8_C(value) ((int8_t) value)
/** \ingroup avr_stdint
define a constant of type uint8_t */
#define UINT8_C(value) ((uint8_t) __CONCAT(value, U))
#if __USING_MINT8
#define INT16_C(value) __CONCAT(value, L)
#define UINT16_C(value) __CONCAT(value, UL)
#define INT32_C(value) ((int32_t) __CONCAT(value, LL))
#define UINT32_C(value) ((uint32_t) __CONCAT(value, ULL))
#else /* !__USING_MINT8 */
/** \ingroup avr_stdint
define a constant of type int16_t */
#define INT16_C(value) value
/** \ingroup avr_stdint
define a constant of type uint16_t */
#define UINT16_C(value) __CONCAT(value, U)
/** \ingroup avr_stdint
define a constant of type int32_t */
#define INT32_C(value) __CONCAT(value, L)
/** \ingroup avr_stdint
define a constant of type uint32_t */
#define UINT32_C(value) __CONCAT(value, UL)
#endif /* __USING_MINT8 */
/** \ingroup avr_stdint
define a constant of type int64_t */
#define INT64_C(value) __CONCAT(value, LL)
/** \ingroup avr_stdint
define a constant of type uint64_t */
#define UINT64_C(value) __CONCAT(value, ULL)
/** \ingroup avr_stdint
define a constant of type intmax_t */
#define INTMAX_C(value) __CONCAT(value, LL)
/** \ingroup avr_stdint
define a constant of type uintmax_t */
#define UINTMAX_C(value) __CONCAT(value, ULL)
/*@}*/
#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
#endif /* _STDINT_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -