1 /********************************** (C) COPYRIGHT  *******************************
2 * File Name          : ch32f20x_dbgmcu.h
3 * Author             : WCH
4 * Version            : V1.0.0
5 * Date               : 2021/08/08
6 * Description        : This file contains all the functions prototypes for the
7 *                      DBGMCU firmware library.
8 *******************************************************************************/
9 #ifndef __CH32F20x_DBGMCU_H
10 #define __CH32F20x_DBGMCU_H
11 
12 #ifdef __cplusplus
13  extern "C" {
14 #endif
15 
16 #include "ch32f20x.h"
17 
18 
19 #define DBGMCU_SLEEP                 ((uint32_t)0x00000001)
20 #define DBGMCU_STOP                  ((uint32_t)0x00000002)
21 #define DBGMCU_STANDBY               ((uint32_t)0x00000004)
22 #define DBGMCU_IWDG_STOP             ((uint32_t)0x00000100)
23 #define DBGMCU_WWDG_STOP             ((uint32_t)0x00000200)
24 #define DBGMCU_TIM1_STOP             ((uint32_t)0x00000400)
25 #define DBGMCU_TIM2_STOP             ((uint32_t)0x00000800)
26 #define DBGMCU_TIM3_STOP             ((uint32_t)0x00001000)
27 #define DBGMCU_TIM4_STOP             ((uint32_t)0x00002000)
28 #define DBGMCU_CAN1_STOP             ((uint32_t)0x00004000)
29 #define DBGMCU_I2C1_SMBUS_TIMEOUT    ((uint32_t)0x00008000)
30 #define DBGMCU_I2C2_SMBUS_TIMEOUT    ((uint32_t)0x00010000)
31 #define DBGMCU_TIM8_STOP             ((uint32_t)0x00020000)
32 #define DBGMCU_TIM5_STOP             ((uint32_t)0x00040000)
33 #define DBGMCU_TIM6_STOP             ((uint32_t)0x00080000)
34 #define DBGMCU_TIM7_STOP             ((uint32_t)0x00100000)
35 #define DBGMCU_CAN2_STOP             ((uint32_t)0x00200000)
36 #define DBGMCU_TIM15_STOP            ((uint32_t)0x00400000)
37 #define DBGMCU_TIM16_STOP            ((uint32_t)0x00800000)
38 #define DBGMCU_TIM17_STOP            ((uint32_t)0x01000000)
39 #define DBGMCU_TIM12_STOP            ((uint32_t)0x02000000)
40 #define DBGMCU_TIM13_STOP            ((uint32_t)0x04000000)
41 #define DBGMCU_TIM14_STOP            ((uint32_t)0x08000000)
42 #define DBGMCU_TIM9_STOP             ((uint32_t)0x10000000)
43 #define DBGMCU_TIM10_STOP            ((uint32_t)0x20000000)
44 #define DBGMCU_TIM11_STOP            ((uint32_t)0x40000000)
45 
46 
47 uint32_t DBGMCU_GetREVID(void);
48 uint32_t DBGMCU_GetDEVID(void);
49 void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState);
50 
51 #ifdef __cplusplus
52 }
53 #endif
54 
55 #endif
56 
57 
58 
59 
60 
61 
62 
63