Download avr-libc Reference Manual

Transcript
5.11 Integer Types
5.10.2.2 #define ERANGE 34
Range error.
5.11
Integer Types
5.11.1
Detailed Description
#include <inttypes.h>
Use [u]intN t if you need exactly N bits.
Since these typedefs are mandated by the C99 standard, they are preferred over rolling
your own typedefs.
Note:
If avr-gcc’s -mint8 option is used, no 32-bit types will be available.
Todo:
There is a pending patch that may go into gcc to change the behaviour of the mint8 option. The current (2003-09-17) situation for -mint8 is sizeof(int) == 1,
sizeof(long) == 2 and sizeof(long long) == 8. Note the absence of a 4-byte, 32-bit
type. The patch proposes to change sozeof(long long) to be 4 bytes (32 bits). When
and if the patch is included in gcc, we will need to change avr-libc accordingly.
8-bit types.
• typedef signed char int8 t
• typedef unsigned char uint8 t
16-bit types.
• typedef int int16 t
• typedef unsigned int uint16 t
32-bit types.
• typedef long int32 t
• typedef unsigned long uint32 t
64-bit types.
• typedef long long int64 t
• typedef unsigned long long uint64 t
Generated on Wed Nov 26 21:10:23 2003 for avr-libc by Doxygen
28