STM8L15x Standard Peripherals Drivers
|
stm8l15x_rst.h
Go to the documentation of this file.
00001 /** 00002 ****************************************************************************** 00003 * @file stm8l15x_rst.h 00004 * @author MCD Application Team 00005 * @version V1.5.0 00006 * @date 13-May-2011 00007 * @brief This file contains all the functions prototypes for the RST firmware 00008 * library. 00009 ****************************************************************************** 00010 * @attention 00011 * 00012 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 00013 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 00014 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 00015 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 00016 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 00017 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 00018 * 00019 * <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2> 00020 ****************************************************************************** 00021 */ 00022 00023 /* Define to prevent recursive inclusion -------------------------------------*/ 00024 #ifndef __STM8L15x_RST_H 00025 #define __STM8L15x_RST_H 00026 00027 /* Includes ------------------------------------------------------------------*/ 00028 #include "stm8l15x.h" 00029 00030 /** @addtogroup STM8L15x_StdPeriph_Driver 00031 * @{ 00032 */ 00033 00034 /** @addtogroup RST 00035 * @{ 00036 */ 00037 00038 /* Exported variables ------------------------------------------------------- */ 00039 /* Exported types ------------------------------------------------------------*/ 00040 /** @defgroup RST_Exported_Types 00041 * @{ 00042 */ 00043 00044 /** @defgroup RST_Flags 00045 * @{ 00046 */ 00047 typedef enum { 00048 RST_FLAG_PORF = (uint8_t)0x01, /*!< POR reset flag */ 00049 RST_FLAG_SWIMF = (uint8_t)0x08, /*!< SWIM reset flag */ 00050 RST_FLAG_ILLOPF = (uint8_t)0x04, /*!< Illegal opcode reset flag */ 00051 RST_FLAG_IWDGF = (uint8_t)0x02, /*!< Independent watchdog reset flag */ 00052 RST_FLAG_WWDGF = (uint8_t)0x10, /*!< Window watchdog reset flag */ 00053 RST_FLAG_BORF = (uint8_t)0x20 /*!< BOR reset flag */ 00054 } RST_FLAG_TypeDef; 00055 00056 #define IS_RST_FLAG(FLAG) (((FLAG) == RST_FLAG_PORF) || ((FLAG) == RST_FLAG_BORF) || \ 00057 ((FLAG) == RST_FLAG_IWDGF) || ((FLAG) == RST_FLAG_ILLOPF) || \ 00058 ((FLAG) == RST_FLAG_WWDGF) || ((FLAG) == RST_FLAG_SWIMF)) 00059 /** 00060 * @} 00061 */ 00062 00063 /** 00064 * @} 00065 */ 00066 /* Exported constants --------------------------------------------------------*/ 00067 /* Exported macros -----------------------------------------------------------*/ 00068 /* Exported functions ------------------------------------------------------- */ 00069 /* Flag management functions **************************************************/ 00070 FlagStatus RST_GetFlagStatus(RST_FLAG_TypeDef RST_Flag); 00071 void RST_ClearFlag(RST_FLAG_TypeDef RST_Flag); 00072 00073 /* NRST Pin configuration function ********************************************/ 00074 void RST_GPOutputEnable(void); 00075 00076 #endif /* __STM8L15x_RST_H */ 00077 /** 00078 * @} 00079 */ 00080 00081 /** 00082 * @} 00083 */ 00084 00085 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/