STM32数据类型定义
2014-04-16 16:14
531 查看
原文地址:STM32数据类型定义作者:orchild
#ifndef __STM32F10x_TYPE_H
#define __STM32F10x_TYPE_H
typedef signed long s32;
typedef signed short s16;
typedef signed char s8;
typedef signed long const
sc32;
typedef signed short const sc16;
typedef signed char const
sc8;
typedef volatile signed long vs32;
typedef volatile signed short vs16;
typedef volatile signed char vs8;
typedef volatile signed long const
vsc32;
typedef volatile signed short const vsc16;
typedef volatile signed char const
vsc8;
typedef unsigned long u32;
typedef unsigned short u16;
typedef unsigned char u8;
typedef unsigned long const
uc32;
typedef unsigned short const uc16;
typedef unsigned char const
uc8;
typedef volatile unsigned long vu32;
typedef volatile unsigned short vu16;
typedef volatile unsigned char vu8;
typedef volatile unsigned long const
vuc32;
typedef volatile unsigned short const
vuc16;
typedef volatile unsigned char const
vuc8;
typedef enum {FALSE = 0, TRUE = !FALSE} bool;
typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
typedef enum {DISABLE = 0, ENABLE = !DISABLE}
FunctionalState;
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) ||
((STATE) == ENABLE))
typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
#define
U8_MAX
((u8)255)
#define
S8_MAX
((s8)127)
#define
S8_MIN
((s8)-128)
#define
U16_MAX
((u16)65535u)
#define
S16_MAX
((s16)32767)
#define
S16_MIN
((s16)-32768)
#define
U32_MAX
((u32)4294967295uL)
#define
S32_MAX
((s32)2147483647)
#define
S32_MIN
((s32)-2147483648)
#endif
#ifndef __STM32F10x_TYPE_H
#define __STM32F10x_TYPE_H
typedef signed long s32;
typedef signed short s16;
typedef signed char s8;
typedef signed long const
sc32;
typedef signed short const sc16;
typedef signed char const
sc8;
typedef volatile signed long vs32;
typedef volatile signed short vs16;
typedef volatile signed char vs8;
typedef volatile signed long const
vsc32;
typedef volatile signed short const vsc16;
typedef volatile signed char const
vsc8;
typedef unsigned long u32;
typedef unsigned short u16;
typedef unsigned char u8;
typedef unsigned long const
uc32;
typedef unsigned short const uc16;
typedef unsigned char const
uc8;
typedef volatile unsigned long vu32;
typedef volatile unsigned short vu16;
typedef volatile unsigned char vu8;
typedef volatile unsigned long const
vuc32;
typedef volatile unsigned short const
vuc16;
typedef volatile unsigned char const
vuc8;
typedef enum {FALSE = 0, TRUE = !FALSE} bool;
typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
typedef enum {DISABLE = 0, ENABLE = !DISABLE}
FunctionalState;
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) ||
((STATE) == ENABLE))
typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
#define
U8_MAX
((u8)255)
#define
S8_MAX
((s8)127)
#define
S8_MIN
((s8)-128)
#define
U16_MAX
((u16)65535u)
#define
S16_MAX
((s16)32767)
#define
S16_MIN
((s16)-32768)
#define
U32_MAX
((u32)4294967295uL)
#define
S32_MAX
((s32)2147483647)
#define
S32_MIN
((s32)-2147483648)
#endif
相关文章推荐
- STM32系统头文件之数据类型定义u8 u16哪里来的
- STM32 Keil MDK数据类型定义
- stm32 数据类型的定义(常用的U8,U16,U32到底代表什么)
- STM32数据类型定义
- 转载:stm32 数据类型的定义(常用的U8,U16,U32到底代表什么)
- STM32数据类型定义
- stm32中的数据类型定义
- STM32数据类型定义
- STM32 数据类型定义
- 数据类型的定义
- typedef(自定义数据类型)与#define(宏定义)用法比较(前者定义指针比define好用)
- 再谈JSON -json定义及数据类型
- Java语言基础{Java_se(02)}-字面量和常量-变量的基本定义和使用-Java表达式-数据类型和分类-基本数据类型的转换-算数运算符-赋值运算符-比较运算符-三元运算符-逻辑运算符
- Oracle 数据类型定义
- 如何查找Linux中一些特殊数据类型定义,比如pid_t和uid_t
- 类在其自身的定义体内作为数据类型
- TypeScript01:如何定义包括多种基本数据类型的数组?
- AS3的数据类型和定义
- Windows SDK的数据类型定义和宏定义
- 规范:定义 Bean 时的 数据类型 及 初始值 ( 编号:20110628A1138 )