stdint.h 这里放着C语言的标准表达方式

typedef   signed        char      int8_t; 
typedef   signed short  int       int16_t;
typedef   signed        int       int32_t;
typedef   signed      __int64     int64_t;

typedef unsigned           char       uint8_t;
typedef unsigned short     int        uint16_t;
typedef unsigned           int        uint32_t;
typedef unsigned         __int64      uint64_t;

stm32f10x.h 这个文件主要是为了兼容旧版本

typedef   uint32_t   u32;   ///32位
typedef   uint16_t   u16;   ///16位
typedef   uint8_t     u8;   ///8位

u8 最大255 , u16最大65535 , 就这个意思u8 a=255 a+1=0  , u16 b=255 b+1=256

名称全称类型说明符缩写类型说明符      位数                    范围
整型intint16位     -32768至+32767 
无符号整型unsigned int unsigned16位0 至 65,535 
短整型short int short16位-32768至+32767 
无符号短整型     unsigned short int    unsigned short16位0 至 65,535 
长整型long int long32位-2,147,483,648 至 2,147,483,647
无符号长整型     unsigned long int     unsigned long        32位      0至4,294,967,295

 

 

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐