stm32_eval.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32_eval.h
00004   * @author  MCD Application Team
00005   * @version V4.3.0
00006   * @date    10/15/2010
00007   * @brief   Header file for stm32_eval.c module.
00008   ******************************************************************************
00009   * @copy
00010   *
00011   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00012   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00013   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00014   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00015   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00016   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00017   *
00018   * <h2><center>&copy; COPYRIGHT 2010 STMicroelectronics</center></h2>
00019   */ 
00020   
00021 /* Define to prevent recursive inclusion -------------------------------------*/
00022 #ifndef __STM32_EVAL_H
00023 #define __STM32_EVAL_H
00024 
00025 #ifdef __cplusplus
00026  extern "C" {
00027 #endif 
00028 
00029 /* Includes ------------------------------------------------------------------*/
00030 
00031 /** @addtogroup Utilities
00032   * @{
00033   */ 
00034   
00035 /** @addtogroup STM32_EVAL
00036   * @{
00037   */ 
00038 
00039 /** @defgroup STM32_EVAL_Abstraction_Layer
00040   * @{
00041   */
00042   
00043 /** @defgroup STM32_EVAL_HARDWARE_RESOURCES
00044   * @{
00045   */
00046 
00047 /**
00048 @code  
00049  The table below gives an overview of the hardware resources supported by each 
00050  STM32 EVAL board.
00051      - LCD: TFT Color LCD (Parallel (FSMC) and Serial (SPI))
00052      - IOE: IO Expander on I2C
00053      - sFLASH: serial SPI FLASH (M25Pxxx)
00054      - sEE: serial I2C EEPROM (M24C08, M24C32, M24C64)
00055      - TSENSOR: Temperature Sensor (LM75)
00056      - SD: SD Card memory (SPI and SDIO (SD Card MODE)) 
00057   =================================================================================================================+
00058     STM32 EVAL     | LED | Buttons  | Com Ports |    LCD    | IOE  | sFLASH | sEE | TSENSOR | SD (SPI) | SD(SDIO)  |
00059   =================================================================================================================+
00060    STM3210B-EVAL   |  4  |    8     |     2     | YES (SPI) | NO   |  YES   | NO  |   YES   |    YES   |    NO     |
00061   -----------------------------------------------------------------------------------------------------------------+
00062    STM3210E-EVAL   |  4  |    8     |     2     | YES (FSMC)| NO   |  YES   | NO  |   YES   |    NO    |    YES    |
00063   -----------------------------------------------------------------------------------------------------------------+
00064    STM3210C-EVAL   |  4  |    3     |     1     | YES (SPI) | YES  |  NO    | YES |   NO    |    YES   |    NO     |
00065   -----------------------------------------------------------------------------------------------------------------+
00066    STM32100B-EVAL  |  4  |    8     |     2     | YES (SPI) | NO   |  YES   | NO  |   YES   |    YES   |    NO     |
00067   -----------------------------------------------------------------------------------------------------------------+
00068    STM32100E-EVAL  |  4  |    8     |     2     | YES (FSMC)| YES  |  YES   | YES |   YES   |    YES   |    NO     |      
00069   =================================================================================================================+
00070 @endcode
00071 */
00072 
00073 /**
00074   * @}
00075   */
00076   
00077 /** @defgroup STM32_EVAL_Exported_Types
00078   * @{
00079   */
00080 typedef enum 
00081 {
00082   LED1 = 0,
00083   LED2 = 1,
00084   LED3 = 2,
00085   LED4 = 3
00086 } Led_TypeDef;
00087 
00088 typedef enum 
00089 {  
00090   BUTTON_WAKEUP = 0,
00091   BUTTON_TAMPER = 1,
00092   BUTTON_KEY = 2,
00093   BUTTON_RIGHT = 3,
00094   BUTTON_LEFT = 4,
00095   BUTTON_UP = 5,
00096   BUTTON_DOWN = 6,
00097   BUTTON_SEL = 7
00098 } Button_TypeDef;
00099 
00100 typedef enum 
00101 {  
00102   BUTTON_MODE_GPIO = 0,
00103   BUTTON_MODE_EXTI = 1
00104 } ButtonMode_TypeDef;
00105 
00106 typedef enum 
00107 { 
00108   JOY_NONE = 0,
00109   JOY_SEL = 1,
00110   JOY_DOWN = 2,
00111   JOY_LEFT = 3,
00112   JOY_RIGHT = 4,
00113   JOY_UP = 5
00114 } JOYState_TypeDef
00115 ;
00116 
00117 typedef enum 
00118 {
00119   COM1 = 0,
00120   COM2 = 1
00121 } COM_TypeDef;   
00122 /**
00123   * @}
00124   */ 
00125   
00126 /** @defgroup STM32_EVAL_Exported_Constants
00127   * @{
00128   */ 
00129 
00130 /** 
00131   * @brief  Uncomment the line corresponding to the STMicroelectronics evaluation
00132   *   board used in your application.
00133   *   
00134   *  Tip: To avoid modifying this file each time you need to switch between these
00135   *       boards, you can define the board in your toolchain compiler preprocessor.    
00136   */ 
00137 #if !defined (USE_STM32100B_EVAL) && !defined (USE_STM3210B_EVAL) &&  !defined (USE_STM3210E_EVAL)\
00138    &&  !defined (USE_STM3210C_EVAL) &&  !defined (USE_STM32100E_EVAL)
00139  //#define USE_STM32100B_EVAL
00140  //#define USE_STM3210B_EVAL
00141  //#define USE_STM3210E_EVAL
00142  //#define USE_STM3210C_EVAL
00143  //#define USE_STM32100E_EVAL
00144 #endif
00145 
00146 #ifdef USE_STM32100B_EVAL
00147  #include "stm32f10x.h"
00148  #include "stm32100b_eval/stm32100b_eval.h"
00149 #elif defined USE_STM3210B_EVAL
00150  #include "stm32f10x.h"
00151  #include "stm3210b_eval/stm3210b_eval.h" 
00152 #elif defined USE_STM3210E_EVAL
00153  #include "stm32f10x.h"
00154  #include "stm3210e_eval/stm3210e_eval.h"
00155 #elif defined USE_STM3210C_EVAL
00156  #include "stm32f10x.h"
00157  #include "stm3210c_eval/stm3210c_eval.h"
00158 #elif defined USE_STM32100E_EVAL
00159  #include "stm32f10x.h"
00160  #include "stm32100e_eval/stm32100e_eval.h"
00161 #else 
00162  #error "Please select first the STM32 EVAL board to be used (in stm32_eval.h)"
00163 #endif                      
00164 
00165 
00166 /** 
00167   * @brief  STM32 Button Defines Legacy  
00168   */ 
00169 #define Button_WAKEUP        BUTTON_WAKEUP
00170 #define Button_TAMPER        BUTTON_TAMPER
00171 #define Button_KEY           BUTTON_KEY
00172 #define Button_RIGHT         BUTTON_RIGHT
00173 #define Button_LEFT          BUTTON_LEFT
00174 #define Button_UP            BUTTON_UP
00175 #define Button_DOWN          BUTTON_DOWN
00176 #define Button_SEL           BUTTON_SEL
00177 #define Mode_GPIO            BUTTON_MODE_GPIO
00178 #define Mode_EXTI            BUTTON_MODE_EXTI
00179 #define Button_Mode_TypeDef  ButtonMode_TypeDef
00180 #define JOY_CENTER           JOY_SEL
00181 #define JOY_State_TypeDef    JOYState_TypeDef 
00182 
00183 /** 
00184   * @brief  LCD Defines Legacy  
00185   */ 
00186 #define LCD_RSNWR_GPIO_CLK  LCD_NWR_GPIO_CLK
00187 #define LCD_SPI_GPIO_PORT   LCD_SPI_SCK_GPIO_PORT
00188 #define LCD_SPI_GPIO_CLK    LCD_SPI_SCK_GPIO_CLK
00189 #define R0                  LCD_REG_0
00190 #define R1                  LCD_REG_1
00191 #define R2                  LCD_REG_2
00192 #define R3                  LCD_REG_3
00193 #define R4                  LCD_REG_4
00194 #define R5                  LCD_REG_5
00195 #define R6                  LCD_REG_6
00196 #define R7                  LCD_REG_7
00197 #define R8                  LCD_REG_8
00198 #define R9                  LCD_REG_9
00199 #define R10                 LCD_REG_10
00200 #define R12                 LCD_REG_12
00201 #define R13                 LCD_REG_13
00202 #define R14                 LCD_REG_14
00203 #define R15                 LCD_REG_15
00204 #define R16                 LCD_REG_16
00205 #define R17                 LCD_REG_17
00206 #define R18                 LCD_REG_18
00207 #define R19                 LCD_REG_19
00208 #define R20                 LCD_REG_20
00209 #define R21                 LCD_REG_21
00210 #define R22                 LCD_REG_22
00211 #define R23                 LCD_REG_23
00212 #define R24                 LCD_REG_24
00213 #define R25                 LCD_REG_25
00214 #define R26                 LCD_REG_26
00215 #define R27                 LCD_REG_27
00216 #define R28                 LCD_REG_28
00217 #define R29                 LCD_REG_29
00218 #define R30                 LCD_REG_30
00219 #define R31                 LCD_REG_31
00220 #define R32                 LCD_REG_32
00221 #define R33                 LCD_REG_33
00222 #define R34                 LCD_REG_34
00223 #define R36                 LCD_REG_36
00224 #define R37                 LCD_REG_37
00225 #define R40                 LCD_REG_40
00226 #define R41                 LCD_REG_41
00227 #define R43                 LCD_REG_43
00228 #define R45                 LCD_REG_45
00229 #define R48                 LCD_REG_48
00230 #define R49                 LCD_REG_49
00231 #define R50                 LCD_REG_50
00232 #define R51                 LCD_REG_51
00233 #define R52                 LCD_REG_52
00234 #define R53                 LCD_REG_53
00235 #define R54                 LCD_REG_54
00236 #define R55                 LCD_REG_55
00237 #define R56                 LCD_REG_56
00238 #define R57                 LCD_REG_57
00239 #define R59                 LCD_REG_59
00240 #define R60                 LCD_REG_60
00241 #define R61                 LCD_REG_61
00242 #define R62                 LCD_REG_62
00243 #define R63                 LCD_REG_63
00244 #define R64                 LCD_REG_64
00245 #define R65                 LCD_REG_65
00246 #define R66                 LCD_REG_66
00247 #define R67                 LCD_REG_67
00248 #define R68                 LCD_REG_68
00249 #define R69                 LCD_REG_69
00250 #define R70                 LCD_REG_70
00251 #define R71                 LCD_REG_71
00252 #define R72                 LCD_REG_72
00253 #define R73                 LCD_REG_73
00254 #define R74                 LCD_REG_74
00255 #define R75                 LCD_REG_75
00256 #define R76                 LCD_REG_76
00257 #define R77                 LCD_REG_77
00258 #define R78                 LCD_REG_78
00259 #define R79                 LCD_REG_79
00260 #define R80                 LCD_REG_80
00261 #define R81                 LCD_REG_81
00262 #define R82                 LCD_REG_82
00263 #define R83                 LCD_REG_83
00264 #define R96                 LCD_REG_96
00265 #define R97                 LCD_REG_97
00266 #define R106                LCD_REG_106
00267 #define R118                LCD_REG_118
00268 #define R128                LCD_REG_128
00269 #define R129                LCD_REG_129
00270 #define R130                LCD_REG_130
00271 #define R131                LCD_REG_131
00272 #define R132                LCD_REG_132
00273 #define R133                LCD_REG_133
00274 #define R134                LCD_REG_134
00275 #define R135                LCD_REG_135
00276 #define R136                LCD_REG_136
00277 #define R137                LCD_REG_137
00278 #define R139                LCD_REG_139
00279 #define R140                LCD_REG_140
00280 #define R141                LCD_REG_141
00281 #define R143                LCD_REG_143
00282 #define R144                LCD_REG_144
00283 #define R145                LCD_REG_145
00284 #define R146                LCD_REG_146
00285 #define R147                LCD_REG_147
00286 #define R148                LCD_REG_148
00287 #define R149                LCD_REG_149
00288 #define R150                LCD_REG_150
00289 #define R151                LCD_REG_151
00290 #define R152                LCD_REG_152
00291 #define R153                LCD_REG_153
00292 #define R154                LCD_REG_154
00293 #define R157                LCD_REG_157
00294 #define R192                LCD_REG_192
00295 #define R193                LCD_REG_193
00296 #define R227                LCD_REG_227
00297 #define R229                LCD_REG_229
00298 #define R231                LCD_REG_231
00299 #define R239                LCD_REG_239
00300 #define White               LCD_COLOR_WHITE
00301 #define Black               LCD_COLOR_BLACK
00302 #define Grey                LCD_COLOR_GREY
00303 #define Blue                LCD_COLOR_BLUE
00304 #define Blue2               LCD_COLOR_BLUE2
00305 #define Red                 LCD_COLOR_RED
00306 #define Magenta             LCD_COLOR_MAGENTA
00307 #define Green               LCD_COLOR_GREEN
00308 #define Cyan                LCD_COLOR_CYAN
00309 #define Yellow              LCD_COLOR_YELLOW
00310 #define Line0               LCD_LINE_0
00311 #define Line1               LCD_LINE_1
00312 #define Line2               LCD_LINE_2
00313 #define Line3               LCD_LINE_3
00314 #define Line4               LCD_LINE_4
00315 #define Line5               LCD_LINE_5
00316 #define Line6               LCD_LINE_6
00317 #define Line7               LCD_LINE_7
00318 #define Line8               LCD_LINE_8
00319 #define Line9               LCD_LINE_9
00320 #define Horizontal          LCD_DIR_HORIZONTAL
00321 #define Vertical            LCD_DIR_VERTICAL
00322 
00323 /**
00324   * @}
00325   */ 
00326 
00327 /** @defgroup STM32_EVAL_Exported_Macros
00328   * @{
00329   */ 
00330 /**
00331   * @}
00332   */ 
00333 
00334 /** @defgroup STM32_EVAL_Exported_Functions
00335   * @{
00336   */ 
00337 /**
00338   * @}
00339   */ 
00340 
00341 #ifdef __cplusplus
00342 }
00343 #endif
00344 
00345 
00346 #endif /* __STM32_EVAL_H */
00347 
00348 /**
00349   * @}
00350   */ 
00351 
00352 /**
00353   * @}
00354   */ 
00355 
00356 /**
00357   * @}
00358   */   
00359 
00360 /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32