avr_stdint(3avr)
β¨ NAME β¨
okay so welcome to avr_stdint, aka the manual page for <stdint.h> π β the Standard Integer Types. bestie, this is your one-stop shop for "i want a number that is exactly this many bits and nothing weird is gonna happen to it, i promise." π
πΈ SYNOPSIS πΈ
π Exact-width integer types
Integer types having exactly the specified width β no more, no less, no wiggle room π
typedef signed char int8_t
typedef unsigned char uint8_t
typedef signed int int16_t
typedef unsigned int uint16_t
typedef signed long int int32_t
typedef unsigned long int uint32_t
typedef signed long long int int64_t
typedef unsigned long long int uint64_t
π¦ Integer types capable of holding object pointers
These allow you to declare variables of the same size as a pointer. yes they're just pointers but as integers, it's giving "i contain multitudes" β¨
typedef int16_t intptr_t
typedef uint16_t uintptr_t
π Minimum-width integer types
Integer types having at least the specified width β the bare minimum, but make it fashion π
typedef int8_t int_least8_t
typedef uint8_t uint_least8_t
typedef int16_t int_least16_t
typedef uint16_t uint_least16_t
typedef int32_t int_least32_t
typedef uint32_t uint_least32_t
typedef int64_t int_least64_t
typedef uint64_t uint_least64_t
πΈ Fastest minimum-width integer types
Integer types being usually fastest having at least the specified width β speed, but only probably. it's giving vibes not guarantees π
typedef int8_t int_fast8_t
typedef uint8_t uint_fast8_t
typedef int16_t int_fast16_t
typedef uint16_t uint_fast16_t
typedef int32_t int_fast32_t
typedef uint32_t uint_fast32_t
typedef int64_t int_fast64_t
typedef uint64_t uint_fast64_t
π Greatest-width integer types
Types designating integer data capable of representing any value of any integer type in the corresponding signed or unsigned category β the main character of ints, tbh π«Ά
typedef int64_t intmax_t
typedef uint64_t uintmax_t
π Limits of specified-width integer types
C++ implementations should define these macros only when __STDC_LIMIT_MACROS is defined before <stdint.h> is included. (yes this is the rules, write it down π)
#define INT8_MAX 0x7f
#define INT8_MIN (-INT8_MAX - 1)
#define UINT8_MAX (INT8_MAX * 2 + 1)
#define INT16_MAX 0x7fff
#define INT16_MIN (-INT16_MAX - 1)
#define UINT16_MAX (__CONCAT(INT16_MAX, U) * 2U + 1U)
#define INT32_MAX 0x7fffffffL
#define INT32_MIN (-INT32_MAX - 1L)
#define UINT32_MAX (__CONCAT(INT32_MAX, U) * 2UL + 1UL)
#define INT64_MAX 0x7fffffffffffffffLL
#define INT64_MIN (-INT64_MAX - 1LL)
#define UINT64_MAX (__CONCAT(INT64_MAX, U) * 2ULL + 1ULL)
π Limits of minimum-width integer types
#define INT_LEAST8_MAX INT8_MAX
#define INT_LEAST8_MIN INT8_MIN
#define UINT_LEAST8_MAX UINT8_MAX
#define INT_LEAST16_MAX INT16_MAX
#define INT_LEAST16_MIN INT16_MIN
#define UINT_LEAST16_MAX UINT16_MAX
#define INT_LEAST32_MAX INT32_MAX
#define INT_LEAST32_MIN INT32_MIN
#define UINT_LEAST32_MAX UINT32_MAX
#define INT_LEAST64_MAX INT64_MAX
#define INT_LEAST64_MIN INT64_MIN
#define UINT_LEAST64_MAX UINT64_MAX
β Limits of fastest minimum-width integer types
#define INT_FAST8_MAX INT8_MAX
#define INT_FAST8_MIN INT8_MIN
#define UINT_FAST8_MAX UINT8_MAX
#define INT_FAST16_MAX INT16_MAX
#define INT_FAST16_MIN INT16_MIN
#define UINT_FAST16_MAX UINT16_MAX
#define INT_FAST32_MAX INT32_MAX
#define INT_FAST32_MIN INT32_MIN
#define UINT_FAST32_MAX UINT32_MAX
#define INT_FAST64_MAX INT64_MAX
#define INT_FAST64_MIN INT64_MIN
#define UINT_FAST64_MAX UINT64_MAX
π₯ Limits of integer types capable of holding object pointers
#define INTPTR_MAX INT16_MAX
#define INTPTR_MIN INT16_MIN
#define UINTPTR_MAX UINT16_MAX
π Limits of greatest-width integer types
#define INTMAX_MAX INT64_MAX
#define INTMAX_MIN INT64_MIN
#define UINTMAX_MAX UINT64_MAX
πΈ Limits of other integer types
C++ implementations should define these macros only when __STDC_LIMIT_MACROS is defined before <stdint.h> is included. (same rule, different macros, we stay consistent π
)
#define PTRDIFF_MAX INT16_MAX
#define PTRDIFF_MIN INT16_MIN
#define SIG_ATOMIC_MAX INT8_MAX
#define SIG_ATOMIC_MIN INT8_MIN
#define SIZE_MAX UINT16_MAX
#define WCHAR_MAX __WCHAR_MAX__
#define WCHAR_MIN __WCHAR_MIN__
#define WINT_MAX __WINT_MAX__
#define WINT_MIN __WINT_MIN__
π§ 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 π
#define INT8_C(value)
#define UINT8_C(value)
#define INT16_C(value)
#define UINT16_C(value)
#define INT32_C(value)
#define UINT32_C(value)
#define INT64_C(value)
#define UINT64_C(value)
#define INTMAX_C(value)
#define UINTMAX_C(value)
π Detailed Description π
#include <stdint.h>
Use [u]intN_t if you need exactly N bits. no cap, that's the whole point π―
Since these typedefs are mandated by the C99 standard, they are preferred over rolling your own typedefs. like bestie please do not hand-craft your own, the standard already did it for you and she ate π₯
π Macro Definition Documentation π
buckle up, this is the long part, but every single one of these is important so we're reading all of them, periodt π
π #define INT16_C( value)
Value:
value
define a constant of type int16_t β¨
πΈ #define INT16_MAX 0x7fff
largest positive value an int16_t can hold.
π¦ #define INT16_MIN (-INT16_MAX - 1)
smallest negative value an int16_t can hold.
π #define INT32_C( value)
Value:
__CONCAT(value, L)
define a constant of type int32_t β¨
π #define INT32_MAX 0x7fffffffL
largest positive value an int32_t can hold.
π #define INT32_MIN (-INT32_MAX - 1L)
smallest negative value an int32_t can hold.
β #define INT64_C( value)
Value:
__CONCAT(value, LL)
define a constant of type int64_t β¨
π #define INT64_MAX 0x7fffffffffffffffLL
largest positive value an int64_t can hold.
π #define INT64_MIN (-INT64_MAX - 1LL)
smallest negative value an int64_t can hold.
π§ #define INT8_C( value)
Value:
((int8_t) value)
define a constant of type int8_t β¨
πΈ #define INT8_MAX 0x7f
largest positive value an int8_t can hold.
π #define INT8_MIN (-INT8_MAX - 1)
smallest negative value an int8_t can hold.
π¦ #define INT_FAST16_MAX INT16_MAX
largest positive value an int_fast16_t can hold.
π #define INT_FAST16_MIN INT16_MIN
smallest negative value an int_fast16_t can hold.
π #define INT_FAST32_MAX INT32_MAX
largest positive value an int_fast32_t can hold.
π #define INT_FAST32_MIN INT32_MIN
smallest negative value an int_fast32_t can hold.
β #define INT_FAST64_MAX INT64_MAX
largest positive value an int_fast64_t can hold.
π #define INT_FAST64_MIN INT64_MIN
smallest negative value an int_fast64_t can hold.
π #define INT_FAST8_MAX INT8_MAX
largest positive value an int_fast8_t can hold.
π§ #define INT_FAST8_MIN INT8_MIN
smallest negative value an int_fast8_t can hold.
πΈ #define INT_LEAST16_MAX INT16_MAX
largest positive value an int_least16_t can hold.
π #define INT_LEAST16_MIN INT16_MIN
smallest negative value an int_least16_t can hold.
π¦ #define INT_LEAST32_MAX INT32_MAX
largest positive value an int_least32_t can hold.
π #define INT_LEAST32_MIN INT32_MIN
smallest negative value an int_least32_t can hold.
π #define INT_LEAST64_MAX INT64_MAX
largest positive value an int_least64_t can hold.
π #define INT_LEAST64_MIN INT64_MIN
smallest negative value an int_least64_t can hold.
β #define INT_LEAST8_MAX INT8_MAX
largest positive value an int_least8_t can hold.
π #define INT_LEAST8_MIN INT8_MIN
smallest negative value an int_least8_t can hold.
π #define INTMAX_C( value)
Value:
__CONCAT(value, LL)
define a constant of type intmax_t β¨
π§ #define INTMAX_MAX INT64_MAX
largest positive value an intmax_t can hold.
πΈ #define INTMAX_MIN INT64_MIN
smallest negative value an intmax_t can hold.
π #define INTPTR_MAX INT16_MAX
largest positive value an intptr_t can hold.
π¦ #define INTPTR_MIN INT16_MIN
smallest negative value an intptr_t can hold.
π #define PTRDIFF_MAX INT16_MAX
largest positive value a ptrdiff_t can hold.
π #define PTRDIFF_MIN INT16_MIN
smallest negative value a ptrdiff_t can hold.
π #define SIG_ATOMIC_MAX INT8_MAX
largest positive value a sig_atomic_t can hold.
β #define SIG_ATOMIC_MIN INT8_MIN
smallest negative value a sig_atomic_t can hold.
π #define SIZE_MAX UINT16_MAX
largest value a size_t can hold.
π #define UINT16_C( value)
Value:
__CONCAT(value, U)
define a constant of type uint16_t β¨
π§ #define UINT16_MAX (__CONCAT(INT16_MAX, U) * 2U + 1U)
largest value an uint16_t can hold.
πΈ #define UINT32_C( value)
Value:
__CONCAT(value, UL)
define a constant of type uint32_t β¨
π #define UINT32_MAX (__CONCAT(INT32_MAX, U) * 2UL + 1UL)
largest value an uint32_t can hold.
π¦ #define UINT64_C( value)
Value:
__CONCAT(value, ULL)
define a constant of type uint64_t β¨
π #define UINT64_MAX (__CONCAT(INT64_MAX, U) * 2ULL + 1ULL)
largest value an uint64_t can hold.
π #define UINT8_C( value)
Value:
((uint8_t) __CONCAT(value, U))
define a constant of type uint8_t β¨
π #define UINT8_MAX (INT8_MAX * 2 + 1)
largest value an uint8_t can hold.
β #define UINT_FAST16_MAX UINT16_MAX
largest value an uint_fast16_t can hold.
π #define UINT_FAST32_MAX UINT32_MAX
largest value an uint_fast32_t can hold.
π #define UINT_FAST64_MAX UINT64_MAX
largest value an uint_fast64_t can hold.
π§ #define UINT_FAST8_MAX UINT8_MAX
largest value an uint_fast8_t can hold.
πΈ #define UINT_LEAST16_MAX UINT16_MAX
largest value an uint_least16_t can hold.
π #define UINT_LEAST32_MAX UINT32_MAX
largest value an uint_least32_t can hold.
π¦ #define UINT_LEAST64_MAX UINT64_MAX
largest value an uint_least64_t can hold.
π #define UINT_LEAST8_MAX UINT8_MAX
largest value an uint_least8_t can hold.
π #define UINTMAX_C( value)
Value:
__CONCAT(value, ULL)
define a constant of type uintmax_t β¨
π #define UINTMAX_MAX UINT64_MAX
largest value an uintmax_t can hold.
β #define UINTPTR_MAX UINT16_MAX
largest value an uintptr_t can hold.
β¨ Typedef Documentation β¨
okay bestie, here's the full typedef lineup β every single one, no skips, fr fr. π
typedef signed int int16_tβ 16-bit signed type. πtypedef signed long int int32_tβ 32-bit signed type. β¨typedef signed long long int int64_tβ 64-bit signed type. π¦
π¨ Note: This type is not available when the compiler option -mint8 is in effect.
typedef signed char int8_tβ 8-bit signed type. πΈtypedef int16_t int_fast16_tβ fastest signed int with at least 16 bits. πtypedef int32_t int_fast32_tβ fastest signed int with at least 32 bits. πtypedef int64_t int_fast64_tβ fastest signed int with at least 64 bits. π
π¨ Note: This type is not available when the compiler option -mint8 is in effect.
typedef int8_t int_fast8_tβ fastest signed int with at least 8 bits. πtypedef int16_t int_least16_tβ signed int with at least 16 bits. πtypedef int32_t int_least32_tβ signed int with at least 32 bits. πtypedef int64_t int_least64_tβ signed int with at least 64 bits. π
π¨ Note: This type is not available when the compiler option -mint8 is in effect.
typedef int8_t int_least8_tβ signed int with at least 8 bits. πtypedef int64_t intmax_tβ largest signed int available. πtypedef int16_t intptr_tβ Signed pointer compatible type. π«Άtypedef unsigned int uint16_tβ 16-bit unsigned type. πtypedef unsigned long int uint32_tβ 32-bit unsigned type. πtypedef unsigned long long int uint64_tβ 64-bit unsigned type. π
π¨ Note: This type is not available when the compiler option -mint8 is in effect.
typedef unsigned char uint8_tβ 8-bit unsigned type. πtypedef uint16_t uint_fast16_tβ fastest unsigned int with at least 16 bits. πtypedef uint32_t uint_fast32_tβ fastest unsigned int with at least 32 bits. πtypedef uint64_t uint_fast64_tβ fastest unsigned int with at least 64 bits. π
π¨ Note: This type is not available when the compiler option -mint8 is in effect.
typedef uint8_t uint_fast8_tβ fastest unsigned int with at least 8 bits. πtypedef uint16_t uint_least16_tβ unsigned int with at least 16 bits. βtypedef uint32_t uint_least32_tβ unsigned int with at least 32 bits. βtypedef uint64_t uint_least64_tβ unsigned int with at least 64 bits. β
π¨ Note: This type is not available when the compiler option -mint8 is in effect.
typedef uint8_t uint_least8_tβ unsigned int with at least 8 bits. βtypedef uint64_t uintmax_tβ largest unsigned int available. πtypedef uint16_t uintptr_tβ Unsigned pointer compatible type. π«Ά
π Author π
Generated automatically by Doxygen for AVR-LibC from the source code. β¨
π source/version: AVR-LibC, version 2.2.1 β page: avr_stdint(3avr). date: this footer didn't give one, so we're just gonna say it's timeless, bestie. β¨π¦
π¦ where this page comes from
- ubuntu resolute: avr-libc 1:2.2.1-1build1 Β· BSD-3-Clause
- ubuntu stonking: avr-libc 1:2.2.1-1build1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms