stm32w108_type.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __STM32W108_TYPE_H
00019 #define __STM32W108_TYPE_H
00020
00021
00022
00023 typedef signed long s32;
00024 typedef signed short s16;
00025 typedef signed char s8;
00026
00027 typedef signed long const sc32;
00028 typedef signed short const sc16;
00029 typedef signed char const sc8;
00030
00031 typedef volatile signed long vs32;
00032 typedef volatile signed short vs16;
00033 typedef volatile signed char vs8;
00034
00035 typedef volatile signed long const vsc32;
00036 typedef volatile signed short const vsc16;
00037 typedef volatile signed char const vsc8;
00038
00039 typedef unsigned long u32;
00040 typedef unsigned short u16;
00041 typedef unsigned char u8;
00042
00043 typedef unsigned long const uc32;
00044 typedef unsigned short const uc16;
00045 typedef unsigned char const uc8;
00046
00047 typedef volatile unsigned long vu32;
00048 typedef volatile unsigned short vu16;
00049 typedef volatile unsigned char vu8;
00050
00051 typedef volatile unsigned long const vuc32;
00052 typedef volatile unsigned short const vuc16;
00053 typedef volatile unsigned char const vuc8;
00054
00055
00056
00057 typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
00058
00059 typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
00060 #define IS_FUNCTIONAL_STATE(STATE) ((STATE == DISABLE) || (STATE == ENABLE))
00061
00062 typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
00063
00064 #define U8_MAX ((u8)255)
00065 #define S8_MAX ((s8)127)
00066 #define S8_MIN ((s8)-128)
00067 #define U16_MAX ((u16)65535u)
00068 #define S16_MAX ((s16)32767)
00069 #define S16_MIN ((s16)-32768)
00070 #define U32_MAX ((u32)4294967295uL)
00071 #define S32_MAX ((s32)2147483647)
00072 #define S32_MIN ((s32)2147483648uL)
00073
00074
00075
00076
00077
00078 #endif
00079
00080