breezy/breezystm32/lib/STM32F10x_StdPeriph_Driver/inc/misc.h
Go to the documentation of this file.
1 
23 /* Define to prevent recursive inclusion -------------------------------------*/
24 #ifndef __MISC_H
25 #define __MISC_H
26 
27 #ifdef __cplusplus
28  extern "C" {
29 #endif
30 
31 /* Includes ------------------------------------------------------------------*/
32 #include "stm32f10x.h"
33 
50 typedef struct
51 {
52  uint8_t NVIC_IRQChannel;
57  uint8_t NVIC_IRQChannelPreemptionPriority;
61  uint8_t NVIC_IRQChannelSubPriority;
65  FunctionalState NVIC_IRQChannelCmd;
69 
115 #define NVIC_VectTab_RAM ((uint32_t)0x20000000)
116 #define NVIC_VectTab_FLASH ((uint32_t)0x08000000)
117 #define IS_NVIC_VECTTAB(VECTTAB) (((VECTTAB) == NVIC_VectTab_RAM) || \
118  ((VECTTAB) == NVIC_VectTab_FLASH))
119 
127 #define NVIC_LP_SEVONPEND ((uint8_t)0x10)
128 #define NVIC_LP_SLEEPDEEP ((uint8_t)0x04)
129 #define NVIC_LP_SLEEPONEXIT ((uint8_t)0x02)
130 #define IS_NVIC_LP(LP) (((LP) == NVIC_LP_SEVONPEND) || \
131  ((LP) == NVIC_LP_SLEEPDEEP) || \
132  ((LP) == NVIC_LP_SLEEPONEXIT))
133 
141 #define NVIC_PriorityGroup_0 ((uint32_t)0x700)
143 #define NVIC_PriorityGroup_1 ((uint32_t)0x600)
145 #define NVIC_PriorityGroup_2 ((uint32_t)0x500)
147 #define NVIC_PriorityGroup_3 ((uint32_t)0x400)
149 #define NVIC_PriorityGroup_4 ((uint32_t)0x300)
152 #define IS_NVIC_PRIORITY_GROUP(GROUP) (((GROUP) == NVIC_PriorityGroup_0) || \
153  ((GROUP) == NVIC_PriorityGroup_1) || \
154  ((GROUP) == NVIC_PriorityGroup_2) || \
155  ((GROUP) == NVIC_PriorityGroup_3) || \
156  ((GROUP) == NVIC_PriorityGroup_4))
158 #define IS_NVIC_PREEMPTION_PRIORITY(PRIORITY) ((PRIORITY) < 0x10)
159 
160 #define IS_NVIC_SUB_PRIORITY(PRIORITY) ((PRIORITY) < 0x10)
161 
162 #define IS_NVIC_OFFSET(OFFSET) ((OFFSET) < 0x000FFFFF)
172 #define SysTick_CLKSource_HCLK_Div8 ((uint32_t)0xFFFFFFFB)
173 #define SysTick_CLKSource_HCLK ((uint32_t)0x00000004)
174 #define IS_SYSTICK_CLK_SOURCE(SOURCE) (((SOURCE) == SysTick_CLKSource_HCLK) || \
175  ((SOURCE) == SysTick_CLKSource_HCLK_Div8))
176 
196 void NVIC_PriorityGroupConfig(uint32_t NVIC_PriorityGroup);
197 void NVIC_Init(NVIC_InitTypeDef* NVIC_InitStruct);
198 void NVIC_SetVectorTable(uint32_t NVIC_VectTab, uint32_t Offset);
199 void NVIC_SystemLPConfig(uint8_t LowPowerMode, FunctionalState NewState);
200 void SysTick_CLKSourceConfig(uint32_t SysTick_CLKSource);
201 
202 #ifdef __cplusplus
203 }
204 #endif
205 
206 #endif /* __MISC_H */
207 
220 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
FunctionalState
Definition: stm32f4xx.h:708
void NVIC_SetVectorTable(uint32_t NVIC_VectTab, uint32_t Offset)
Sets the vector table location and Offset.
void NVIC_PriorityGroupConfig(uint32_t NVIC_PriorityGroup)
Configures the priority grouping: pre-emption priority and subpriority.
void NVIC_Init(NVIC_InitTypeDef *NVIC_InitStruct)
Initializes the NVIC peripheral according to the specified parameters in the NVIC_InitStruct.
void SysTick_CLKSourceConfig(uint32_t SysTick_CLKSource)
Configures the SysTick clock source.
void NVIC_SystemLPConfig(uint8_t LowPowerMode, FunctionalState NewState)
Selects the condition for the system to enter low power mode.
CMSIS Cortex-M3 Device Peripheral Access Layer Header File. This file contains all the peripheral reg...


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Oct 24 2019 03:17:19