STM32F10x Standard Peripherals Library  3.5.0
/opt/STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.c
Go to the documentation of this file.
00001 
00022 /* Includes ------------------------------------------------------------------*/
00023 #include "stm32f10x_dbgmcu.h"
00024 
00046 #define IDCODE_DEVID_MASK    ((uint32_t)0x00000FFF)
00047 
00084 uint32_t DBGMCU_GetREVID(void)
00085 {
00086    return(DBGMCU->IDCODE >> 16);
00087 }
00088 
00094 uint32_t DBGMCU_GetDEVID(void)
00095 {
00096    return(DBGMCU->IDCODE & IDCODE_DEVID_MASK);
00097 }
00098 
00134 void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState)
00135 {
00136   /* Check the parameters */
00137   assert_param(IS_DBGMCU_PERIPH(DBGMCU_Periph));
00138   assert_param(IS_FUNCTIONAL_STATE(NewState));
00139 
00140   if (NewState != DISABLE)
00141   {
00142     DBGMCU->CR |= DBGMCU_Periph;
00143   }
00144   else
00145   {
00146     DBGMCU->CR &= ~DBGMCU_Periph;
00147   }
00148 }
00149 
00162 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/