1 /********************************** (C) COPYRIGHT  *******************************
2  * File Name          : ch32v10x_dbgmcu.h
3  * Author             : WCH
4  * Version            : V1.0.0
5  * Date               : 2020/04/30
6  * Description        : This file contains all the functions prototypes for the
7  *                      DBGMCU firmware library.
8  * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
9  * SPDX-License-Identifier: Apache-2.0
10  *******************************************************************************/
11 #ifndef __CH32V10x_DBGMCU_H
12 #define __CH32V10x_DBGMCU_H
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 #include "ch32v10x.h"
19 
20 /* CFGR0 Register */
21 #define DBGMCU_IWDG_STOP             ((uint32_t)0x00000001)
22 #define DBGMCU_WWDG_STOP             ((uint32_t)0x00000002)
23 #define DBGMCU_I2C1_SMBUS_TIMEOUT    ((uint32_t)0x00000004)
24 #define DBGMCU_I2C2_SMBUS_TIMEOUT    ((uint32_t)0x00000008)
25 #define DBGMCU_TIM1_STOP             ((uint32_t)0x00000010)
26 #define DBGMCU_TIM2_STOP             ((uint32_t)0x00000020)
27 #define DBGMCU_TIM3_STOP             ((uint32_t)0x00000040)
28 #define DBGMCU_TIM4_STOP             ((uint32_t)0x00000080)
29 
30 /* CFGR1 Register */
31 #define DBGMCU_SLEEP                 ((uint32_t)0x00000001)
32 #define DBGMCU_STOP                  ((uint32_t)0x00000002)
33 #define DBGMCU_STANDBY               ((uint32_t)0x00000004)
34 
35 void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState);
36 
37 #ifdef __cplusplus
38 }
39 #endif
40 
41 #endif /* __CH32V10x_DBGMCU_H */
42