1 /** 2 ******************************************************************************************************* 3 * @file fm33lc0xx_fl.h 4 * @author FMSH Application Team 5 * @brief Header file of FL Driver Library 6 ******************************************************************************************************* 7 * @attention 8 * 9 * Copyright (c) [2021] [Fudan Microelectronics] 10 * THIS SOFTWARE is licensed under Mulan PSL v2. 11 * You can use this software according to the terms and conditions of the Mulan PSL v2. 12 * You may obtain a copy of Mulan PSL v2 at: 13 * http://license.coscl.org.cn/MulanPSL2 14 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, 15 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, 16 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. 17 * See the Mulan PSL v2 for more details. 18 * 19 ******************************************************************************************************* 20 */ 21 22 /* Define to prevent recursive inclusion --------------------------------------------------------------*/ 23 #ifndef __FM33LC0XX_FL_H 24 #define __FM33LC0XX_FL_H 25 26 #ifdef __cplusplus 27 extern "C" { 28 #endif 29 30 /* Includes -------------------------------------------------------------------------------------------*/ 31 #include "fm33lc0xx_fl_conf.h" 32 #include "fm33lc0xx_fl_def.h" 33 34 /* Macros ---------------------------------------------------------------------------------------------*/ 35 /** @defgroup FL_Exported_Macros FL Driver Library Exported Macros 36 * @{ 37 */ 38 39 /** 40 * @brief FM33LC0xx FL Driver Library version number 41 */ 42 #define __FM33LC0xx_FL_VERSION_MAIN (0x02) /*!< [31:24] main version */ 43 #define __FM33LC0xx_FL_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */ 44 #define __FM33LC0xx_FL_VERSION_SUB2 (0x01) /*!< [15:0] sub2 version */ 45 #define __FM33LC0xx_FL_VERSION ((__FM33LC0xx_FL_VERSION_MAIN << 24)\ 46 |(__FM33LC0xx_FL_VERSION_SUB1 << 16)\ 47 |(__FM33LC0xx_FL_VERSION_SUB2)) 48 49 /** 50 * @brief Macros used by delay support functions 51 */ 52 #define FL_DELAY_US (SystemCoreClock/1000000) 53 #define FL_DELAY_MS (SystemCoreClock/1000) 54 55 /** 56 * @} 57 */ 58 59 /* Struct Defines -------------------------------------------------------------------------------------*/ 60 /** @defgroup FL_ET_NVIC FL Driver Library NVIC Init Sturcture Defines 61 * @{ 62 */ 63 64 typedef struct 65 { 66 /** 中断抢占优先级 */ 67 uint32_t preemptPriority; 68 69 } FL_NVIC_ConfigTypeDef; 70 71 /** 72 * @} 73 */ 74 75 /* Exported Functions ---------------------------------------------------------------------------------*/ 76 /** @defgroup FL_EF_DELAY FL Driver Library Exported Delay Support Functions 77 * @{ 78 */ 79 80 void FL_DelayInit(void); 81 void FL_DelayUs(uint32_t count); 82 void FL_DelayMs(uint32_t count); 83 void FL_DelayUsStart(uint32_t count); 84 void FL_DelayMsStart(uint32_t count); 85 bool FL_DelayEnd(void); 86 87 /** 88 * @} 89 */ 90 91 /** @defgroup FL_EF_INIT FL Driver Library Exported Init Functions 92 * @{ 93 */ 94 95 void FL_Init(void); 96 97 /** 98 * @} 99 */ 100 101 /** @defgroup FL_EF_NVIC FL Driver Library Exported NVIC Configuration Functions 102 * @{ 103 */ 104 105 void FL_NVIC_Init(FL_NVIC_ConfigTypeDef *configStruct, IRQn_Type irq); 106 107 /** 108 * @} 109 */ 110 111 #ifdef __cplusplus 112 } 113 #endif 114 115 #endif /* __FM33LC0XX_FL_H */ 116 117 /********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/ 118