hk32f0xx_dbgmcu.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /**
  2. ******************************************************************************
  3. * @file hk32f0xx_dbgmcu.h
  4. * @version V1.0.1
  5. * @date 2019-08-15
  6. ******************************************************************************
  7. */
  8. /* Define to prevent recursive inclusion -------------------------------------*/
  9. #ifndef __HK32F0XX_DBGMCU_H
  10. #define __HK32F0XX_DBGMCU_H
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. /* Includes ------------------------------------------------------------------*/
  15. #include "hk32f0xx.h"
  16. /** @addtogroup HK32F0xx_StdPeriph_Driver
  17. * @{
  18. */
  19. /** @addtogroup DBGMCU
  20. * @{
  21. */
  22. /* Exported types ------------------------------------------------------------*/
  23. /* Exported constants --------------------------------------------------------*/
  24. /** @defgroup DBGMCU_Exported_Constants
  25. * @{
  26. */
  27. #define DBGMCU_STOP DBGMCU_CR_DBG_STOP
  28. #define DBGMCU_STANDBY DBGMCU_CR_DBG_STANDBY
  29. #define IS_DBGMCU_PERIPH(PERIPH) ((((PERIPH) & 0xFFFFFFF9) == 0x00) && ((PERIPH) != 0x00))
  30. #define DBGMCU_TIM2_STOP DBGMCU_APB1_FZ_DBG_TIM2_STOP /*!< Not applicable for HK32F030 devices */
  31. #define DBGMCU_TIM3_STOP DBGMCU_APB1_FZ_DBG_TIM3_STOP
  32. #define DBGMCU_TIM6_STOP DBGMCU_APB1_FZ_DBG_TIM6_STOP
  33. #define DBGMCU_TIM7_STOP DBGMCU_APB1_FZ_DBG_TIM7_STOP /*!< Only applicable for HK32F072 devices */
  34. #define DBGMCU_TIM14_STOP DBGMCU_APB1_FZ_DBG_TIM14_STOP
  35. #define DBGMCU_RTC_STOP DBGMCU_APB1_FZ_DBG_RTC_STOP
  36. #define DBGMCU_WWDG_STOP DBGMCU_APB1_FZ_DBG_WWDG_STOP
  37. #define DBGMCU_IWDG_STOP DBGMCU_APB1_FZ_DBG_IWDG_STOP
  38. #define DBGMCU_I2C1_SMBUS_TIMEOUT DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT
  39. #define DBGMCU_CAN1_STOP DBGMCU_APB1_FZ_DBG_CAN1_STOP /*!< Only applicable for HK32F042 and HK32F072 devices */
  40. #define IS_DBGMCU_APB1PERIPH(PERIPH) ((((PERIPH) & 0xFDDFE2CC) == 0x00) && ((PERIPH) != 0x00))
  41. #define DBGMCU_TIM1_STOP DBGMCU_APB2_FZ_DBG_TIM1_STOP
  42. #define DBGMCU_TIM15_STOP DBGMCU_APB2_FZ_DBG_TIM15_STOP
  43. #define DBGMCU_TIM16_STOP DBGMCU_APB2_FZ_DBG_TIM16_STOP
  44. #define DBGMCU_TIM17_STOP DBGMCU_APB2_FZ_DBG_TIM17_STOP
  45. #define IS_DBGMCU_APB2PERIPH(PERIPH) ((((PERIPH) & 0xFFF8F7FF) == 0x00) && ((PERIPH) != 0x00))
  46. /**
  47. * @}
  48. */
  49. /* Exported macro ------------------------------------------------------------*/
  50. /* Exported functions ------------------------------------------------------- */
  51. /* Device and Revision ID management functions ********************************/
  52. uint32_t DBGMCU_GetREVID(void);
  53. uint32_t DBGMCU_GetDEVID(void);
  54. /* Peripherals Configuration functions ****************************************/
  55. void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState);
  56. void DBGMCU_APB1PeriphConfig(uint32_t DBGMCU_Periph, FunctionalState NewState);
  57. void DBGMCU_APB2PeriphConfig(uint32_t DBGMCU_Periph, FunctionalState NewState);
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61. #endif /* __HK32F0XX_DBGMCU_H */
  62. /**
  63. * @}
  64. */
  65. /**
  66. * @}
  67. */