debug.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /******************************************************************************
  2. * Copyright (C) 2021, Xiaohua Semiconductor Co., Ltd. All rights reserved.
  3. *
  4. * This software component is licensed by XHSC under BSD 3-Clause license
  5. * (the "License"); You may not use this file except in compliance with the
  6. * License. You may obtain a copy of the License at:
  7. * opensource.org/licenses/BSD-3-Clause
  8. *
  9. ******************************************************************************/
  10. /******************************************************************************
  11. * @file debug.h
  12. *
  13. * @brief Header file for DEBUG functions
  14. *
  15. * @author MADS Team
  16. *
  17. ******************************************************************************/
  18. #ifndef __DEBUG_H__
  19. #define __DEBUG_H__
  20. /*******************************************************************************
  21. * Include files
  22. ******************************************************************************/
  23. #include "ddl.h"
  24. #ifdef __cplusplus
  25. extern "C"
  26. {
  27. #endif
  28. /**
  29. ******************************************************************************
  30. ** \defgroup DebugGroup (DEBUG)
  31. **
  32. ******************************************************************************/
  33. //@{
  34. /**
  35. *******************************************************************************
  36. ** function prototypes.
  37. ******************************************************************************/
  38. /******************************************************************************
  39. * Global type definitions
  40. ******************************************************************************/
  41. /**
  42. *******************************************************************************
  43. ** \brief 调试模式下各模块工作状态类型定义
  44. ** \note
  45. ******************************************************************************/
  46. typedef enum en_debug_module_active
  47. {
  48. DebugMskTim0 = 0x0001u, ///< TIM0
  49. DebugMskTim1 = 0x0002u, ///< TIM1
  50. DebugMskTim2 = 0x0004u, ///< TIM2
  51. DebugMskLpTim0 = 0x0008u, ///< LPTIM0
  52. DebugMskTim4 = 0x0010u, ///< TIM4
  53. DebugMskTim5 = 0x0020u, ///< TIM5
  54. DebugMskTim6 = 0x0040u, ///< TIM6
  55. DebugMskPca = 0x0080u, ///< PCA
  56. DebugMskWdt = 0x0100u, ///< WDT
  57. DebugMskRtc = 0x0200u, ///< RTC
  58. DebugMskTim3 = 0x0800u, ///< TIM3
  59. DebugMskLpTim1 = 0x1000u, ///< LPTIM1
  60. }en_debug_module_active_t;
  61. /*******************************************************************************
  62. * Global definitions
  63. ******************************************************************************/
  64. /******************************************************************************
  65. * Global variable declarations ('extern', definition in C source)
  66. ******************************************************************************/
  67. /******************************************************************************
  68. * Global function prototypes (definition in C source)
  69. ******************************************************************************/
  70. ///< 在SWD调试模式下,使能模块计数功能
  71. en_result_t Debug_ActiveEnable(en_debug_module_active_t enModule);
  72. ///< 在SWD调试模式下,暂停模块计数功能
  73. en_result_t Debug_ActiveDisable(en_debug_module_active_t enModule);
  74. //@} // Debug Group
  75. #ifdef __cplusplus
  76. #endif
  77. #endif /* __DEBUG_H__ */
  78. /*******************************************************************************
  79. * EOF (not truncated)
  80. ******************************************************************************/