ch32v30x_dbgmcu.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /********************************** (C) COPYRIGHT *******************************
  2. * File Name : ch32v30x_dbgmcu.h
  3. * Author : WCH
  4. * Version : V1.0.0
  5. * Date : 2021/06/06
  6. * Description : This file contains all the functions prototypes for the
  7. * DBGMCU firmware library.
  8. *********************************************************************************
  9. * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
  10. * Attention: This software (modified or not) and binary are used for
  11. * microcontroller manufactured by Nanjing Qinheng Microelectronics.
  12. *******************************************************************************/
  13. #ifndef __CH32V30x_DBGMCU_H
  14. #define __CH32V30x_DBGMCU_H
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. #include "ch32v30x.h"
  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_I2C1_SMBUS_TIMEOUT ((uint32_t)0x00000400)
  25. #define DBGMCU_I2C2_SMBUS_TIMEOUT ((uint32_t)0x00000800)
  26. #define DBGMCU_TIM1_STOP ((uint32_t)0x00001000)
  27. #define DBGMCU_TIM2_STOP ((uint32_t)0x00002000)
  28. #define DBGMCU_TIM3_STOP ((uint32_t)0x00004000)
  29. #define DBGMCU_TIM4_STOP ((uint32_t)0x00008000)
  30. #define DBGMCU_TIM5_STOP ((uint32_t)0x00010000)
  31. #define DBGMCU_TIM6_STOP ((uint32_t)0x00020000)
  32. #define DBGMCU_TIM7_STOP ((uint32_t)0x00040000)
  33. #define DBGMCU_TIM8_STOP ((uint32_t)0x00080000)
  34. #define DBGMCU_CAN1_STOP ((uint32_t)0x00100000)
  35. #define DBGMCU_CAN2_STOP ((uint32_t)0x00200000)
  36. #define DBGMCU_TIM9_STOP ((uint32_t)0x00400000)
  37. #define DBGMCU_TIM10_STOP ((uint32_t)0x00800000)
  38. uint32_t DBGMCU_GetREVID(void);
  39. uint32_t DBGMCU_GetDEVID(void);
  40. uint32_t __get_DEBUG_CR(void);
  41. void __set_DEBUG_CR(uint32_t value);
  42. void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState);
  43. uint32_t DBGMCU_GetCHIPID( void );
  44. #ifdef __cplusplus
  45. }
  46. #endif
  47. #endif