/**
  ******************************************************************************
  * @file    ys32f030_dbgmcu.h
  * @author  YSPRING Application Team
  * @version V1.0.1
  * @date    2023.6.25
  * @brief   This file contains all the functions prototypes for the DBGMCU firmware 
  *          library.
  ******************************************************************************
  */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __YS32F030_DBGMCU_H
#define __YS32F030_DBGMCU_H

#ifdef __cplusplus
 extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "ys32f030.h"

/** @addtogroup YS32F030_StdPeriph_Driver
  * @{
  */

/** @addtogroup DBGMCU
  * @{
  */ 
/* Exported types ------------------------------------------------------------*/ 
/* Exported constants --------------------------------------------------------*/


/** @defgroup DBGMCU_Exported_Constants
  * @{
  */

#define DBGMCU_STOP                  DBGMCU_CR_DBG_STOP
#define IS_DBGMCU_PERIPH(PERIPH) ((((PERIPH) & 0xFFFFFFFD) == 0x00) && ((PERIPH) != 0x00))

#define DBGMCU_TIM3_STOP             DBGMCU_DBG_APB_FZ1_DBG_TIM3_STOP
#define DBGMCU_TIM6_STOP             DBGMCU_DBG_APB_FZ1_DBG_TIM6_STOP
#define DBGMCU_RTC_STOP              DBGMCU_DBG_APB_FZ1_DBG_RTC_STOP
#define DBGMCU_WWDG_STOP             DBGMCU_DBG_APB_FZ1_DBG_WWDG_STOP
#define DBGMCU_IWDG_STOP             DBGMCU_DBG_APB_FZ1_DBG_IWDG_STOP
#define DBGMCU_LPTIM_STOP            DBGMCU_DBG_APB_FZ1_DBG_LPTIM_STOP
#define IS_DBGMCU_APB1PERIPH(PERIPH) ((((PERIPH) & 0x7FFFE3ED) == 0x00) && ((PERIPH) != 0x00))

#define DBGMCU_TIM1_STOP             DBGMCU_DBG_APB_FZ2_DBG_TIM1_STOP
#define DBGMCU_TIM14_STOP            DBGMCU_DBG_APB_FZ2_DBG_TIM14_STOP
#define DBGMCU_TIM15_STOP            DBGMCU_DBG_APB_FZ2_DBG_TIM15_STOP
#define DBGMCU_TIM16_STOP            DBGMCU_DBG_APB_FZ2_DBG_TIM16_STOP
#define DBGMCU_TIM17_STOP            DBGMCU_DBG_APB_FZ2_DBG_TIM17_STOP
#define IS_DBGMCU_APB2PERIPH(PERIPH) ((((PERIPH) & 0xFFF877FF) == 0x00) && ((PERIPH) != 0x00))

/**
  * @}
  */ 

/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */ 

/* Device ID management functions ********************************/ 
uint32_t DBGMCU_GetDEVID(void);

/* Peripherals Configuration functions ****************************************/ 
void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState);
void DBGMCU_APB1PeriphConfig(uint32_t DBGMCU_Periph, FunctionalState NewState);
void DBGMCU_APB2PeriphConfig(uint32_t DBGMCU_Periph, FunctionalState NewState);

#ifdef __cplusplus
}
#endif

#endif /* __YS32F030_DBGMCU_H */

/**
  * @}
  */ 

/**
  * @}
  */ 

