1 |
608 |
jeremybenn |
/******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
|
2 |
|
|
* File Name : stm32f10x_type.h
|
3 |
|
|
* Author : MCD Application Team
|
4 |
|
|
* Date First Issued : 09/29/2006
|
5 |
|
|
* Description : This file contains all the common data types used for the
|
6 |
|
|
* STM32F10x firmware library.
|
7 |
|
|
********************************************************************************
|
8 |
|
|
* History:
|
9 |
|
|
* 04/02/2007: V0.2
|
10 |
|
|
* 02/05/2007: V0.1
|
11 |
|
|
* 09/29/2006: V0.01
|
12 |
|
|
********************************************************************************
|
13 |
|
|
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
|
14 |
|
|
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
|
15 |
|
|
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
|
16 |
|
|
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
|
17 |
|
|
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
|
18 |
|
|
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
|
19 |
|
|
*******************************************************************************/
|
20 |
|
|
|
21 |
|
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
22 |
|
|
#ifndef __STM32F10x_TYPE_H
|
23 |
|
|
#define __STM32F10x_TYPE_H
|
24 |
|
|
|
25 |
|
|
/* Includes ------------------------------------------------------------------*/
|
26 |
|
|
/* Exported types ------------------------------------------------------------*/
|
27 |
|
|
typedef signed long s32;
|
28 |
|
|
typedef signed short s16;
|
29 |
|
|
typedef signed char s8;
|
30 |
|
|
|
31 |
|
|
typedef volatile signed long vs32;
|
32 |
|
|
typedef volatile signed short vs16;
|
33 |
|
|
typedef volatile signed char vs8;
|
34 |
|
|
|
35 |
|
|
typedef unsigned long u32;
|
36 |
|
|
typedef unsigned short u16;
|
37 |
|
|
typedef unsigned char u8;
|
38 |
|
|
|
39 |
|
|
typedef unsigned long const uc32; /* Read Only */
|
40 |
|
|
typedef unsigned short const uc16; /* Read Only */
|
41 |
|
|
typedef unsigned char const uc8; /* Read Only */
|
42 |
|
|
|
43 |
|
|
typedef volatile unsigned long vu32;
|
44 |
|
|
typedef volatile unsigned short vu16;
|
45 |
|
|
typedef volatile unsigned char vu8;
|
46 |
|
|
|
47 |
|
|
typedef volatile unsigned long const vuc32; /* Read Only */
|
48 |
|
|
typedef volatile unsigned short const vuc16; /* Read Only */
|
49 |
|
|
typedef volatile unsigned char const vuc8; /* Read Only */
|
50 |
|
|
|
51 |
|
|
typedef enum {FALSE = 0, TRUE = !FALSE} bool;
|
52 |
|
|
|
53 |
|
|
typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
|
54 |
|
|
|
55 |
|
|
typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
|
56 |
|
|
#define IS_FUNCTIONAL_STATE(STATE) ((STATE == DISABLE) || (STATE == ENABLE))
|
57 |
|
|
|
58 |
|
|
typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
|
59 |
|
|
|
60 |
|
|
#define U8_MAX ((u8)255)
|
61 |
|
|
#define S8_MAX ((s8)127)
|
62 |
|
|
#define S8_MIN ((s8)-128)
|
63 |
|
|
#define U16_MAX ((u16)65535u)
|
64 |
|
|
#define S16_MAX ((s16)32767)
|
65 |
|
|
#define S16_MIN ((s16)-32768)
|
66 |
|
|
#define U32_MAX ((u32)4294967295uL)
|
67 |
|
|
#define S32_MAX ((s32)2147483647)
|
68 |
|
|
#define S32_MIN ((s32)2147483648uL)
|
69 |
|
|
|
70 |
|
|
/* Exported constants --------------------------------------------------------*/
|
71 |
|
|
/* Exported macro ------------------------------------------------------------*/
|
72 |
|
|
/* Exported functions ------------------------------------------------------- */
|
73 |
|
|
|
74 |
|
|
#endif /* __STM32F10x_TYPE_H */
|
75 |
|
|
|
76 |
|
|
/******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/
|