18 #ifndef __STM32F10x_TYPE_H
19 #define __STM32F10x_TYPE_H
23 typedef signed long s32;
24 typedef signed short s16;
25 typedef signed char s8;
27 typedef signed long const sc32;
28 typedef signed short const sc16;
29 typedef signed char const sc8;
31 typedef volatile signed long vs32;
32 typedef volatile signed short vs16;
33 typedef volatile signed char vs8;
35 typedef volatile signed long const vsc32;
36 typedef volatile signed short const vsc16;
37 typedef volatile signed char const vsc8;
39 typedef unsigned long u32;
40 typedef unsigned short u16;
41 typedef unsigned char u8;
43 typedef unsigned long const uc32;
44 typedef unsigned short const uc16;
45 typedef unsigned char const uc8;
47 typedef volatile unsigned long vu32;
48 typedef volatile unsigned short vu16;
49 typedef volatile unsigned char vu8;
51 typedef volatile unsigned long const vuc32;
52 typedef volatile unsigned short const vuc16;
53 typedef volatile unsigned char const vuc8;
57 typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
59 typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
60 #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
62 typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
64 #define U8_MAX ((u8)255)
65 #define S8_MAX ((s8)127)
66 #define S8_MIN ((s8)-128)
67 #define U16_MAX ((u16)65535u)
68 #define S16_MAX ((s16)32767)
69 #define S16_MIN ((s16)-32768)
70 #define U32_MAX ((u32)4294967295uL)
71 #define S32_MAX ((s32)2147483647)
72 #define S32_MIN ((s32)-2147483648)