Files
JYF_STC15W4K_wireless_charge/Lib/stdint.h

25 lines
853 B
C
Raw Normal View History

2025-03-18 19:34:19 +08:00
/* stdint.h - 用于 51 单片机的自定义标准整数类型定义 */
#ifndef __STDINT_H__
#define __STDINT_H__
/* 精确宽度整数类型 */
2025-03-18 22:49:46 +08:00
typedef unsigned char uint8_t; // 无符号 8-bit
typedef signed char int8_t; // 有符号 8-bit
2025-03-18 19:34:19 +08:00
2025-03-18 22:49:46 +08:00
typedef unsigned int uint16_t; // 无符号 16-bit (Keil C51中int是16位)
typedef signed int int16_t; // 有符号 16-bit
2025-03-18 19:34:19 +08:00
2025-03-18 22:49:46 +08:00
typedef unsigned long uint32_t; // 无符号 32-bit
typedef signed long int32_t; // 有符号 32-bit
2025-03-18 19:34:19 +08:00
/* 快速最小宽度类型(按编译器最优选择)*/
2025-03-18 22:49:46 +08:00
typedef unsigned char uint_fast8_t;
typedef unsigned int uint_fast16_t;
typedef unsigned long uint_fast32_t;
2025-03-18 19:34:19 +08:00
/* 指针类型51 单片机为 8/16 位地址)*/
2025-03-18 22:49:46 +08:00
typedef unsigned char uintptr_t; // 数据指针8位
typedef unsigned int uintptr16_t; // 代码指针16位
2025-03-18 19:34:19 +08:00
#endif /* __STDINT_H__ */