stm8s_wwdg.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /**
  2. ********************************************************************************
  3. * @file stm8s_wwdg.h
  4. * @author MCD Application Team
  5. * @version V2.2.0
  6. * @date 30-September-2014
  7. * @brief This file contains all functions prototype and macros for the WWDG peripheral.
  8. ******************************************************************************
  9. * @attention
  10. *
  11. * <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
  12. *
  13. * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  14. * You may not use this file except in compliance with the License.
  15. * You may obtain a copy of the License at:
  16. *
  17. * http://www.st.com/software_license_agreement_liberty_v2
  18. *
  19. * Unless required by applicable law or agreed to in writing, software
  20. * distributed under the License is distributed on an "AS IS" BASIS,
  21. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22. * See the License for the specific language governing permissions and
  23. * limitations under the License.
  24. *
  25. ******************************************************************************
  26. */
  27. /* Define to prevent recursive inclusion -------------------------------------*/
  28. #ifndef __STM8S_WWDG_H
  29. #define __STM8S_WWDG_H
  30. /* Includes ------------------------------------------------------------------*/
  31. #include "stm8s.h"
  32. /** @addtogroup STM8S_StdPeriph_Driver
  33. * @{
  34. */
  35. /* Private macros ------------------------------------------------------------*/
  36. /** @addtogroup WWDG_Private_Macros
  37. * @{
  38. */
  39. /**
  40. * @brief Macro used by the assert function in order to check the
  41. * values of the window register.
  42. */
  43. #define IS_WWDG_WINDOWLIMITVALUE_OK(WindowLimitValue) ((WindowLimitValue) <= 0x7F)
  44. /**
  45. * @brief Macro used by the assert function in order to check the different
  46. * values of the counter register.
  47. */
  48. #define IS_WWDG_COUNTERVALUE_OK(CounterValue) ((CounterValue) <= 0x7F)
  49. /**
  50. * @}
  51. */
  52. /* Exported types ------------------------------------------------------------*/
  53. /* Exported functions ------------------------------------------------------- */
  54. /** @addtogroup WWDG_Exported_Functions
  55. * @{
  56. */
  57. void WWDG_Init(uint8_t Counter, uint8_t WindowValue);
  58. void WWDG_SetCounter(uint8_t Counter);
  59. uint8_t WWDG_GetCounter(void);
  60. void WWDG_SWReset(void);
  61. void WWDG_SetWindowValue(uint8_t WindowValue);
  62. /**
  63. * @}
  64. */
  65. #endif /* __STM8S_WWDG_H */
  66. /**
  67. * @}
  68. */
  69. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/