1 /*!
2  * @file        apm32s10x_dbgmcu.h
3  *
4  * @brief       This file contains all the functions prototypes for the DBUGMCU firmware library
5  *
6  * @version     V1.0.1
7  *
8  * @date        2022-12-31
9  *
10  * @attention
11  *
12  *  Copyright (C) 2022-2023 Geehy Semiconductor
13  *
14  *  You may not use this file except in compliance with the
15  *  GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
16  *
17  *  The program is only for reference, which is distributed in the hope
18  *  that it will be usefull and instructional for customers to develop
19  *  their software. Unless required by applicable law or agreed to in
20  *  writing, the program is distributed on an "AS IS" BASIS, WITHOUT
21  *  ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
22  *  See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
23  *  and limitations under the License.
24  */
25 
26 /* Define to prevent recursive inclusion */
27 #ifndef __APM32S10X_DBGMCU_H
28 #define __APM32S10X_DBGMCU_H
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /* Includes */
35 #include "apm32s10x.h"
36 
37 /** @addtogroup APM32S10x_StdPeriphDriver
38   @{
39 */
40 
41 /** @addtogroup DBGMCU_Driver DBGMCU Driver
42   @{
43 */
44 
45 /** @defgroup DBGMCU_Enumerations Enumerations
46   @{
47 */
48 
49 enum
50 {
51     DBGMCU_SLEEP                = ((uint32_t)0x00000001),
52     DBGMCU_STOP                 = ((uint32_t)0x00000002),
53     DBGMCU_STANDBY              = ((uint32_t)0x00000004),
54     DBGMCU_IOEN                 = ((uint32_t)0x00000020),
55     DBGMCU_IOMODE0              = ((uint32_t)0x00000000),
56     DBGMCU_IOMODE1              = ((uint32_t)0x00000040),
57     DBGMCU_IOMODE2              = ((uint32_t)0x00000080),
58     DBGMCU_IOMODE3              = ((uint32_t)0x000000C0),
59     DBGMCU_IWDT_STOP            = ((uint32_t)0x00000100),
60     DBGMCU_WWDT_STOP            = ((uint32_t)0x00000200),
61     DBGMCU_TMR1_STOP            = ((uint32_t)0x00000400),
62     DBGMCU_TMR2_STOP            = ((uint32_t)0x00000800),
63     DBGMCU_TMR3_STOP            = ((uint32_t)0x00001000),
64     DBGMCU_TMR4_STOP            = ((uint32_t)0x00002000),
65     DBGMCU_CAN1_STOP            = ((uint32_t)0x00004000),
66     DBGMCU_I2C1_SMBUS_TIMEOUT   = ((uint32_t)0x00008000),
67     DBGMCU_I2C2_SMBUS_TIMEOUT   = ((uint32_t)0x00010000),
68     DBGMCU_CAN2_STOP            = ((uint32_t)0x00200000)
69 };
70 
71 /**@} end of group DBGMCU_Enumerations */
72 
73 /** @defgroup DBGMCU_Functions Functions
74   @{
75 */
76 
77 uint32_t DBGMCU_ReadDEVID(void);
78 uint32_t DBGMCU_ReadREVID(void);
79 void DBGMCU_Enable(uint32_t periph);
80 void DBGMCU_Disable(uint32_t periph);
81 
82 /**@} end of group DBGMCU_Functions */
83 /**@} end of group DBGMCU_Driver */
84 /**@} end of group APM32S10x_StdPeriphDriver */
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif /* __APM32S10X_DBGMCU_H */
91