关于STM32库函数中,u8_u16_等的定义

//stm32f10x.h文件内定义
typedef uint32_t  u32;
typedef uint16_t u16;
typedef uint8_t  u8;
//无符号

typedef int32_t  s32;
typedef int16_t s16;
typedef int8_t  s8;

//有符号
    /* exact-width unsigned integer types */
typedef unsigned          char uint8_t;
typedef unsigned short     int uint16_t;
typedef unsigned           int uint32_t;
typedef unsigned       __INT64 uint64_t;

即unsigned char --> uint8_t --> u8  所以在MDK中定义为u8  u16  u32 的即为 "无符号字符型","无符号短整形","无符号长整形"

其他类型的定义查找方法相同,进入定义看即可.

猜你喜欢

转载自blog.csdn.net/qq_41176706/article/details/80577805