apm32s10x_dbgmcu.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. /* Define to prevent recursive inclusion */
  26. #ifndef __APM32S10X_DBGMCU_H
  27. #define __APM32S10X_DBGMCU_H
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. /* Includes */
  32. #include "apm32s10x.h"
  33. /** @addtogroup APM32S10x_StdPeriphDriver
  34. @{
  35. */
  36. /** @addtogroup DBGMCU_Driver DBGMCU Driver
  37. @{
  38. */
  39. /** @defgroup DBGMCU_Enumerations Enumerations
  40. @{
  41. */
  42. enum
  43. {
  44. DBGMCU_SLEEP = ((uint32_t)0x00000001),
  45. DBGMCU_STOP = ((uint32_t)0x00000002),
  46. DBGMCU_STANDBY = ((uint32_t)0x00000004),
  47. DBGMCU_IOEN = ((uint32_t)0x00000020),
  48. DBGMCU_IOMODE0 = ((uint32_t)0x00000000),
  49. DBGMCU_IOMODE1 = ((uint32_t)0x00000040),
  50. DBGMCU_IOMODE2 = ((uint32_t)0x00000080),
  51. DBGMCU_IOMODE3 = ((uint32_t)0x000000C0),
  52. DBGMCU_IWDT_STOP = ((uint32_t)0x00000100),
  53. DBGMCU_WWDT_STOP = ((uint32_t)0x00000200),
  54. DBGMCU_TMR1_STOP = ((uint32_t)0x00000400),
  55. DBGMCU_TMR2_STOP = ((uint32_t)0x00000800),
  56. DBGMCU_TMR3_STOP = ((uint32_t)0x00001000),
  57. DBGMCU_TMR4_STOP = ((uint32_t)0x00002000),
  58. DBGMCU_CAN1_STOP = ((uint32_t)0x00004000),
  59. DBGMCU_I2C1_SMBUS_TIMEOUT = ((uint32_t)0x00008000),
  60. DBGMCU_I2C2_SMBUS_TIMEOUT = ((uint32_t)0x00010000),
  61. DBGMCU_CAN2_STOP = ((uint32_t)0x00200000)
  62. };
  63. /**@} end of group DBGMCU_Enumerations */
  64. /** @defgroup DBGMCU_Functions Functions
  65. @{
  66. */
  67. uint32_t DBGMCU_ReadDEVID(void);
  68. uint32_t DBGMCU_ReadREVID(void);
  69. void DBGMCU_Enable(uint32_t periph);
  70. void DBGMCU_Disable(uint32_t periph);
  71. /**@} end of group DBGMCU_Functions */
  72. /**@} end of group DBGMCU_Driver */
  73. /**@} end of group APM32S10x_StdPeriphDriver */
  74. #ifdef __cplusplus
  75. }
  76. #endif
  77. #endif /* __APM32S10X_DBGMCU_H */