[C] Data Type Definition

#include <stdint.h>

/* Unsigned. */
typedef unsigned char       uint8_t;
typedef unsigned short int uint16_t;
#ifndef __uint32_t_defined
typedef unsigned int        uint32_t;
# define __uint32_t_defined
#endif
#if __WORDSIZE == 64
typedef unsigned long int   uint64_t;

 

#include "stm32f10x.h"

typedef uint32_t  u32;
typedef uint16_t u16;
typedef uint8_t  u8;

  

According to the POSIX standard, the *_t type corresponding to the general integer type is:

1 byte uint8_t

2 bytes uint16_t

4 bytes uint32_t

8 bytes uint64_t

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326261297&siteId=291194637