STM8S/A Standard Peripherals Drivers: stm8s_rst.h Source File

STM8S/A

stm8s_rst.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm8s_rst.h
00004   * @author  MCD Application Team
00005   * @version V2.3.0
00006   * @date    16-June-2017
00007   * @brief   This file contains all functions prototype and macros for the RST peripheral.
00008    ******************************************************************************
00009   * @attention
00010   *
00011   * <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
00012   *
00013   * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
00014   * You may not use this file except in compliance with the License.
00015   * You may obtain a copy of the License at:
00016   *
00017   *        http://www.st.com/software_license_agreement_liberty_v2
00018   *
00019   * Unless required by applicable law or agreed to in writing, software 
00020   * distributed under the License is distributed on an "AS IS" BASIS, 
00021   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00022   * See the License for the specific language governing permissions and
00023   * limitations under the License.
00024   *
00025   ******************************************************************************
00026   */
00027 /* Define to prevent recursive inclusion -------------------------------------*/
00028 #ifndef __STM8S_RST_H
00029 #define __STM8S_RST_H
00030 
00031 /* Includes ------------------------------------------------------------------*/
00032 #include "stm8s.h"
00033 
00034 /** @addtogroup STM8S_StdPeriph_Driver
00035   * @{
00036   */
00037 
00038 /** @addtogroup RST_Exported_Types
00039   * @{
00040   */
00041 typedef enum {
00042   RST_FLAG_EMCF    = (uint8_t)0x10, /*!< EMC reset flag */
00043   RST_FLAG_SWIMF   = (uint8_t)0x08, /*!< SWIM reset flag */
00044   RST_FLAG_ILLOPF  = (uint8_t)0x04, /*!< Illigal opcode reset flag */
00045   RST_FLAG_IWDGF   = (uint8_t)0x02, /*!< Independent watchdog reset flag */
00046   RST_FLAG_WWDGF   = (uint8_t)0x01  /*!< Window watchdog reset flag */
00047 }RST_Flag_TypeDef;
00048 
00049 /**
00050   * @}
00051   */
00052 
00053 /* Exported constants --------------------------------------------------------*/
00054 /* Exported macros -----------------------------------------------------------*/
00055 
00056 /** @addtogroup RST_Private_Macros
00057   * @{
00058   */
00059 
00060 /**
00061   * @brief  Macro used by the assert function to check the different functions parameters.
00062   */
00063 /**
00064   * @brief  Macro used by the assert function to check the different RST flags.
00065   */
00066 #define IS_RST_FLAG_OK(FLAG) (((FLAG) == RST_FLAG_EMCF) || \
00067                               ((FLAG) == RST_FLAG_SWIMF)  ||\
00068                               ((FLAG) == RST_FLAG_ILLOPF) ||\
00069                               ((FLAG) == RST_FLAG_IWDGF)  ||\
00070                               ((FLAG) == RST_FLAG_WWDGF))
00071 
00072 /**
00073   * @}
00074   */
00075 
00076 /** @addtogroup RST_Exported_functions
00077   * @{
00078   */
00079 FlagStatus RST_GetFlagStatus(RST_Flag_TypeDef RST_Flag);
00080 void RST_ClearFlag(RST_Flag_TypeDef RST_Flag);
00081 
00082 /**
00083   * @}
00084   */
00085 
00086 #endif /* __STM8S_RST_H */
00087 
00088 /**
00089   * @}
00090   */
00091 
00092 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
STM8 Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM8 8-bit Microcontrollers platform visit www.st.com