Contiki 2.5
stm32w108_type.h
1 /******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
2 * File Name : stm32w108_type.h
3 * Author : MCD Application Team
4 * Version : V1.0
5 * Date : 10/08/2009
6 * Description : This file contains all the common data types used for the
7 * STM32W108 firmware library.
8 ********************************************************************************
9 * THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
10 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
11 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
12 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
13 * CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
14 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
15 *******************************************************************************/
16 
17 /* Define to prevent recursive inclusion -------------------------------------*/
18 #ifndef __STM32W108_TYPE_H
19 #define __STM32W108_TYPE_H
20 
21 /* Includes ------------------------------------------------------------------*/
22 /* Exported types ------------------------------------------------------------*/
23 typedef signed long s32;
24 typedef signed short s16;
25 typedef signed char s8;
26 
27 typedef signed long const sc32; /* Read Only */
28 typedef signed short const sc16; /* Read Only */
29 typedef signed char const sc8; /* Read Only */
30 
31 typedef volatile signed long vs32;
32 typedef volatile signed short vs16;
33 typedef volatile signed char vs8;
34 
35 typedef volatile signed long const vsc32; /* Read Only */
36 typedef volatile signed short const vsc16; /* Read Only */
37 typedef volatile signed char const vsc8; /* Read Only */
38 
39 typedef unsigned long u32;
40 typedef unsigned short u16;
41 typedef unsigned char u8;
42 
43 typedef unsigned long const uc32; /* Read Only */
44 typedef unsigned short const uc16; /* Read Only */
45 typedef unsigned char const uc8; /* Read Only */
46 
47 typedef volatile unsigned long vu32;
48 typedef volatile unsigned short vu16;
49 typedef volatile unsigned char vu8;
50 
51 typedef volatile unsigned long const vuc32; /* Read Only */
52 typedef volatile unsigned short const vuc16; /* Read Only */
53 typedef volatile unsigned char const vuc8; /* Read Only */
54 
55 //typedef enum {FALSE = 0, TRUE = !FALSE} bool;
56 
57 typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
58 
59 typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
60 #define IS_FUNCTIONAL_STATE(STATE) ((STATE == DISABLE) || (STATE == ENABLE))
61 
62 typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
63 
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)2147483648uL)
73 
74 /* Exported constants --------------------------------------------------------*/
75 /* Exported macro ------------------------------------------------------------*/
76 /* Exported functions ------------------------------------------------------- */
77 
78 #endif /* __STM32W108_TYPE_H */
79 
80 /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/