stm32f30x_dbgmcu.c
Go to the documentation of this file.
1 
31 /* Includes ------------------------------------------------------------------*/
32 #include "stm32f30x_dbgmcu.h"
33 
43 /* Private typedef -----------------------------------------------------------*/
44 /* Private define ------------------------------------------------------------*/
45 #define IDCODE_DEVID_MASK ((uint32_t)0x00000FFF)
46 
47 /* Private macro -------------------------------------------------------------*/
48 /* Private variables ---------------------------------------------------------*/
49 /* Private function prototypes -----------------------------------------------*/
50 /* Private functions ---------------------------------------------------------*/
51 
73 uint32_t DBGMCU_GetREVID(void)
74 {
75  return(DBGMCU->IDCODE >> 16);
76 }
77 
83 uint32_t DBGMCU_GetDEVID(void)
84 {
85  return(DBGMCU->IDCODE & IDCODE_DEVID_MASK);
86 }
87 
115 void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState)
116 {
117  /* Check the parameters */
118  assert_param(IS_DBGMCU_PERIPH(DBGMCU_Periph));
120  if (NewState != DISABLE)
121  {
122  DBGMCU->CR |= DBGMCU_Periph;
123  }
124  else
125  {
126  DBGMCU->CR &= ~DBGMCU_Periph;
127  }
128 }
129 
152 void DBGMCU_APB1PeriphConfig(uint32_t DBGMCU_Periph, FunctionalState NewState)
153 {
154  /* Check the parameters */
155  assert_param(IS_DBGMCU_APB1PERIPH(DBGMCU_Periph));
157 
158  if (NewState != DISABLE)
159  {
160  DBGMCU->APB1FZ |= DBGMCU_Periph;
161  }
162  else
163  {
164  DBGMCU->APB1FZ &= ~DBGMCU_Periph;
165  }
166 }
167 
181 void DBGMCU_APB2PeriphConfig(uint32_t DBGMCU_Periph, FunctionalState NewState)
182 {
183  /* Check the parameters */
184  assert_param(IS_DBGMCU_APB2PERIPH(DBGMCU_Periph));
186 
187  if (NewState != DISABLE)
188  {
189  DBGMCU->APB2FZ |= DBGMCU_Periph;
190  }
191  else
192  {
193  DBGMCU->APB2FZ &= ~DBGMCU_Periph;
194  }
195 }
196 
213 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
FunctionalState
Definition: stm32f4xx.h:708
uint32_t DBGMCU_GetDEVID(void)
Returns the device identifier.
void assert_param(int val)
#define IS_DBGMCU_PERIPH(PERIPH)
void DBGMCU_APB2PeriphConfig(uint32_t DBGMCU_Periph, FunctionalState NewState)
Configures APB2 peripheral behavior when the MCU is in Debug mode.
#define IS_FUNCTIONAL_STATE(STATE)
Definition: stm32f4xx.h:709
#define IS_DBGMCU_APB2PERIPH(PERIPH)
#define IDCODE_DEVID_MASK
void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState)
Configures low power mode behavior when the MCU is in Debug mode.
#define IS_DBGMCU_APB1PERIPH(PERIPH)
#define DBGMCU
Definition: stm32f4xx.h:2167
uint32_t DBGMCU_GetREVID(void)
Returns the device revision identifier.
void DBGMCU_APB1PeriphConfig(uint32_t DBGMCU_Periph, FunctionalState NewState)
Configures APB1 peripheral behavior when the MCU is in Debug mode.
This file contains all the functions prototypes for the DBGMCU firmware library.


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:25