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.
Diff: misc_mort.h
- Revision:
- 0:34ee385f4d2d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc_mort.h Sat Oct 23 05:49:09 2021 +0000
@@ -0,0 +1,183 @@
+/**
+ ******************************************************************************
+ * @file misc.h
+ * @author MCD Application Team
+ * @version V1.8.0
+ * @date 04-November-2016
+ * @brief This file contains all the functions prototypes for the miscellaneous
+ * firmware library functions (add-on to CMSIS functions).
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>© COPYRIGHT 2016 STMicroelectronics</center></h2>
+ *
+ * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
+ * You may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.st.com/software_license_agreement_liberty_v2
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************************
+ */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __MISC_MORT_H
+#define __MISC_MORT_H
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "stm32f4xx_mort2.h"
+
+/** @addtogroup STM32F4xx_StdPeriph_Driver
+ * @{
+ */
+
+/** @addtogroup MISC
+ * @{
+ */
+
+/* Exported types ------------------------------------------------------------*/
+
+/**
+ * @brief NVIC Init Structure definition
+ */
+
+typedef struct
+{
+ uint8_t NVIC_IRQChannel; /*!< Specifies the IRQ channel to be enabled or disabled.
+ This parameter can be an enumerator of @ref IRQn_Type_MORT
+ enumeration (For the complete STM32 Devices IRQ Channels
+ list, please refer to stm32f4xx.h file) */
+
+ uint8_t NVIC_IRQChannelPreemptionPriority; /*!< Specifies the pre-emption priority for the IRQ channel
+ specified in NVIC_IRQChannel. This parameter can be a value
+ between 0 and 15 as described in the table @ref MISC_NVIC_Priority_Table
+ A lower priority value indicates a higher priority */
+
+ uint8_t NVIC_IRQChannelSubPriority; /*!< Specifies the subpriority level for the IRQ channel specified
+ in NVIC_IRQChannel. This parameter can be a value
+ between 0 and 15 as described in the table @ref MISC_NVIC_Priority_Table
+ A lower priority value indicates a higher priority */
+
+ FunctionalState NVIC_IRQChannelCmd; /*!< Specifies whether the IRQ channel defined in NVIC_IRQChannel
+ will be enabled or disabled.
+ This parameter can be set either to ENABLE or DISABLE */
+} NVIC_InitTypeDef_mort;
+
+/* Exported constants --------------------------------------------------------*/
+
+/** @defgroup MISC_Exported_Constants
+ * @{
+ */
+
+/** @defgroup MISC_Vector_Table_Base
+ * @{
+ */
+
+#define NVIC_VectTab_RAM_MORT ((uint32_t)0x20000000)
+#define NVIC_VectTab_FLASH_MORT ((uint32_t)0x08000000)
+#define IS_NVIC_VECTTAB_MORT(VECTTAB) (((VECTTAB) == NVIC_VectTab_RAM_MORT) || \
+ ((VECTTAB) == NVIC_VectTab_FLASH_MORT))
+/**
+ * @}
+ */
+
+/** @defgroup MISC_System_Low_Power
+ * @{
+ */
+
+#define NVIC_LP_SEVONPEND_MORT ((uint8_t)0x10)
+#define NVIC_LP_SLEEPDEEP_MORT ((uint8_t)0x04)
+#define NVIC_LP_SLEEPONEXIT_MORT ((uint8_t)0x02)
+#define IS_NVIC_LP_MORT(LP) (((LP) == NVIC_LP_SEVONPEND_MORT) || \
+ ((LP) == NVIC_LP_SLEEPDEEP_MORT) || \
+ ((LP) == NVIC_LP_SLEEPONEXIT_MORT))
+/**
+ * @}
+ */
+
+/** @defgroup MISC_Preemption_Priority_Group
+ * @{
+ */
+
+#define NVIC_PriorityGroup_0_MORT ((uint32_t)0x700) /*!< 0 bits for pre-emption priority
+ 4 bits for subpriority */
+#define NVIC_PriorityGroup_1_MORT ((uint32_t)0x600) /*!< 1 bits for pre-emption priority
+ 3 bits for subpriority */
+#define NVIC_PriorityGroup_2_MORT ((uint32_t)0x500) /*!< 2 bits for pre-emption priority
+ 2 bits for subpriority */
+#define NVIC_PriorityGroup_3_MORT ((uint32_t)0x400) /*!< 3 bits for pre-emption priority
+ 1 bits for subpriority */
+#define NVIC_PriorityGroup_4_MORT ((uint32_t)0x300) /*!< 4 bits for pre-emption priority
+ 0 bits for subpriority */
+
+#define IS_NVIC_PRIORITY_GROUP_MORT(GROUP) (((GROUP) == NVIC_PriorityGroup_0_MORT) || \
+ ((GROUP) == NVIC_PriorityGroup_1_MORT) || \
+ ((GROUP) == NVIC_PriorityGroup_2_MORT) || \
+ ((GROUP) == NVIC_PriorityGroup_3_MORT) || \
+ ((GROUP) == NVIC_PriorityGroup_4_MORT))
+
+#define IS_NVIC_PREEMPTION_PRIORITY_MORT(PRIORITY) ((PRIORITY) < 0x10)
+
+#define IS_NVIC_SUB_PRIORITY_MORT(PRIORITY) ((PRIORITY) < 0x10)
+
+#define IS_NVIC_OFFSET_MORT(OFFSET) ((OFFSET) < 0x000FFFFF)
+
+/**
+ * @}
+ */
+
+/** @defgroup MISC_SysTick_clock_source
+ * @{
+ */
+
+#define SysTick_CLKSource_HCLK_Div8_MORT ((uint32_t)0xFFFFFFFB)
+#define SysTick_CLKSource_HCLK_MORT ((uint32_t)0x00000004)
+#define IS_SYSTICK_CLK_SOURCE_MORT(SOURCE) (((SOURCE) == SysTick_CLKSource_HCLK_MORT) || \
+ ((SOURCE) == SysTick_CLKSource_HCLK_Div8_MORT))
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions --------------------------------------------------------*/
+
+void NVIC_PriorityGroupConfig_mort(uint32_t NVIC_PriorityGroup);
+void NVIC_Init_mort(NVIC_InitTypeDef_mort* NVIC_InitStruct);
+void NVIC_SetVectorTable_mort(uint32_t NVIC_VectTab, uint32_t Offset);
+void NVIC_SystemLPConfig_mort(uint8_t LowPowerMode, FunctionalState NewState);
+void SysTick_CLKSourceConfig_mort(uint32_t SysTick_CLKSource);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MISC_H */
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
+
+
+
+
+