n32g45x_dbg.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*****************************************************************************
  2. * Copyright (c) 2019, Nations Technologies Inc.
  3. *
  4. * All rights reserved.
  5. * ****************************************************************************
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions are met:
  9. *
  10. * - Redistributions of source code must retain the above copyright notice,
  11. * this list of conditions and the disclaimer below.
  12. *
  13. * Nations' name may not be used to endorse or promote products derived from
  14. * this software without specific prior written permission.
  15. *
  16. * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY NATIONS "AS IS" AND ANY EXPRESS OR
  17. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  18. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
  19. * DISCLAIMED. IN NO EVENT SHALL NATIONS BE LIABLE FOR ANY DIRECT, INDIRECT,
  20. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  21. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  22. * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  23. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  24. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  25. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. * ****************************************************************************/
  27. /**
  28. * @file n32g45x_dbg.h
  29. * @author Nations
  30. * @version v1.0.1
  31. *
  32. * @copyright Copyright (c) 2019, Nations Technologies Inc. All rights reserved.
  33. */
  34. #ifndef __N32G45X_DBG_H__
  35. #define __N32G45X_DBG_H__
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39. #include "n32g45x.h"
  40. /** @addtogroup N32G45X_StdPeriph_Driver
  41. * @{
  42. */
  43. /** @addtogroup DBG
  44. * @{
  45. */
  46. /** @addtogroup DBGMCU_Exported_Types
  47. * @{
  48. */
  49. /**
  50. * @}
  51. */
  52. /** @addtogroup DBGMCU_Exported_Constants
  53. * @{
  54. */
  55. #define DBG_SLEEP ((uint32_t)0x00000001)
  56. #define DBG_STOP ((uint32_t)0x00000002)
  57. #define DBG_STDBY ((uint32_t)0x00000004)
  58. #define DBG_IWDG_STOP ((uint32_t)0x00000100)
  59. #define DBG_WWDG_STOP ((uint32_t)0x00000200)
  60. #define DBG_TIM1_STOP ((uint32_t)0x00000400)
  61. #define DBG_TIM2_STOP ((uint32_t)0x00000800)
  62. #define DBG_TIM3_STOP ((uint32_t)0x00001000)
  63. #define DBG_TIM4_STOP ((uint32_t)0x00002000)
  64. #define DBG_CAN1_STOP ((uint32_t)0x00004000)
  65. #define DBG_I2C1SMBUS_TIMEOUT ((uint32_t)0x00008000)
  66. #define DBG_I2C2SMBUS_TIMEOUT ((uint32_t)0x00010000)
  67. #define DBG_TIM8_STOP ((uint32_t)0x00020000)
  68. #define DBG_TIM5_STOP ((uint32_t)0x00040000)
  69. #define DBG_TIM6_STOP ((uint32_t)0x00080000)
  70. #define DBG_TIM7_STOP ((uint32_t)0x00100000)
  71. #define DBG_CAN2_STOP ((uint32_t)0x00200000)
  72. #define IS_DBGMCU_PERIPH(PERIPH) ((((PERIPH)&0xFFC000F8) == 0x00) && ((PERIPH) != 0x00))
  73. /**
  74. * @}
  75. */
  76. /** @addtogroup DBGMCU_Exported_Macros
  77. * @{
  78. */
  79. /**
  80. * @}
  81. */
  82. /** @addtogroup DBGMCU_Exported_Functions
  83. * @{
  84. */
  85. void GetUCID(uint8_t *UCIDbuf);
  86. void GetUID(uint8_t *UIDbuf);
  87. void GetDBGMCU_ID(uint8_t *DBGMCU_IDbuf);
  88. uint32_t DBG_GetRevNum(void);
  89. uint32_t DBG_GetDevNum(void);
  90. void DBG_ConfigPeriph(uint32_t DBG_Periph, FunctionalState Cmd);
  91. uint32_t DBG_GetFlashSize(void);
  92. uint32_t DBG_GetSramSize(void);
  93. #ifdef __cplusplus
  94. }
  95. #endif
  96. #endif /* __N32G45X_DBG_H__ */
  97. /**
  98. * @}
  99. */
  100. /**
  101. * @}
  102. */
  103. /**
  104. * @}
  105. */