STM8S/A Standard Peripherals Firmware Library
|
stm8s_eval.h
Go to the documentation of this file.
00001 /** 00002 ****************************************************************************** 00003 * @file stm8s_eval.h 00004 * @author MCD Application Team 00005 * @version V1.0.1 00006 * @date 30-September-2014 00007 * @brief Header file for stm8sl_eval.c module. 00008 ****************************************************************************** 00009 * 00010 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 00011 * You may not use this file except in compliance with the License. 00012 * You may obtain a copy of the License at: 00013 * 00014 * http://www.st.com/software_license_agreement_liberty_v2 00015 * 00016 * Unless required by applicable law or agreed to in writing, software 00017 * distributed under the License is distributed on an "AS IS" BASIS, 00018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00019 * See the License for the specific language governing permissions and 00020 * limitations under the License. 00021 * 00022 ****************************************************************************** 00023 */ 00024 00025 /* Define to prevent recursive inclusion -------------------------------------*/ 00026 #ifndef __STM8S_EVAL_H 00027 #define __STM8S_EVAL_H 00028 00029 /* Includes ------------------------------------------------------------------*/ 00030 00031 /** @addtogroup Utilities 00032 * @{ 00033 */ 00034 00035 /** @addtogroup STM8S_EVAL 00036 * @{ 00037 */ 00038 00039 /** @defgroup STM8S_EVAL_Abstraction_Layer 00040 * @{ 00041 */ 00042 00043 /** @defgroup STM8S_EVAL_HARDWARE_RESOURCES 00044 * @{ 00045 */ 00046 00047 /** 00048 @code 00049 The table below gives an overview of the hardware resources supported by each 00050 STM8S EVAL board. 00051 - LCD: Mono LCD (Glass and Serial (SPI)) 00052 - sFLASH: serial SPI FLASH (M25Pxxx) 00053 - sEE: serial I2C EEPROM (M24C32, M24C64) 00054 - SD: SD Card memory (SPI (SD Card MODE)) 00055 =============================================================================================+ 00056 STM8S EVAL | LED | Buttons | Com Ports | LCD | sFLASH | sEE | TSENSOR | SD (SPI) | 00057 -============================================================================================+ 00058 STM8-128-EVAL | 5 | 6 | � | YES (SPI) | YES | YES | No | YES | 00059 =============================================================================================+ 00060 @endcode 00061 */ 00062 /** 00063 * @} 00064 */ 00065 00066 00067 /** @defgroup STM8S_EVAL_Exported_Types 00068 * @{ 00069 */ 00070 typedef enum 00071 { 00072 LED1 = 0, 00073 LED2 = 1, 00074 LED3 = 2, 00075 LED4 = 3, 00076 LED5 = 4 /* Bicolor Led */ 00077 } Led_TypeDef; 00078 00079 typedef enum 00080 { 00081 BUTTON_KEY = 0, 00082 BUTTON_RIGHT = 1, 00083 BUTTON_LEFT = 2, 00084 BUTTON_UP = 3, 00085 BUTTON_DOWN = 4, 00086 BUTTON_SEL = 5 00087 } Button_TypeDef; 00088 00089 typedef enum 00090 { 00091 BUTTON_MODE_GPIO = 0, 00092 BUTTON_MODE_EXTI = 1 00093 } ButtonMode_TypeDef; 00094 00095 typedef enum 00096 { 00097 JOY_NONE = 0, 00098 JOY_SEL = 1, 00099 JOY_DOWN = 2, 00100 JOY_LEFT = 3, 00101 JOY_RIGHT = 4, 00102 JOY_UP = 5 00103 } JOYState_TypeDef; 00104 00105 /** 00106 * @} 00107 */ 00108 00109 /** @defgroup STM8S_EVAL_Exported_Constants 00110 * @{ 00111 */ 00112 /** 00113 * @brief Uncomment the line corresponding to the STMicroelectronics evaluation 00114 * board used in your application. 00115 * 00116 * Tip: To avoid modifying this file each time you need to switch between these 00117 * boards, you can define the board in your toolchain compiler preprocessor. 00118 */ 00119 #if !defined (USE_STM8_128_EVAL) 00120 //#define USE_STM8_128_EVAL 00121 #endif 00122 00123 #ifdef USE_STM8_128_EVAL 00124 #include "stm8s.h" 00125 #include "stm8-128_eval/stm8_128_eval.h" 00126 #else 00127 #error "Please select first the STM8S EVAL board to be used (in stm8s_eval.h)" 00128 #endif 00129 00130 /** 00131 * @} 00132 */ 00133 00134 /* Exported macro ------------------------------------------------------------*/ 00135 /* Exported functions ------------------------------------------------------- */ 00136 00137 #endif /* __STM8S_EVAL_H */ 00138 00139 00140 /** 00141 * @} 00142 */ 00143 00144 /** 00145 * @} 00146 */ 00147 00148 /** 00149 * @} 00150 */ 00151 00152 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/