Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
misc_mort.h
00001 /** 00002 ****************************************************************************** 00003 * @file misc.h 00004 * @author MCD Application Team 00005 * @version V1.8.0 00006 * @date 04-November-2016 00007 * @brief This file contains all the functions prototypes for the miscellaneous 00008 * firmware library functions (add-on to CMSIS functions). 00009 ****************************************************************************** 00010 * @attention 00011 * 00012 * <h2><center>© COPYRIGHT 2016 STMicroelectronics</center></h2> 00013 * 00014 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 00015 * You may not use this file except in compliance with the License. 00016 * You may obtain a copy of the License at: 00017 * 00018 * http://www.st.com/software_license_agreement_liberty_v2 00019 * 00020 * Unless required by applicable law or agreed to in writing, software 00021 * distributed under the License is distributed on an "AS IS" BASIS, 00022 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00023 * See the License for the specific language governing permissions and 00024 * limitations under the License. 00025 * 00026 ****************************************************************************** 00027 */ 00028 00029 /* Define to prevent recursive inclusion -------------------------------------*/ 00030 #ifndef __MISC_MORT_H 00031 #define __MISC_MORT_H 00032 00033 #ifdef __cplusplus 00034 extern "C" { 00035 #endif 00036 00037 /* Includes ------------------------------------------------------------------*/ 00038 #include "stm32f4xx_mort2.h" 00039 00040 /** @addtogroup STM32F4xx_StdPeriph_Driver 00041 * @{ 00042 */ 00043 00044 /** @addtogroup MISC 00045 * @{ 00046 */ 00047 00048 /* Exported types ------------------------------------------------------------*/ 00049 00050 /** 00051 * @brief NVIC Init Structure definition 00052 */ 00053 00054 typedef struct 00055 { 00056 uint8_t NVIC_IRQChannel; /*!< Specifies the IRQ channel to be enabled or disabled. 00057 This parameter can be an enumerator of @ref IRQn_Type_MORT 00058 enumeration (For the complete STM32 Devices IRQ Channels 00059 list, please refer to stm32f4xx.h file) */ 00060 00061 uint8_t NVIC_IRQChannelPreemptionPriority; /*!< Specifies the pre-emption priority for the IRQ channel 00062 specified in NVIC_IRQChannel. This parameter can be a value 00063 between 0 and 15 as described in the table @ref MISC_NVIC_Priority_Table 00064 A lower priority value indicates a higher priority */ 00065 00066 uint8_t NVIC_IRQChannelSubPriority; /*!< Specifies the subpriority level for the IRQ channel specified 00067 in NVIC_IRQChannel. This parameter can be a value 00068 between 0 and 15 as described in the table @ref MISC_NVIC_Priority_Table 00069 A lower priority value indicates a higher priority */ 00070 00071 FunctionalState NVIC_IRQChannelCmd; /*!< Specifies whether the IRQ channel defined in NVIC_IRQChannel 00072 will be enabled or disabled. 00073 This parameter can be set either to ENABLE or DISABLE */ 00074 } NVIC_InitTypeDef_mort; 00075 00076 /* Exported constants --------------------------------------------------------*/ 00077 00078 /** @defgroup MISC_Exported_Constants 00079 * @{ 00080 */ 00081 00082 /** @defgroup MISC_Vector_Table_Base 00083 * @{ 00084 */ 00085 00086 #define NVIC_VectTab_RAM_MORT ((uint32_t)0x20000000) 00087 #define NVIC_VectTab_FLASH_MORT ((uint32_t)0x08000000) 00088 #define IS_NVIC_VECTTAB_MORT(VECTTAB) (((VECTTAB) == NVIC_VectTab_RAM_MORT) || \ 00089 ((VECTTAB) == NVIC_VectTab_FLASH_MORT)) 00090 /** 00091 * @} 00092 */ 00093 00094 /** @defgroup MISC_System_Low_Power 00095 * @{ 00096 */ 00097 00098 #define NVIC_LP_SEVONPEND_MORT ((uint8_t)0x10) 00099 #define NVIC_LP_SLEEPDEEP_MORT ((uint8_t)0x04) 00100 #define NVIC_LP_SLEEPONEXIT_MORT ((uint8_t)0x02) 00101 #define IS_NVIC_LP_MORT(LP) (((LP) == NVIC_LP_SEVONPEND_MORT) || \ 00102 ((LP) == NVIC_LP_SLEEPDEEP_MORT) || \ 00103 ((LP) == NVIC_LP_SLEEPONEXIT_MORT)) 00104 /** 00105 * @} 00106 */ 00107 00108 /** @defgroup MISC_Preemption_Priority_Group 00109 * @{ 00110 */ 00111 00112 #define NVIC_PriorityGroup_0_MORT ((uint32_t)0x700) /*!< 0 bits for pre-emption priority 00113 4 bits for subpriority */ 00114 #define NVIC_PriorityGroup_1_MORT ((uint32_t)0x600) /*!< 1 bits for pre-emption priority 00115 3 bits for subpriority */ 00116 #define NVIC_PriorityGroup_2_MORT ((uint32_t)0x500) /*!< 2 bits for pre-emption priority 00117 2 bits for subpriority */ 00118 #define NVIC_PriorityGroup_3_MORT ((uint32_t)0x400) /*!< 3 bits for pre-emption priority 00119 1 bits for subpriority */ 00120 #define NVIC_PriorityGroup_4_MORT ((uint32_t)0x300) /*!< 4 bits for pre-emption priority 00121 0 bits for subpriority */ 00122 00123 #define IS_NVIC_PRIORITY_GROUP_MORT(GROUP) (((GROUP) == NVIC_PriorityGroup_0_MORT) || \ 00124 ((GROUP) == NVIC_PriorityGroup_1_MORT) || \ 00125 ((GROUP) == NVIC_PriorityGroup_2_MORT) || \ 00126 ((GROUP) == NVIC_PriorityGroup_3_MORT) || \ 00127 ((GROUP) == NVIC_PriorityGroup_4_MORT)) 00128 00129 #define IS_NVIC_PREEMPTION_PRIORITY_MORT(PRIORITY) ((PRIORITY) < 0x10) 00130 00131 #define IS_NVIC_SUB_PRIORITY_MORT(PRIORITY) ((PRIORITY) < 0x10) 00132 00133 #define IS_NVIC_OFFSET_MORT(OFFSET) ((OFFSET) < 0x000FFFFF) 00134 00135 /** 00136 * @} 00137 */ 00138 00139 /** @defgroup MISC_SysTick_clock_source 00140 * @{ 00141 */ 00142 00143 #define SysTick_CLKSource_HCLK_Div8_MORT ((uint32_t)0xFFFFFFFB) 00144 #define SysTick_CLKSource_HCLK_MORT ((uint32_t)0x00000004) 00145 #define IS_SYSTICK_CLK_SOURCE_MORT(SOURCE) (((SOURCE) == SysTick_CLKSource_HCLK_MORT) || \ 00146 ((SOURCE) == SysTick_CLKSource_HCLK_Div8_MORT)) 00147 /** 00148 * @} 00149 */ 00150 00151 /** 00152 * @} 00153 */ 00154 00155 /* Exported macro ------------------------------------------------------------*/ 00156 /* Exported functions --------------------------------------------------------*/ 00157 00158 void NVIC_PriorityGroupConfig_mort(uint32_t NVIC_PriorityGroup); 00159 void NVIC_Init_mort(NVIC_InitTypeDef_mort* NVIC_InitStruct); 00160 void NVIC_SetVectorTable_mort(uint32_t NVIC_VectTab, uint32_t Offset); 00161 void NVIC_SystemLPConfig_mort(uint8_t LowPowerMode, FunctionalState NewState); 00162 void SysTick_CLKSourceConfig_mort(uint32_t SysTick_CLKSource); 00163 00164 #ifdef __cplusplus 00165 } 00166 #endif 00167 00168 #endif /* __MISC_H */ 00169 00170 /** 00171 * @} 00172 */ 00173 00174 /** 00175 * @} 00176 */ 00177 00178 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 00179 00180 00181 00182 00183
Generated on Sat Oct 21 2023 04:38:55 by
1.7.2