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