1 #ifndef __STM32F10x_TYPE_H
2 #define __STM32F10x_TYPE_H
3
4
5 typedef signed long s32;
6 typedef signed short s16;
7 typedef signed char s8;
8 typedef signed long const sc32;
9 typedef signed short const sc16;
10 typedef signed char const sc8;
11 typedef volatile signed long vs32;
12 typedef volatile signed short vs16;
13 typedef volatile signed char vs8;
14 typedef volatile signed long const vsc32;
15 typedef volatile signed short const vsc16;
16 typedef volatile signed char const vsc8;
17 typedef unsigned long u32;
18 typedef unsigned short u16;
19 typedef unsigned char u8;
20 typedef unsigned long const uc32;
21 typedef unsigned short const uc16;
22 typedef unsigned char const uc8;
23 typedef volatile unsigned long vu32;
24 typedef volatile unsigned short vu16;
25 typedef volatile unsigned char vu8;
26 typedef volatile unsigned long const vuc32;
27 typedef volatile unsigned short const vuc16;
28 typedef volatile unsigned char const vuc8;
29 typedef enum {FALSE = 0, TRUE = !FALSE} bool;
30 typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
31 typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
32 #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
33 typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
34 #define U8_MAX ((u8)255)
35 #define S8_MAX ((s8)127)
36 #define S8_MIN ((s8)-128)
37 #define U16_MAX ((u16)65535u)
38 #define S16_MAX ((s16)32767)
39 #define S16_MIN ((s16)-32768)
40 #define U32_MAX ((u32)4294967295uL)
41 #define S32_MAX ((s32)2147483647)
42 #define S32_MIN ((s32)-2147483648)
43
44
45 #endif