mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-05-31 03:38:02 +08:00
[bsp\fm33lc026] *增加gpio支持 *更新libraries\FM33LC0xx_FL_Driver FL库到V2.3.1 (#6175)
* [bsp\fm33lc026] *增加gpio支持 *更新libraries\FM33LC0xx_FL_Driver到2021年新版本
This commit is contained in:
+88
-120
File diff suppressed because it is too large
Load Diff
@@ -1,31 +1,30 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2018, RT-Thread Development Team
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2021-08-27 Jiao first version
|
* 2021-08-27 Jiao first version
|
||||||
|
* 2022-07-20 wudiyidashi support gpio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
|
|
||||||
int main(void)
|
#define LED1 GET_PIN(D, 4)
|
||||||
{
|
|
||||||
FL_GPIO_InitTypeDef GPIO_InitStruct = {0};
|
int main(void)
|
||||||
|
|
||||||
|
{
|
||||||
|
rt_pin_mode(LED1, PIN_MODE_OUTPUT);
|
||||||
|
rt_pin_write(LED1, PIN_HIGH);
|
||||||
|
|
||||||
FL_GPIO_SetOutputPin(GPIOD, FL_GPIO_PIN_4);
|
|
||||||
GPIO_InitStruct.pin = FL_GPIO_PIN_4;
|
|
||||||
GPIO_InitStruct.mode = FL_GPIO_MODE_OUTPUT;
|
|
||||||
GPIO_InitStruct.outputType = FL_GPIO_OUTPUT_PUSHPULL;
|
|
||||||
GPIO_InitStruct.pull = FL_DISABLE;
|
|
||||||
FL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
FL_GPIO_SetOutputPin(GPIOD, FL_GPIO_PIN_4);
|
rt_pin_write(LED1, PIN_HIGH);
|
||||||
rt_thread_mdelay(500);
|
rt_thread_mdelay(500);
|
||||||
FL_GPIO_ResetOutputPin(GPIOD, FL_GPIO_PIN_4);
|
rt_pin_write(LED1, PIN_LOW);
|
||||||
rt_thread_mdelay(500);
|
rt_thread_mdelay(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ config SOC_FM33LC0XX
|
|||||||
|
|
||||||
menu "On-chip Peripheral Drivers"
|
menu "On-chip Peripheral Drivers"
|
||||||
|
|
||||||
|
menuconfig BSP_USING_GPIO
|
||||||
|
bool "Enable GPIO"
|
||||||
|
select RT_USING_PIN
|
||||||
|
default y
|
||||||
|
|
||||||
menuconfig BSP_USING_UART
|
menuconfig BSP_USING_UART
|
||||||
bool "Enable UART"
|
bool "Enable UART"
|
||||||
default y
|
default y
|
||||||
@@ -29,10 +34,11 @@ menu "On-chip Peripheral Drivers"
|
|||||||
config BSP_USING_UART5
|
config BSP_USING_UART5
|
||||||
bool "Enable UART5"
|
bool "Enable UART5"
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif
|
endif
|
||||||
source "../libraries/HAL_Drivers/Kconfig"
|
endmenu
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
|
||||||
endmenu
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2018, RT-Thread Development Team
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@@ -71,7 +71,33 @@ FL_ErrorStatus FL_UART_GPIO_Init(UART_Type *UARTx)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FL_ErrorStatus FL_SPI_GPIO_Init(SPI_Type *SPIx)
|
||||||
|
{
|
||||||
|
FL_ErrorStatus status = FL_FAIL;
|
||||||
|
FL_GPIO_InitTypeDef GPIO_InitStruct;
|
||||||
|
if (SPIx == SPI1)
|
||||||
|
{
|
||||||
|
GPIO_InitStruct.pin = FL_GPIO_PIN_11 | FL_GPIO_PIN_10 | FL_GPIO_PIN_9;
|
||||||
|
GPIO_InitStruct.mode = FL_GPIO_MODE_DIGITAL;
|
||||||
|
GPIO_InitStruct.outputType = FL_GPIO_OUTPUT_PUSHPULL;
|
||||||
|
GPIO_InitStruct.pull = FL_DISABLE;
|
||||||
|
GPIO_InitStruct.remapPin = FL_DISABLE;
|
||||||
|
|
||||||
|
status=FL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
|
}
|
||||||
|
else if (SPIx == SPI2)
|
||||||
|
{
|
||||||
|
GPIO_InitStruct.pin = FL_GPIO_PIN_8 | FL_GPIO_PIN_10 | FL_GPIO_PIN_9;
|
||||||
|
GPIO_InitStruct.mode = FL_GPIO_MODE_DIGITAL;
|
||||||
|
GPIO_InitStruct.outputType = FL_GPIO_OUTPUT_PUSHPULL;
|
||||||
|
GPIO_InitStruct.pull = FL_DISABLE;
|
||||||
|
GPIO_InitStruct.remapPin = FL_DISABLE;
|
||||||
|
|
||||||
|
status=FL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||||
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
static void RCC_PLL_ConfigDomain_SYS(uint32_t Source, uint32_t PLL_R, uint32_t PLL_DB, uint32_t PLL_O)
|
static void RCC_PLL_ConfigDomain_SYS(uint32_t Source, uint32_t PLL_R, uint32_t PLL_DB, uint32_t PLL_O)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2018, RT-Thread Development Team
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl.h"
|
||||||
|
#include "drv_gpio.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
*******************************************************************************************************/
|
*******************************************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/** @addtogroup Keil
|
/** @addtogroup CMSIS
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -579,6 +579,7 @@ typedef struct
|
|||||||
__IO uint32_t DCFG; /*!< USB Device Config Register, Address offset: 0x800*/
|
__IO uint32_t DCFG; /*!< USB Device Config Register, Address offset: 0x800*/
|
||||||
__IO uint32_t DCTL; /*!< USB Device Control Register, Address offset: 0x804*/
|
__IO uint32_t DCTL; /*!< USB Device Control Register, Address offset: 0x804*/
|
||||||
__IO uint32_t DSTS; /*!< USB Device Status Register, Address offset: 0x808*/
|
__IO uint32_t DSTS; /*!< USB Device Status Register, Address offset: 0x808*/
|
||||||
|
__IO uint32_t RSV31; /*!< Reserved , Address offset: 0x80C*/
|
||||||
__IO uint32_t DIEPMSK; /*!< USB Device In Endpoint Interrupt Mask Register, Address offset: 0x810*/
|
__IO uint32_t DIEPMSK; /*!< USB Device In Endpoint Interrupt Mask Register, Address offset: 0x810*/
|
||||||
__IO uint32_t DOEPMSK; /*!< USB Device OUT Endpoint Interrupt Mask Registe, Address offset: 0x814*/
|
__IO uint32_t DOEPMSK; /*!< USB Device OUT Endpoint Interrupt Mask Registe, Address offset: 0x814*/
|
||||||
__IO uint32_t DAINT; /*!< USB Device All Endpoint Interrupt Register, Address offset: 0x818*/
|
__IO uint32_t DAINT; /*!< USB Device All Endpoint Interrupt Register, Address offset: 0x818*/
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
* @file system_fm33lc0xx.h
|
* @file system_fm33lc0xx.h
|
||||||
* @brief CMSIS Cortex-M0 Device Peripheral Access Layer Header File for
|
* @brief CMSIS Cortex-M0 Device Peripheral Access Layer Header File for
|
||||||
* Device FM33LC0XX
|
* Device FM33LC0XX
|
||||||
* @version V2.00
|
* @version V2.0.0
|
||||||
* @date 15. March 2021
|
* @date 15. Mar 2021
|
||||||
*
|
*
|
||||||
* @note
|
* @note
|
||||||
*
|
*
|
||||||
@@ -35,7 +35,6 @@
|
|||||||
POSSIBILITY OF SUCH DAMAGE.
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
---------------------------------------------------------------------------*/
|
---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef SYSTEM_FM33LC0XX_H
|
#ifndef SYSTEM_FM33LC0XX_H
|
||||||
#define SYSTEM_FM33LC0XX_H
|
#define SYSTEM_FM33LC0XX_H
|
||||||
|
|
||||||
@@ -43,110 +42,119 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdint.h>
|
/**
|
||||||
#include <stdio.h>
|
* @brief CMSIS Device version number
|
||||||
#include "fm33lc0xx.h"
|
*/
|
||||||
|
#define __FM33LC0xx_CMSIS_VERSION_MAIN (0x02) /*!< [31:24] main version */
|
||||||
|
#define __FM33LC0xx_CMSIS_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */
|
||||||
|
#define __FM33LC0xx_CMSIS_VERSION_SUB2 (0x01) /*!< [15:0] sub2 version */
|
||||||
|
#define __FM33LC0xx_CMSIS_VERSION ((__FM33LC0xx_CMSIS_VERSION_MAIN << 24)\
|
||||||
|
|(__FM33LC0xx_CMSIS_VERSION_SUB1 << 16)\
|
||||||
|
|(__FM33LC0xx_CMSIS_VERSION_SUB2))
|
||||||
|
|
||||||
|
/* Configurations ------------------------------------------------------------*/
|
||||||
|
/**
|
||||||
|
* @brief LSCLK source
|
||||||
|
* @note Comment the following line to use only LPOSC as LSCLK source, and also
|
||||||
|
* disable LSCLK auto switch function.
|
||||||
|
*/
|
||||||
#define USE_LSCLK_CLOCK_SRC_XTLF
|
#define USE_LSCLK_CLOCK_SRC_XTLF
|
||||||
|
|
||||||
//#define SYSCLK_SRC_RC4M
|
#ifdef USE_LSCLK_CLOCK_SRC_XTLF
|
||||||
//#define SYSCLK_SRC_XTHF
|
|
||||||
#define SYSCLK_SRC_RCHF
|
|
||||||
//#define SYSCLK_SRC_PLL
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//#define USE_PLL_CLOCK_SRC_RCHF
|
|
||||||
//#define USE_PLL_CLOCK_SRC_XTHF
|
|
||||||
|
|
||||||
|
|
||||||
#if ((!defined(SYSCLK_SRC_RC4M)) && (!defined(SYSCLK_SRC_XTHF))&&(!defined(SYSCLK_SRC_PLL))&&(!defined(SYSCLK_SRC_RCHF)))
|
|
||||||
#error "Must select a clock source form the SYSCLK_SRC_RC4M or SYSCLK_SRC_XTHF or SYSCLK_SRC_PLL or SYSCLK_SRC_RCHF as the master clock."
|
|
||||||
#elif (((defined(SYSCLK_SRC_RC4M)) && ((defined(SYSCLK_SRC_XTHF))||(defined(SYSCLK_SRC_PLL))||(defined(SYSCLK_SRC_RCHF))))||\
|
|
||||||
((defined(SYSCLK_SRC_XTHF)) && ((defined(SYSCLK_SRC_RC4M))||(defined(SYSCLK_SRC_PLL))||(defined(SYSCLK_SRC_RCHF))))||\
|
|
||||||
((defined(SYSCLK_SRC_PLL)) && ((defined(SYSCLK_SRC_XTHF))||(defined(SYSCLK_SRC_RC4M))||(defined(SYSCLK_SRC_RCHF))))||\
|
|
||||||
((defined(SYSCLK_SRC_RCHF)) && ((defined(SYSCLK_SRC_XTHF))||(defined(SYSCLK_SRC_PLL))||(defined(SYSCLK_SRC_RC4M)))))
|
|
||||||
#error "Only one clock source can be selected as the master clock."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(SYSCLK_SRC_PLL) && !defined(USE_PLL_CLOCK_SRC_RCHF) && !defined(USE_PLL_CLOCK_SRC_XTHF)
|
|
||||||
#error "You have chosen to enable the PLL, so you need to specify the clock source for the PLL.."
|
|
||||||
#elif defined(SYSCLK_SRC_PLL) && (defined(USE_PLL_CLOCK_SRC_RCHF) && defined(USE_PLL_CLOCK_SRC_XTHF))
|
|
||||||
#error "Please select one of the USE_PLL_CLOCK_SRC_RCHF and USE_PLL_CLOCK_SRC_XTHF in your application"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined (XTHF_VALUE)
|
|
||||||
#define XTHF_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */
|
|
||||||
#endif /* XTHF_VALUE */
|
|
||||||
|
|
||||||
#if !defined (XTLF_VALUE)
|
|
||||||
#define XTLF_VALUE ((uint32_t)32768U) /*!< Value of the Internal oscillator in Hz*/
|
|
||||||
#endif /* XTLF_VALUE */
|
|
||||||
|
|
||||||
|
|
||||||
#define LDT_CHECK(_N_VALUE_, _T_VALUE_) \
|
|
||||||
((((_N_VALUE_ >> 16) & 0xffff) == \
|
|
||||||
((~_N_VALUE_) & 0xffff)) ? _N_VALUE_ : _T_VALUE_)
|
|
||||||
|
|
||||||
#define LPOSC_LDT_TRIM (*(uint32_t *)0x1FFFFB20) // LPOSC 常温校准值
|
|
||||||
#define RCHF8M_LDT_TRIM (*(uint32_t *)0x1FFFFB40) // RC8M 常温校准值
|
|
||||||
#define RCHF16M_LDT_TRIM (*(uint32_t *)0x1FFFFB3C) // RC16M 常温校准值
|
|
||||||
#define RCHF24M_LDT_TRIM (*(uint32_t *)0x1FFFFB38) // RC24M 常温校准值
|
|
||||||
#define RCMF4M_LDT_TRIM (*(uint32_t *)0x1FFFFB44) // RCMF 常温校准值
|
|
||||||
|
|
||||||
#define LPOSC_TRIM (LDT_CHECK(LPOSC_LDT_TRIM, 0x80) & 0xff)
|
|
||||||
#define RCMF4M_TRIM (LDT_CHECK(RCMF4M_LDT_TRIM, 0x40) & 0x7f)
|
|
||||||
#define RCHF8M_TRIM (LDT_CHECK(RCHF8M_LDT_TRIM, 0x40) & 0x7f)
|
|
||||||
#define RCHF16M_TRIM (LDT_CHECK(RCHF16M_LDT_TRIM, 0x40) & 0x7f)
|
|
||||||
#define RCHF24M_TRIM (LDT_CHECK(RCHF24M_LDT_TRIM, 0x40) & 0x7f)
|
|
||||||
|
|
||||||
|
|
||||||
#define __SYSTEM_CLOCK (8000000)
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief FL NVIC Init Sturcture definition
|
* @brief LSCLK source
|
||||||
|
* @note Comment the following line to disable LSCLK auto switch function.
|
||||||
*/
|
*/
|
||||||
typedef struct
|
#define USE_LSCLK_AUTO_SWITCH
|
||||||
{
|
|
||||||
/* 中断抢占优先级 */
|
|
||||||
uint32_t preemptPriority;
|
|
||||||
|
|
||||||
}NVIC_ConfigTypeDef;
|
|
||||||
|
|
||||||
|
#endif /* USE_LSCLK_CLOCK_SRC_XTLF */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Open IWDT on program startup
|
||||||
|
* @note Uncomment the following line to use IWDT on startup. User can modify
|
||||||
|
* the IWDT_OVERFLOW_PERIOD to change the IDWT overflow period.
|
||||||
|
*/
|
||||||
|
/* #define USE_IWDT_ON_STARTUP */
|
||||||
|
|
||||||
|
#ifdef USE_IWDT_ON_STARTUP
|
||||||
|
/*
|
||||||
|
Valid value of IWDT_OVERFLOW_PERIOD:
|
||||||
|
- 0x0: 125ms
|
||||||
|
- 0x1: 250ms
|
||||||
|
- 0x2: 500ms
|
||||||
|
- 0x3: 1s
|
||||||
|
- 0x4: 2s
|
||||||
|
- 0x5: 4s
|
||||||
|
- 0x6: 8s
|
||||||
|
- 0x7: 16s
|
||||||
|
*/
|
||||||
|
#define IWDT_OVERFLOW_PERIOD 0x7
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
/* Device Includes -----------------------------------------------------------*/
|
||||||
|
#include "fm33lc0xx.h"
|
||||||
|
|
||||||
|
/* Trim Values ---------------------------------------------------------------*/
|
||||||
|
/* Validate Function */
|
||||||
|
#define LDT_CHECK(_N_VALUE_, _T_VALUE_) \
|
||||||
|
((((_N_VALUE_ >> 16) & 0xFFFFU) == \
|
||||||
|
(~(_N_VALUE_) & 0xFFFFU)) ? (_N_VALUE_) : (_T_VALUE_))
|
||||||
|
|
||||||
|
/* Trim Values Address */
|
||||||
|
#define LPOSC_LDT_TRIM (*(uint32_t *)0x1FFFFB20U) /* LPOSC trim value */
|
||||||
|
#define RCHF8M_LDT_TRIM (*(uint32_t *)0x1FFFFB40U) /* RC8M trim value */
|
||||||
|
#define RCHF16M_LDT_TRIM (*(uint32_t *)0x1FFFFB3CU) /* RC16M trim value */
|
||||||
|
#define RCHF24M_LDT_TRIM (*(uint32_t *)0x1FFFFB38U) /* RC24M trim value */
|
||||||
|
#define RCMF4M_LDT_TRIM (*(uint32_t *)0x1FFFFB44U) /* RCMF trim value */
|
||||||
|
|
||||||
|
/* Trim Values */
|
||||||
|
#define LPOSC_TRIM (LDT_CHECK(LPOSC_LDT_TRIM, 0x80) & 0xFFU)
|
||||||
|
#define RCMF4M_TRIM (LDT_CHECK(RCMF4M_LDT_TRIM, 0x40) & 0x7FU)
|
||||||
|
#define RCHF8M_TRIM (LDT_CHECK(RCHF8M_LDT_TRIM, 0x40) & 0x7FU)
|
||||||
|
#define RCHF16M_TRIM (LDT_CHECK(RCHF16M_LDT_TRIM, 0x40) & 0x7FU)
|
||||||
|
#define RCHF24M_TRIM (LDT_CHECK(RCHF24M_LDT_TRIM, 0x40) & 0x7FU)
|
||||||
|
|
||||||
|
/* Default Clock Frequency Values --------------------------------------------*/
|
||||||
|
|
||||||
|
#define XTHF_DEFAULT_VALUE ((uint32_t)8000000U) /*!< Default value of XTHF in Hz */
|
||||||
|
#define XTLF_DEFAULT_VALUE ((uint32_t)32768U) /*!< Default value of XTLF in Hz */
|
||||||
|
|
||||||
|
/* Default system core clock value */
|
||||||
|
#define HCLK_DEFAULT_VALUE ((uint32_t)8000000U)
|
||||||
|
|
||||||
|
/* Exported Clock Frequency Variables --------------------------------------- */
|
||||||
|
/*
|
||||||
|
- [SystemCoreClock] holds the value of CPU operation clock freqency, and is initialized
|
||||||
|
to HCLK_DEFAULT_VALUE;
|
||||||
|
- [XTLFClock] holds the value of external low-frequency oscillator(XTLF),
|
||||||
|
and is initialized to XTLF_DEFAULT_VALUE;
|
||||||
|
- [XTHFClock] holds the value of external high_frequency oscillator(XTHF),
|
||||||
|
and is initialized to XTHF_DEFAULT_VALUE;
|
||||||
|
|
||||||
|
NOTE: If users are using these two external oscillators, they should modify the
|
||||||
|
value of XTLFClock and XTHFClock to the correct value, and call the SystemCoreClockUpdate()
|
||||||
|
to update the SystemCoreClock variable, otherwise those codes which rely on
|
||||||
|
the SystemCoreClock variable will fail to run.
|
||||||
|
*/
|
||||||
|
extern uint32_t XTLFClock; /*!< External Low-freq Osc Clock Frequency (XTLF) */
|
||||||
|
extern uint32_t XTHFClock; /*!< External High-freq Osc Clock Frequency (XTHF) */
|
||||||
|
extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the system
|
|
||||||
*
|
|
||||||
* @param none
|
|
||||||
* @return none
|
|
||||||
*
|
|
||||||
* @brief Setup the microcontroller system.
|
* @brief Setup the microcontroller system.
|
||||||
* Initialize the System and update the SystemCoreClock variable.
|
* Initialize the System.
|
||||||
*/
|
*/
|
||||||
void SystemInit(void);
|
void SystemInit(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update SystemCoreClock variable
|
|
||||||
*
|
|
||||||
* @param none
|
|
||||||
* @return none
|
|
||||||
*
|
|
||||||
* @brief Updates the SystemCoreClock with current core Clock
|
* @brief Updates the SystemCoreClock with current core Clock
|
||||||
* retrieved from cpu registers.
|
* retrieved from cpu registers.
|
||||||
*/
|
*/
|
||||||
extern uint32_t SystemCoreClock;
|
|
||||||
void SystemCoreClockUpdate(void);
|
void SystemCoreClockUpdate(void);
|
||||||
/**
|
|
||||||
* @brief NVIC_Init config NVIC
|
|
||||||
*
|
|
||||||
* @param NVIC_configStruct configParams
|
|
||||||
*
|
|
||||||
* @param IRQn Interrupt number
|
|
||||||
*
|
|
||||||
* @retval None
|
|
||||||
*/
|
|
||||||
void NVIC_Init(NVIC_ConfigTypeDef *NVIC_configStruct,IRQn_Type IRQn);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
* @file system_fm33lc0xx.c
|
* @file system_fm33lc0xx.c
|
||||||
* @brief CMSIS Cortex-M0 Device Peripheral Access Layer Source File for
|
* @brief CMSIS Cortex-M0 Device Peripheral Access Layer Source File for
|
||||||
* Device FM33LC0XX
|
* Device FM33LC0XX
|
||||||
* @version V2.00
|
* @version V2.0.0
|
||||||
* @date 15. March 2021
|
* @date 15. Mar 2021
|
||||||
*
|
*
|
||||||
* @note
|
* @note
|
||||||
*
|
*
|
||||||
@@ -35,48 +35,38 @@
|
|||||||
POSSIBILITY OF SUCH DAMAGE.
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
---------------------------------------------------------------------------*/
|
---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
#include "system_fm33lc0xx.h"
|
#include "system_fm33lc0xx.h"
|
||||||
/*----------------------------------------------------------------------------
|
|
||||||
DEFINES
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
/* Clock Variable definitions ------------------------------------------------*/
|
||||||
Define clocks
|
uint32_t XTLFClock = XTLF_DEFAULT_VALUE; /*!< External Low-freq Osc Clock Frequency (XTLF) */
|
||||||
*----------------------------------------------------------------------------*/
|
uint32_t XTHFClock = XTHF_DEFAULT_VALUE; /*!< External High-freq Osc Clock Frequency (XTHF) */
|
||||||
/* ToDo: add here your necessary defines for device initialization
|
uint32_t SystemCoreClock = HCLK_DEFAULT_VALUE; /*!< System Clock Frequency (Core Clock) */
|
||||||
following is an example for different system frequencies */
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
/* Clock functions -----------------------------------------------------------*/
|
||||||
Clock Variable definitions
|
/**
|
||||||
*----------------------------------------------------------------------------*/
|
* @brief Retrieve the PLL clock frequency
|
||||||
/* ToDo: initialize SystemCoreClock with the system core clock frequency value
|
*
|
||||||
achieved after system intitialization.
|
* @retval PLL clock frequency
|
||||||
This means system core clock frequency after call to SystemInit() */
|
*/
|
||||||
uint32_t SystemCoreClock = __SYSTEM_CLOCK; /*!< System Clock Frequency (Core Clock)*/
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
|
||||||
Clock functions
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
static uint32_t SystemPLLClockUpdate(void)
|
static uint32_t SystemPLLClockUpdate(void)
|
||||||
{
|
{
|
||||||
uint32_t clock = 0;
|
uint32_t clock = 0;
|
||||||
|
|
||||||
// 时钟源
|
/* Acquire PLL clock source */
|
||||||
switch ((RCC->PLLCR >> 1) & 0x1)
|
switch ((RCC->PLLCR >> 1) & 0x1)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
switch ((RCC->RCHFCR >> 16) & 0xf)
|
switch ((RCC->RCHFCR >> 16) & 0xFU)
|
||||||
{
|
{
|
||||||
case 1: // 16M
|
case 1: /* 16MHz */
|
||||||
clock = 16000000;
|
clock = 16000000;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // 24M
|
case 2: /* 24MHz */
|
||||||
clock = 24000000;
|
clock = 24000000;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0: // 8M
|
case 0: /* 8MHz */
|
||||||
default:
|
default:
|
||||||
clock = 8000000;
|
clock = 8000000;
|
||||||
break;
|
break;
|
||||||
@@ -84,50 +74,50 @@ static uint32_t SystemPLLClockUpdate(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
clock = XTHF_VALUE;
|
clock = XTHFClock;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 分频
|
/* Acquire PLL prescaler */
|
||||||
switch ((RCC->PLLCR >> 0x4) & 0x7)
|
switch ((RCC->PLLCR >> 0x4) & 0x7)
|
||||||
{
|
{
|
||||||
case 0: // 不分频
|
case 0: /* input divided by 1 */
|
||||||
clock /= 1;
|
clock /= 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: // 2分频
|
case 1: /* input divided by 2 */
|
||||||
clock /= 2;
|
clock /= 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // 4分频
|
case 2: /* input divided by 4 */
|
||||||
clock /= 4;
|
clock /= 4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3: // 8分频
|
case 3: /* input divided by 8 */
|
||||||
clock /= 8;
|
clock /= 8;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4: // 12分频
|
case 4: /* input divided by 12 */
|
||||||
clock /= 12;
|
clock /= 12;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5: // 16分频
|
case 5: /* input divided by 16 */
|
||||||
clock /= 16;
|
clock /= 16;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6: // 24分频
|
case 6: /* input divided by 24 */
|
||||||
clock /= 24;
|
clock /= 24;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7: // 32分频
|
case 7: /* input divided by 32 */
|
||||||
clock /= 32;
|
clock /= 32;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 倍频比
|
/* Acquire PLL multiplier and calculate PLL frequency */
|
||||||
clock = clock * (((RCC->PLLCR >> 16) & 0x7f) + 1);
|
clock = clock * (((RCC->PLLCR >> 16) & 0x7F) + 1);
|
||||||
|
|
||||||
// 输出选择
|
/* Acquire PLL output channel(PLLx1 or PLLx2) */
|
||||||
if ((RCC->PLLCR >> 3) & 0x1)
|
if ((RCC->PLLCR >> 3) & 0x1)
|
||||||
{
|
{
|
||||||
clock *= 2;
|
clock *= 2;
|
||||||
@@ -136,52 +126,63 @@ static uint32_t SystemPLLClockUpdate(void)
|
|||||||
return clock;
|
return clock;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SystemCoreClockUpdate (void) /* Get Core Clock Frequency */
|
/**
|
||||||
|
* @brief Update the core clock frequency variable: SystemCoreClock
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void SystemCoreClockUpdate(void)
|
||||||
{
|
{
|
||||||
switch ((RCC->SYSCLKCR >> 0) & 0x7)
|
switch ((RCC->SYSCLKCR >> 0) & 0x7)
|
||||||
{
|
{
|
||||||
case 1: // XTHF
|
case 1: /* XTHF */
|
||||||
SystemCoreClock = XTHF_VALUE;
|
SystemCoreClock = XTHFClock;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // PLL
|
case 2: /* PLL */
|
||||||
SystemCoreClock = SystemPLLClockUpdate();
|
SystemCoreClock = SystemPLLClockUpdate();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4: // RCMF
|
case 4: /* RCMF */
|
||||||
switch ((RCC->RCMFCR >> 16) & 0x3)
|
switch ((RCC->RCMFCR >> 16) & 0x3)
|
||||||
{
|
{
|
||||||
case 0: // 不分频
|
case 0: /* output divided by 1 */
|
||||||
SystemCoreClock = 4000000;
|
SystemCoreClock = 4000000;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: // 4分频
|
case 1: /* output divided by 4 */
|
||||||
SystemCoreClock = 1000000;
|
SystemCoreClock = 1000000;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // 8分频
|
case 2: /* output divided by 8 */
|
||||||
SystemCoreClock = 500000;
|
SystemCoreClock = 500000;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3: // 16分频
|
case 3: /* output divided by 16 */
|
||||||
SystemCoreClock = 250000;
|
SystemCoreClock = 250000;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5: // LSCLK
|
case 5: /* LSCLK */
|
||||||
case 6: // LPOSC
|
#ifdef USE_LSCLK_CLOCK_SRC_LPOSC
|
||||||
SystemCoreClock = 32768;
|
SystemCoreClock = 32000;
|
||||||
|
#else
|
||||||
|
SystemCoreClock = XTLFClock;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7: // USBBCK
|
case 6: /* LPOSC */
|
||||||
|
SystemCoreClock = 32000;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 7: /* USBBCK */
|
||||||
switch ((RCC->SYSCLKCR >> 3) & 0x1)
|
switch ((RCC->SYSCLKCR >> 3) & 0x1)
|
||||||
{
|
{
|
||||||
case 0: // USBBCK 48M
|
case 0: /* USBBCK 48MHz */
|
||||||
SystemCoreClock = 48000000;
|
SystemCoreClock = 48000000;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: // USBBCK 120M 2分频
|
case 1: /* USBBCK 120MHz/2 */
|
||||||
SystemCoreClock = 60000000;
|
SystemCoreClock = 60000000;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -190,15 +191,15 @@ void SystemCoreClockUpdate (void) /* Get Core Clock Frequency */
|
|||||||
default:
|
default:
|
||||||
switch ((RCC->RCHFCR >> 16) & 0xf)
|
switch ((RCC->RCHFCR >> 16) & 0xf)
|
||||||
{
|
{
|
||||||
case 1: // 16M
|
case 1: /* 16MHz */
|
||||||
SystemCoreClock = 16000000;
|
SystemCoreClock = 16000000;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // 24M
|
case 2: /* 24MHz */
|
||||||
SystemCoreClock = 24000000;
|
SystemCoreClock = 24000000;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0: // 8M
|
case 0: /* 8MHz */
|
||||||
default:
|
default:
|
||||||
SystemCoreClock = 8000000;
|
SystemCoreClock = 8000000;
|
||||||
break;
|
break;
|
||||||
@@ -208,78 +209,93 @@ void SystemCoreClockUpdate (void) /* Get Core Clock Frequency */
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief NVIC_Init config NVIC
|
|
||||||
*
|
|
||||||
* @param NVIC_configStruct configParams
|
|
||||||
*
|
|
||||||
* @param IRQn Interrupt number
|
|
||||||
*
|
|
||||||
* @retval None
|
|
||||||
*/
|
|
||||||
void NVIC_Init(NVIC_ConfigTypeDef *NVIC_configStruct,IRQn_Type IRQn)
|
|
||||||
{
|
|
||||||
/* Params Check */
|
|
||||||
if(NVIC_configStruct->preemptPriority>3)
|
|
||||||
{
|
|
||||||
NVIC_configStruct->preemptPriority = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
NVIC_DisableIRQ(IRQn);
|
|
||||||
NVIC_SetPriority(IRQn,NVIC_configStruct->preemptPriority);
|
|
||||||
NVIC_EnableIRQ(IRQn);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize the system
|
|
||||||
*
|
|
||||||
* @param none
|
|
||||||
* @return none
|
|
||||||
*
|
|
||||||
* @brief Setup the microcontroller system.
|
* @brief Setup the microcontroller system.
|
||||||
* Initialize the System.
|
* Initialize the System.
|
||||||
*/
|
*/
|
||||||
void SystemInit(void)
|
void SystemInit(void)
|
||||||
{
|
{
|
||||||
|
#if !defined(MFANG) && defined(USE_LSCLK_CLOCK_SRC_XTLF)
|
||||||
uint32_t temp;
|
uint32_t temp;
|
||||||
|
|
||||||
/* */
|
|
||||||
RCC->PLLCR = (uint32_t)0x00000000U;
|
|
||||||
RCC->SYSCLKCR = (uint32_t)0x0A000000U;
|
|
||||||
/* PAD RCC*/
|
|
||||||
RCC->PCLKCR1 |= (0x1U << 7U);
|
|
||||||
#ifdef USE_LSCLK_CLOCK_SRC_XTLF
|
|
||||||
GPIOD->FCR |= 0x3C0000;
|
|
||||||
/* XTLF*/
|
|
||||||
RCC->XTLFCR = (uint32_t)(0x00000000U);
|
|
||||||
/* XTLF*/
|
|
||||||
RCC->XTLFCR |= (uint32_t)(0x00000005U<<8);
|
|
||||||
for(temp = 2000;temp>0;temp--);
|
|
||||||
/* LSCLKXTLF*/
|
|
||||||
RCC->LSCLKSEL = 0xAA;
|
|
||||||
/* LSCXTLF*/
|
|
||||||
RCC->SYSCLKCR |= 0x8000000U;
|
|
||||||
#else
|
|
||||||
RCC->SYSCLKCR &= 0x7FFFFFFU;
|
|
||||||
RCC->LSCLKSEL = 0x55;
|
|
||||||
#endif
|
#endif
|
||||||
/*PDR*/
|
|
||||||
RMU->PDRCR |=0x01;
|
|
||||||
/*BOR*/
|
|
||||||
RMU->BORCR &=0xFE;
|
|
||||||
|
|
||||||
/* DEBUG IWDT WWDT */
|
#if defined(USE_IWDT_ON_STARTUP)
|
||||||
DBG->CR =0x03;
|
RCC->PCLKCR1 |= 0x20U; /* Enable IWDT Operation Clock */
|
||||||
|
IWDT->CR = IWDT_OVERFLOW_PERIOD; /* Configure IWDT overflow period */
|
||||||
|
IWDT->SERV = 0x12345A5AU; /* Enable IWDT */
|
||||||
|
#endif
|
||||||
|
|
||||||
RCC->RCHFTR = RCHF24M_TRIM;
|
/* Reset PLL & SYSCLK selection */
|
||||||
|
RCC->PLLCR = 0x00000000U;
|
||||||
|
RCC->SYSCLKCR = 0x0A000000U;
|
||||||
|
|
||||||
|
/* Enable PAD Operation Clock */
|
||||||
|
RCC->PCLKCR1 |= (0x1U << 7);
|
||||||
|
|
||||||
|
#ifndef MFANG /* MFANG handles clock configurations by itself */
|
||||||
|
#ifdef USE_LSCLK_CLOCK_SRC_XTLF
|
||||||
|
|
||||||
|
/* XTLF IO configuration */
|
||||||
|
GPIOD->FCR |= 0x003C0000U;
|
||||||
|
|
||||||
|
/* Enable XTLF */
|
||||||
|
RCC->XTLFCR = 0x00000000U;
|
||||||
|
RCC->XTLFCR |= (uint32_t)(0x5U << 8);
|
||||||
|
for(temp = 2000U; temp > 0U; temp--);
|
||||||
|
|
||||||
|
#ifdef USE_LSCLK_AUTO_SWITCH
|
||||||
|
|
||||||
|
/* Enable LSCLK auto switch */
|
||||||
|
RCC->SYSCLKCR |= 0x8000000U;
|
||||||
|
|
||||||
|
/* LSCLK from XTLF */
|
||||||
|
RCC->LSCLKSEL = 0xAAU;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
/* Disable LSCLK auto switch */
|
||||||
|
CMU->SYSCLKCR &= 0x7FFFFFFU;
|
||||||
|
|
||||||
|
/* LSCLK from XTLF */
|
||||||
|
CMU->LSCLKSEL = 0xAAU;
|
||||||
|
|
||||||
|
#endif /* USE_LSCLK_AUTO_SWITCH */
|
||||||
|
#else
|
||||||
|
|
||||||
|
/* Disable LSCLK auto switch */
|
||||||
|
RCC->SYSCLKCR &= 0x7FFFFFFU;
|
||||||
|
|
||||||
|
/* LSCLK from LPOSC */
|
||||||
|
RCC->LSCLKSEL = 0x55U;
|
||||||
|
|
||||||
|
#endif /* USE_LSCLK_CLOCK_SRC_XTLF */
|
||||||
|
#endif /* MFANG */
|
||||||
|
|
||||||
|
/* PDR & BOR Configuration */
|
||||||
|
RMU->PDRCR = 0x1U;
|
||||||
|
RMU->BORCR = 0xEU;
|
||||||
|
|
||||||
|
/* Disable IWDT & WWDT, enable other peripherals(e.g. timers) under Debug Mode */
|
||||||
|
DBG->CR = 0x3U;
|
||||||
|
|
||||||
|
/* Load clock trim value */
|
||||||
|
RCC->RCHFTR = RCHF8M_TRIM;
|
||||||
RCC->RCMFTR = RCMF4M_TRIM;
|
RCC->RCMFTR = RCMF4M_TRIM;
|
||||||
RCC->LPOSCTR = LPOSC_TRIM;
|
RCC->LPOSCTR = LPOSC_TRIM;
|
||||||
|
|
||||||
GPIOD->PUEN |= 0x3 << 7;
|
/* Enable SWD port pull up */
|
||||||
|
GPIOD->PUEN |= (0x3U << 7U);
|
||||||
|
|
||||||
/* DMA Flash Channel: Flash->RAM */
|
/* DMA Flash Channel: Flash->RAM */
|
||||||
RCC->PCLKCR2 |= 0x1 << 4;
|
RCC->PCLKCR2 |= (0x1U << 4U);
|
||||||
DMA->CH7CR |= 0x1 << 10;
|
DMA->CH7CR |= (0x1U << 10U);
|
||||||
RCC->PCLKCR2 &= ~(0x1 << 4);
|
RCC->PCLKCR2 &= ~(0x1U << 4U);
|
||||||
|
|
||||||
|
/* Update System Core Clock */
|
||||||
|
SystemCoreClockUpdate();
|
||||||
|
|
||||||
|
#if defined(USE_IWDT_ON_STARTUP)
|
||||||
|
IWDT->SERV = 0x12345A5AU; /* Feed IWDT */
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
****************************************************************************************************
|
||||||
|
* @file fm33_assert.h
|
||||||
|
* @author FMSH Application Team
|
||||||
|
* @brief Assert function define
|
||||||
|
****************************************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) [2019] [Fudan Microelectronics]
|
||||||
|
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
||||||
|
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
||||||
|
* You may obtain a copy of Mulan PSL v1 at:
|
||||||
|
* http://license.coscl.org.cn/MulanPSL
|
||||||
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
||||||
|
* PURPOSE.
|
||||||
|
* See the Mulan PSL v1 for more details.
|
||||||
|
*
|
||||||
|
****************************************************************************************************
|
||||||
|
*/
|
||||||
|
#ifndef __FM33_ASSERT_H
|
||||||
|
#define __FM33_ASSERT_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_FULL_ASSERT
|
||||||
|
#define assert_param(expr) do{if((expr) == 0)for(;;);}while(0)
|
||||||
|
#else
|
||||||
|
#define assert_param(expr) ((void)0U)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
@@ -6,20 +6,20 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------------------------------*/
|
/* Define to prevent recursive inclusion --------------------------------------------------------------*/
|
||||||
#ifndef __FM33LC0XX_FL_H
|
#ifndef __FM33LC0XX_FL_H
|
||||||
#define __FM33LC0XX_FL_H
|
#define __FM33LC0XX_FL_H
|
||||||
|
|
||||||
@@ -27,64 +27,12 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Select FM33LC0XX Device
|
|
||||||
*/
|
|
||||||
#if !defined (FM33LC0XX)
|
|
||||||
#define FM33LC0XX
|
|
||||||
#endif /* FM33LC0XX */
|
|
||||||
|
|
||||||
/* Defines -------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief List of drivers to be used.
|
|
||||||
*
|
|
||||||
* @note Uncomment following lines to disable specified driver.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MFANG
|
|
||||||
|
|
||||||
#define FL_ADC_DRIVER_ENABLED
|
|
||||||
#define FL_AES_DRIVER_ENABLED
|
|
||||||
#define FL_ATIM_DRIVER_ENABLED
|
|
||||||
#define FL_BSTIM32_DRIVER_ENABLED
|
|
||||||
#define FL_COMP_DRIVER_ENABLED
|
|
||||||
#define FL_CRC_DRIVER_ENABLED
|
|
||||||
#define FL_DIVAS_DRIVER_ENABLED
|
|
||||||
#define FL_DMA_DRIVER_ENABLED
|
|
||||||
#define FL_EXTI_DRIVER_ENABLED
|
|
||||||
#define FL_FLASH_DRIVER_ENABLED
|
|
||||||
#define FL_GPIO_DRIVER_ENABLED
|
|
||||||
#define FL_GPTIM_DRIVER_ENABLED
|
|
||||||
#define FL_I2C_DRIVER_ENABLED
|
|
||||||
#define FL_IWDT_DRIVER_ENABLED
|
|
||||||
#define FL_LCD_DRIVER_ENABLED
|
|
||||||
#define FL_LPTIM32_DRIVER_ENABLED
|
|
||||||
#define FL_LPUART_DRIVER_ENABLED
|
|
||||||
#define FL_OPA_DRIVER_ENABLED
|
|
||||||
#define FL_PMU_DRIVER_ENABLED
|
|
||||||
#define FL_RCC_DRIVER_ENABLED
|
|
||||||
#define FL_RMU_DRIVER_ENABLED
|
|
||||||
#define FL_RNG_DRIVER_ENABLED
|
|
||||||
#define FL_RTC_DRIVER_ENABLED
|
|
||||||
#define FL_SPI_DRIVER_ENABLED
|
|
||||||
#define FL_SVD_DRIVER_ENABLED
|
|
||||||
#define FL_U7816_DRIVER_ENABLED
|
|
||||||
#define FL_UART_DRIVER_ENABLED
|
|
||||||
#define FL_VREF_DRIVER_ENABLED
|
|
||||||
#define FL_WWDT_DRIVER_ENABLED
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33xx.h"
|
#include "fm33lc0xx_fl_conf.h"
|
||||||
#include "fm33_assert.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
/* Macros ---------------------------------------------------------------------------------------------*/
|
/* Macros ---------------------------------------------------------------------------------------------*/
|
||||||
/** @defgroup FL_Private_Macros FL Driver Library Private Macros
|
/** @defgroup FL_Exported_Macros FL Driver Library Exported Macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -92,7 +40,7 @@ extern "C" {
|
|||||||
* @brief FM33LC0xx FL Driver Library version number
|
* @brief FM33LC0xx FL Driver Library version number
|
||||||
*/
|
*/
|
||||||
#define __FM33LC0xx_FL_VERSION_MAIN (0x02) /*!< [31:24] main version */
|
#define __FM33LC0xx_FL_VERSION_MAIN (0x02) /*!< [31:24] main version */
|
||||||
#define __FM33LC0xx_FL_VERSION_SUB1 (0x01) /*!< [23:16] sub1 version */
|
#define __FM33LC0xx_FL_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */
|
||||||
#define __FM33LC0xx_FL_VERSION_SUB2 (0x01) /*!< [15:0] sub2 version */
|
#define __FM33LC0xx_FL_VERSION_SUB2 (0x01) /*!< [15:0] sub2 version */
|
||||||
#define __FM33LC0xx_FL_VERSION ((__FM33LC0xx_FL_VERSION_MAIN << 24)\
|
#define __FM33LC0xx_FL_VERSION ((__FM33LC0xx_FL_VERSION_MAIN << 24)\
|
||||||
|(__FM33LC0xx_FL_VERSION_SUB1 << 16)\
|
|(__FM33LC0xx_FL_VERSION_SUB1 << 16)\
|
||||||
@@ -108,44 +56,39 @@ extern "C" {
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Types ----------------------------------------------------------------------------------------------*/
|
/* Struct Defines -------------------------------------------------------------------------------------*/
|
||||||
/** @defgroup FL_ET_Return FL Exported Return Type Defines
|
/** @defgroup FL_ET_NVIC FL Driver Library NVIC Init Sturcture Defines
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef enum
|
typedef struct
|
||||||
{
|
{
|
||||||
FL_RESET = 0U,
|
/** 中断抢占优先级 */
|
||||||
FL_SET = !FL_RESET
|
uint32_t preemptPriority;
|
||||||
} FL_FlagStatus, FL_ITStatus;
|
|
||||||
|
|
||||||
typedef enum
|
} FL_NVIC_ConfigTypeDef;
|
||||||
{
|
|
||||||
FL_DISABLE = 0U,
|
|
||||||
FL_ENABLE = !FL_DISABLE
|
|
||||||
} FL_FunState;
|
|
||||||
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == FL_DISABLE) || ((STATE) == FL_ENABLE))
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
FL_FAIL = 0U,
|
|
||||||
FL_PASS = !FL_FAIL
|
|
||||||
} FL_ErrorStatus;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported Functions ---------------------------------------------------------------------------------*/
|
/* Exported Functions ---------------------------------------------------------------------------------*/
|
||||||
/** @defgroup FL_EF_DELAY Exported FL Driver Library Delay Support Functions
|
/** @defgroup FL_EF_DELAY FL Driver Library Exported Delay Support Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
void FL_DelayInit(void);
|
||||||
|
void FL_DelayUs(uint32_t count);
|
||||||
|
void FL_DelayMs(uint32_t count);
|
||||||
|
void FL_DelayUsStart(uint32_t count);
|
||||||
|
void FL_DelayMsStart(uint32_t count);
|
||||||
|
bool FL_DelayEnd(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup FL_EF_INIT Exported FL Driver Library Init Functions
|
/** @defgroup FL_EF_INIT FL Driver Library Exported Init Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -155,130 +98,15 @@ void FL_Init(void);
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Post Includes --------------------------------------------------------------------------------------*/
|
/** @defgroup FL_EF_NVIC FL Driver Library Exported NVIC Configuration Functions
|
||||||
/**
|
* @{
|
||||||
* @brief Include peripheral's header file
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(USE_FULL_ASSERT)
|
void FL_NVIC_Init(FL_NVIC_ConfigTypeDef *configStruct, IRQn_Type irq);
|
||||||
#include "fm33_assert.h"
|
|
||||||
#endif /* USE_FULL_ASSERT */
|
|
||||||
|
|
||||||
#if defined(FL_ADC_DRIVER_ENABLED)
|
/**
|
||||||
#include "fm33lc0xx_fl_adc.h"
|
* @}
|
||||||
#endif /* FL_ADC_DRIVER_ENABLED */
|
*/
|
||||||
|
|
||||||
#if defined(FL_AES_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_aes.h"
|
|
||||||
#endif /* FL_AES_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_ATIM_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_atim.h"
|
|
||||||
#endif /* FL_ATIM_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_BSTIM32_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_bstim32.h"
|
|
||||||
#endif /* FL_BSTIM32_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_COMP_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_comp.h"
|
|
||||||
#endif /* FL_COMP_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_CRC_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_crc.h"
|
|
||||||
#endif /* FL_CRC_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_DIVAS_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_divas.h"
|
|
||||||
#endif /* FL_DIVAS_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_DMA_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_dma.h"
|
|
||||||
#endif /* FL_DMA_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_EXTI_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_exti.h"
|
|
||||||
#endif /* FL_EXTI_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_FLASH_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_flash.h"
|
|
||||||
#endif /* FL_FLASH_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_GPIO_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_gpio.h"
|
|
||||||
#endif /* FL_GPIO_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_GPTIM_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_gptim.h"
|
|
||||||
#endif /* FL_GPTIM_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_I2C_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_i2c.h"
|
|
||||||
#endif /* FL_I2C_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_IWDT_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_iwdt.h"
|
|
||||||
#endif /* FL_IWDT_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_LCD_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_lcd.h"
|
|
||||||
#endif /* FL_LCD_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_LPTIM32_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_lptim32.h"
|
|
||||||
#endif /* FL_LPTIM32_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_LPUART_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_lpuart.h"
|
|
||||||
#endif /* FL_LPUART_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_OPA_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_opa.h"
|
|
||||||
#endif /* FL_OPA_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_PMU_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_pmu.h"
|
|
||||||
#endif /* FL_PMU_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_RCC_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_rcc.h"
|
|
||||||
#endif /* FL_RCC_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_RMU_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_rmu.h"
|
|
||||||
#endif /* FL_RMU_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_RNG_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_rng.h"
|
|
||||||
#endif /* FL_RNG_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_RTC_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_rtc.h"
|
|
||||||
#endif /* FL_RTC_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_SPI_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_spi.h"
|
|
||||||
#endif /* FL_SPI_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_SVD_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_svd.h"
|
|
||||||
#endif /* FL_SVD_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_U7816_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_u7816.h"
|
|
||||||
#endif /* FL_U7816_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_UART_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_uart.h"
|
|
||||||
#endif /* FL_UART_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_VREF_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_vref.h"
|
|
||||||
#endif /* FL_VREF_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#if defined(FL_WWDT_DRIVER_ENABLED)
|
|
||||||
#include "fm33lc0xx_fl_wwdt.h"
|
|
||||||
#endif /* FL_WWDT_DRIVER_ENABLED */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
@@ -286,4 +114,4 @@ void FL_Init(void);
|
|||||||
|
|
||||||
#endif /* __FM33LC0XX_FL_H */
|
#endif /* __FM33LC0XX_FL_H */
|
||||||
|
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -271,6 +271,7 @@ typedef struct
|
|||||||
#define FL_ADC_INTERNAL_VREF1P2 (0x1U << 17U)
|
#define FL_ADC_INTERNAL_VREF1P2 (0x1U << 17U)
|
||||||
#define FL_ADC_INTERNAL_OPA1 (0x1U << 18U)
|
#define FL_ADC_INTERNAL_OPA1 (0x1U << 18U)
|
||||||
#define FL_ADC_INTERNAL_OPA2 (0x1U << 19U)
|
#define FL_ADC_INTERNAL_OPA2 (0x1U << 19U)
|
||||||
|
#define FL_ADC_ALL_CHANNEL (0xfffffU << 0U)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1488,6 +1489,7 @@ __STATIC_INLINE uint32_t FL_ADC_GetSamplingInterval(ADC_Type *ADCx)
|
|||||||
* @arg @ref FL_ADC_INTERNAL_VREF1P2
|
* @arg @ref FL_ADC_INTERNAL_VREF1P2
|
||||||
* @arg @ref FL_ADC_INTERNAL_OPA1
|
* @arg @ref FL_ADC_INTERNAL_OPA1
|
||||||
* @arg @ref FL_ADC_INTERNAL_OPA2
|
* @arg @ref FL_ADC_INTERNAL_OPA2
|
||||||
|
* @arg @ref FL_ADC_ALL_CHANNEL
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void FL_ADC_EnableSequencerChannel(ADC_Type *ADCx, uint32_t channel)
|
__STATIC_INLINE void FL_ADC_EnableSequencerChannel(ADC_Type *ADCx, uint32_t channel)
|
||||||
@@ -1516,6 +1518,7 @@ __STATIC_INLINE void FL_ADC_EnableSequencerChannel(ADC_Type *ADCx, uint32_t chan
|
|||||||
* @arg @ref FL_ADC_INTERNAL_VREF1P2
|
* @arg @ref FL_ADC_INTERNAL_VREF1P2
|
||||||
* @arg @ref FL_ADC_INTERNAL_OPA1
|
* @arg @ref FL_ADC_INTERNAL_OPA1
|
||||||
* @arg @ref FL_ADC_INTERNAL_OPA2
|
* @arg @ref FL_ADC_INTERNAL_OPA2
|
||||||
|
* @arg @ref FL_ADC_ALL_CHANNEL
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
__STATIC_INLINE void FL_ADC_DisableSequencerChannel(ADC_Type *ADCx, uint32_t channel)
|
__STATIC_INLINE void FL_ADC_DisableSequencerChannel(ADC_Type *ADCx, uint32_t channel)
|
||||||
@@ -1616,14 +1619,14 @@ __STATIC_INLINE void FL_ADC_WriteAnalogWDGHighThreshold(ADC_Type *ADCx, uint32_t
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE uint32_t FL_ADC_ReadAnalogWDGHighThreshold(ADC_Type *ADCx)
|
__STATIC_INLINE uint32_t FL_ADC_ReadAnalogWDGHighThreshold(ADC_Type *ADCx)
|
||||||
{
|
{
|
||||||
return (uint32_t)(READ_BIT(ADCx->HLTR, 0xfffU) >> 16U);
|
return (uint32_t)(READ_BIT(ADCx->HLTR, (0xfffU << 16U)) >> 16U);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @defgroup ADC_FL_EF_Init Initialization and de-initialization functions
|
/** @defgroup ADC_FL_EF_Init ADC Initialization and de-initialization Functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
FL_ErrorStatus FL_ADC_CommonDeInit(void);
|
FL_ErrorStatus FL_ADC_CommonDeInit(void);
|
||||||
@@ -1652,4 +1655,4 @@ FL_ErrorStatus FL_ADC_CommonInit(FL_ADC_CommonInitTypeDef *ADC_CommonInitStruct)
|
|||||||
#endif /* __FM33LC0XX_FL_ADC_H*/
|
#endif /* __FM33LC0XX_FL_ADC_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -698,4 +698,4 @@ FL_ErrorStatus FL_AES_Init(AES_Type *AESx, FL_AES_InitTypeDef *AES_InitStructer)
|
|||||||
#endif /* __FM33LC0XX_FL_AES_H*/
|
#endif /* __FM33LC0XX_FL_AES_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -3787,4 +3787,4 @@ FL_ErrorStatus FL_ATIM_BDTR_Init(ATIM_Type *TIMx, FL_ATIM_BDTR_InitTypeDef *TIM_
|
|||||||
#endif /* __FM33LC0XX_FL_ATIM_H*/
|
#endif /* __FM33LC0XX_FL_ATIM_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.1 @ 2020-09-12*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.1 @ 2020-09-12*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -480,4 +480,4 @@ void FL_BSTIM32_StructInit(FL_BSTIM32_InitTypeDef *initStruct);
|
|||||||
#endif /* __FM33LC0XX_FL_BSTIM32_H*/
|
#endif /* __FM33LC0XX_FL_BSTIM32_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -64,7 +64,7 @@ typedef struct
|
|||||||
uint32_t digitalFilter;
|
uint32_t digitalFilter;
|
||||||
|
|
||||||
/** 数字滤波器长度 */
|
/** 数字滤波器长度 */
|
||||||
uint32_t digitalFilterLen; //此芯片不可设
|
uint32_t digitalFilterLen; /* 此芯片不可设 */
|
||||||
|
|
||||||
} FL_COMP_InitTypeDef;
|
} FL_COMP_InitTypeDef;
|
||||||
|
|
||||||
@@ -569,4 +569,4 @@ FL_ErrorStatus FL_COMP_Init(COMP_Type *COMPx, FL_COMP_InitTypeDef *initStruct);
|
|||||||
#endif /* __FM33LC0XX_FL_COMP_H*/
|
#endif /* __FM33LC0XX_FL_COMP_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.1 @ 2020-09-22*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.1 @ 2020-09-22*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -0,0 +1,195 @@
|
|||||||
|
/**
|
||||||
|
*******************************************************************************************************
|
||||||
|
* @file fm33lc0xx_fl_conf.h
|
||||||
|
* @author FMSH Application Team
|
||||||
|
* @brief Header file of FL Driver Library Configurations
|
||||||
|
*******************************************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the Mulan PSL v2 for more details.
|
||||||
|
*
|
||||||
|
*******************************************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Define to prevent recursive inclusion --------------------------------------------------------------*/
|
||||||
|
#ifndef __FM33LC0XX_FL_CONF_H
|
||||||
|
#define __FM33LC0XX_FL_CONF_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Defines --------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief List of drivers to be used.
|
||||||
|
*
|
||||||
|
* @note Uncomment following lines to disable specified driver.
|
||||||
|
*/
|
||||||
|
#define FL_ADC_DRIVER_ENABLED
|
||||||
|
#define FL_AES_DRIVER_ENABLED
|
||||||
|
#define FL_ATIM_DRIVER_ENABLED
|
||||||
|
#define FL_BSTIM32_DRIVER_ENABLED
|
||||||
|
#define FL_COMP_DRIVER_ENABLED
|
||||||
|
#define FL_CRC_DRIVER_ENABLED
|
||||||
|
#define FL_DIVAS_DRIVER_ENABLED
|
||||||
|
#define FL_DMA_DRIVER_ENABLED
|
||||||
|
#define FL_EXTI_DRIVER_ENABLED
|
||||||
|
#define FL_FLASH_DRIVER_ENABLED
|
||||||
|
#define FL_GPIO_DRIVER_ENABLED
|
||||||
|
#define FL_GPTIM_DRIVER_ENABLED
|
||||||
|
#define FL_I2C_DRIVER_ENABLED
|
||||||
|
#define FL_IWDT_DRIVER_ENABLED
|
||||||
|
#define FL_LCD_DRIVER_ENABLED
|
||||||
|
#define FL_LPTIM32_DRIVER_ENABLED
|
||||||
|
#define FL_LPUART_DRIVER_ENABLED
|
||||||
|
#define FL_OPA_DRIVER_ENABLED
|
||||||
|
#define FL_PMU_DRIVER_ENABLED
|
||||||
|
#define FL_RCC_DRIVER_ENABLED
|
||||||
|
#define FL_RMU_DRIVER_ENABLED
|
||||||
|
#define FL_RNG_DRIVER_ENABLED
|
||||||
|
#define FL_RTC_DRIVER_ENABLED
|
||||||
|
#define FL_SPI_DRIVER_ENABLED
|
||||||
|
#define FL_SVD_DRIVER_ENABLED
|
||||||
|
#define FL_U7816_DRIVER_ENABLED
|
||||||
|
#define FL_UART_DRIVER_ENABLED
|
||||||
|
#define FL_VREF_DRIVER_ENABLED
|
||||||
|
#define FL_WWDT_DRIVER_ENABLED
|
||||||
|
|
||||||
|
/* Device Includes ------------------------------------------------------------------------------------*/
|
||||||
|
/**
|
||||||
|
* @brief Include peripheral's header file
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(FL_ADC_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_adc.h"
|
||||||
|
#endif /* FL_ADC_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_AES_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_aes.h"
|
||||||
|
#endif /* FL_AES_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_ATIM_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_atim.h"
|
||||||
|
#endif /* FL_ATIM_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_BSTIM32_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_bstim32.h"
|
||||||
|
#endif /* FL_BSTIM32_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_COMP_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_comp.h"
|
||||||
|
#endif /* FL_COMP_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_CRC_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_crc.h"
|
||||||
|
#endif /* FL_CRC_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_DIVAS_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_divas.h"
|
||||||
|
#endif /* FL_DIVAS_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_DMA_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_dma.h"
|
||||||
|
#endif /* FL_DMA_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_EXTI_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_exti.h"
|
||||||
|
#endif /* FL_EXTI_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_FLASH_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_flash.h"
|
||||||
|
#endif /* FL_FLASH_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_GPIO_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_gpio.h"
|
||||||
|
#endif /* FL_GPIO_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_GPTIM_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_gptim.h"
|
||||||
|
#endif /* FL_GPTIM_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_I2C_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_i2c.h"
|
||||||
|
#endif /* FL_I2C_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_IWDT_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_iwdt.h"
|
||||||
|
#endif /* FL_IWDT_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_LCD_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_lcd.h"
|
||||||
|
#endif /* FL_LCD_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_LPTIM32_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_lptim32.h"
|
||||||
|
#endif /* FL_LPTIM32_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_LPUART_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_lpuart.h"
|
||||||
|
#endif /* FL_LPUART_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_OPA_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_opa.h"
|
||||||
|
#endif /* FL_OPA_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_PMU_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_pmu.h"
|
||||||
|
#endif /* FL_PMU_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_RCC_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_rcc.h"
|
||||||
|
#endif /* FL_RCC_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_RMU_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_rmu.h"
|
||||||
|
#endif /* FL_RMU_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_RNG_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_rng.h"
|
||||||
|
#endif /* FL_RNG_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_RTC_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_rtc.h"
|
||||||
|
#endif /* FL_RTC_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_SPI_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_spi.h"
|
||||||
|
#endif /* FL_SPI_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_SVD_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_svd.h"
|
||||||
|
#endif /* FL_SVD_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_U7816_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_u7816.h"
|
||||||
|
#endif /* FL_U7816_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_UART_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_uart.h"
|
||||||
|
#endif /* FL_UART_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_VREF_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_vref.h"
|
||||||
|
#endif /* FL_VREF_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#if defined(FL_WWDT_DRIVER_ENABLED)
|
||||||
|
#include "fm33lc0xx_fl_wwdt.h"
|
||||||
|
#endif /* FL_WWDT_DRIVER_ENABLED */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __FM33LC0XX_FL_CONF_H */
|
||||||
|
|
||||||
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -471,4 +471,4 @@ FL_ErrorStatus FL_CRC_Init(CRC_Type *CRCx, FL_CRC_InitTypeDef *CRC_InitStruct);
|
|||||||
#endif /* __FM33LC0XX_FL_CRC_H*/
|
#endif /* __FM33LC0XX_FL_CRC_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -0,0 +1,92 @@
|
|||||||
|
/**
|
||||||
|
*******************************************************************************************************
|
||||||
|
* @file fm33lc0xx_fl_def.h
|
||||||
|
* @author FMSH Application Team
|
||||||
|
* @brief Header file of FL Driver Library Defines
|
||||||
|
*******************************************************************************************************
|
||||||
|
* @attention
|
||||||
|
*
|
||||||
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the Mulan PSL v2 for more details.
|
||||||
|
*
|
||||||
|
*******************************************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Define to prevent recursive inclusion --------------------------------------------------------------*/
|
||||||
|
#ifndef __FM33LC0XX_FL_DEF_H
|
||||||
|
#define __FM33LC0XX_FL_DEF_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
|
#include "fm33lc0xx.h"
|
||||||
|
#include "fm33_assert.h"
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
/* Macros ---------------------------------------------------------------------------------------------*/
|
||||||
|
/** @defgroup FL_Exported_Macros FL Driver Library Private Macros
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Bit-wise operation macros used by FL driver library functions
|
||||||
|
*/
|
||||||
|
#define SET_BIT(REG, BIT) ((REG) |= (BIT))
|
||||||
|
#define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
|
||||||
|
#define READ_BIT(REG, BIT) ((REG) & (BIT))
|
||||||
|
#define CLEAR_REG(REG) ((REG) = (0x0))
|
||||||
|
#define WRITE_REG(REG, VAL) ((REG) = (VAL))
|
||||||
|
#define READ_REG(REG) ((REG))
|
||||||
|
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Types ----------------------------------------------------------------------------------------------*/
|
||||||
|
/** @defgroup FL_PT_Return FL Driver Library Private Return Type Defines
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
FL_RESET = 0U,
|
||||||
|
FL_SET = !FL_RESET
|
||||||
|
} FL_FlagStatus, FL_ITStatus;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
FL_DISABLE = 0U,
|
||||||
|
FL_ENABLE = !FL_DISABLE
|
||||||
|
} FL_FunState;
|
||||||
|
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == FL_DISABLE) || ((STATE) == FL_ENABLE))
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
FL_FAIL = 0U,
|
||||||
|
FL_PASS = !FL_FAIL
|
||||||
|
} FL_ErrorStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __FM33LC0XX_FL_DEF_H */
|
||||||
|
|
||||||
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -203,4 +203,4 @@ uint32_t FL_DIVAS_Hdiv_Calculation(DIV_Type *DIVx, int32_t DivisorEnd, int16_t D
|
|||||||
#endif /* __FM33LC0XX_FL_DIVAS_H*/
|
#endif /* __FM33LC0XX_FL_DIVAS_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -1284,4 +1284,4 @@ FL_ErrorStatus FL_DMA_StartTransmission(DMA_Type *DMAx, FL_DMA_ConfigTypeDef *co
|
|||||||
#endif /* __FM33LC0XX_FL_DMA_H*/
|
#endif /* __FM33LC0XX_FL_DMA_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.14-0.2 @ 2020-10-20*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.14-0.2 @ 2020-10-20*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,10 +28,16 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** @defgroup EXTI EXTI
|
||||||
|
* @brief EXTI FL driver
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/* Exported types -------------------------------------------------------------------------------------*/
|
/* Exported types -------------------------------------------------------------------------------------*/
|
||||||
/** @defgroup EXTI_FL_ES_INIT EXTI Exported Init structures
|
/** @defgroup EXTI_FL_ES_INIT EXTI Exported Init structures
|
||||||
* @{
|
* @{
|
||||||
@@ -108,6 +114,9 @@ void FL_EXTI_StructInit(FL_EXTI_InitTypeDef *init);
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
@@ -120,4 +129,4 @@ void FL_EXTI_StructInit(FL_EXTI_InitTypeDef *init);
|
|||||||
#endif /* __FM33LC0XX_FL_EXTI_H */
|
#endif /* __FM33LC0XX_FL_EXTI_H */
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.14-0.2 @ 2021-03-16*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.14-0.2 @ 2021-03-16*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -978,4 +978,4 @@ FL_ErrorStatus FL_FLASH_Program_Sector(FLASH_Type *FLASHx, uint32_t sectorNum, u
|
|||||||
#endif /* __FM33LC0XX_FL_FLASH_H*/
|
#endif /* __FM33LC0XX_FL_FLASH_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.14-0.2 @ 2020-12-15*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.14-0.2 @ 2020-12-15*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -289,37 +289,37 @@ typedef struct
|
|||||||
|
|
||||||
|
|
||||||
#define FL_GPIO_FOUT0_SELECT_XTLF (0x0U << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_XTLF (0x0U << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
#define FL_GPIO_FOUT0_SELECT_RCLP (0x1U << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_LPOSC (0x1U << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
#define FL_GPIO_FOUT0_SELECT_RCHF_DIV64 (0x2U << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_RCHF_DIV64 (0x2U << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
#define FL_GPIO_FOUT0_SELECT_LSCLK (0x3U << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_LSCLK (0x3U << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
#define FL_GPIO_FOUT0_SELECT_AHBCLK_DIV64 (0x4U << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_AHBCLK_DIV64 (0x4U << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
#define FL_GPIO_FOUT0_SELECT_RTCTM (0x5U << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_RTCTM (0x5U << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
#define FL_GPIO_FOUT0_SELECT_PLLOUTPUT_DIV64 (0x6U << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_PLLOUTPUT_DIV64 (0x6U << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
#define FL_GPIO_FOUT0_SELECT_RTCCLK64Hz (0x7U << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_RTCCLK64Hz (0x7U << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
#define FL_GPIO_FOUT0_SELECT_APBCLK_DIV64 (0x8U << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_APB1CLK_DIV64 (0x8U << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
#define FL_GPIO_FOUT0_SELECT_PLLOUTPUT (0x9U << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_PLLOUTPUT (0x9U << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
#define FL_GPIO_FOUT0_SELECT_RC4M_PSC (0xaU << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_RCMF_PSC (0xaU << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
#define FL_GPIO_FOUT0_SELECT_RCHF (0xbU << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_RCHF (0xbU << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
#define FL_GPIO_FOUT0_SELECT_XTHF_DIV64 (0xcU << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_XTHF_DIV64 (0xcU << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
#define FL_GPIO_FOUT0_SELECT_ADCCLK_DIV64 (0xdU << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_COMP1_OUTPUT (0xdU << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
#define FL_GPIO_FOUT0_SELECT_CLK_8K (0xeU << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_CLK_8K (0xeU << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
#define FL_GPIO_FOUT0_SELECT_ADC_CLK (0xfU << GPIO_FOUTSEL_FOUT0_Pos)
|
#define FL_GPIO_FOUT0_SELECT_ADC_CLK (0xfU << GPIO_FOUTSEL_FOUT0_Pos)
|
||||||
|
|
||||||
|
|
||||||
#define FL_GPIO_FOUT1_SELECT_XTLF (0x0U << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_XTLF (0x0U << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
#define FL_GPIO_FOUT1_SELECT_RCLP (0x1U << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_LPOSC (0x1U << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
#define FL_GPIO_FOUT1_SELECT_RCHF_DIV64 (0x2U << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_RCHF_DIV64 (0x2U << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
#define FL_GPIO_FOUT1_SELECT_LSCLK (0x3U << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_LSCLK (0x3U << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
#define FL_GPIO_FOUT1_SELECT_AHBCLK_DIV64 (0x4U << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_AHBCLK_DIV64 (0x4U << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
#define FL_GPIO_FOUT1_SELECT_RTCTM (0x5U << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_RTCTM (0x5U << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
#define FL_GPIO_FOUT1_SELECT_PLLOUTPUT_DIV64 (0x6U << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_PLLOUTPUT_DIV64 (0x6U << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
#define FL_GPIO_FOUT1_SELECT_RTCCLK64Hz (0x7U << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_RTCCLK64Hz (0x7U << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
#define FL_GPIO_FOUT1_SELECT_APBCLK_DIV64 (0x8U << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_APB1CLK_DIV64 (0x8U << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
#define FL_GPIO_FOUT1_SELECT_PLLOUTPUT (0x9U << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_PLLOUTPUT (0x9U << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
#define FL_GPIO_FOUT1_SELECT_RC4M_PSC (0xaU << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_RCMF_PSC (0xaU << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
#define FL_GPIO_FOUT1_SELECT_RCHF (0xbU << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_RCHF (0xbU << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
#define FL_GPIO_FOUT1_SELECT_XTHF_DIV64 (0xcU << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_XTHF_DIV64 (0xcU << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
#define FL_GPIO_FOUT1_SELECT_COMP1_OUTPUT (0xdU << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_ADCCLK_DIV64 (0xdU << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
#define FL_GPIO_FOUT1_SELECT_CLK_8K (0xeU << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_CLK_8K (0xeU << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
#define FL_GPIO_FOUT1_SELECT_COMP2_OUTPUT (0xfU << GPIO_FOUTSEL_FOUT1_Pos)
|
#define FL_GPIO_FOUT1_SELECT_COMP2_OUTPUT (0xfU << GPIO_FOUTSEL_FOUT1_Pos)
|
||||||
|
|
||||||
@@ -921,7 +921,14 @@ __STATIC_INLINE uint32_t FL_GPIO_GetOutputPin(GPIO_Type *GPIOx, uint32_t pin)
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE void FL_GPIO_ToggleOutputPin(GPIO_Type *GPIOx, uint32_t pin)
|
__STATIC_INLINE void FL_GPIO_ToggleOutputPin(GPIO_Type *GPIOx, uint32_t pin)
|
||||||
{
|
{
|
||||||
WRITE_REG(GPIOx->DO, READ_REG(GPIOx->DO) ^ pin);
|
if(pin&GPIOx->DO)
|
||||||
|
{
|
||||||
|
WRITE_REG(GPIOx->DRST, pin);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WRITE_REG(GPIOx->DSET, pin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1274,19 +1281,19 @@ __STATIC_INLINE uint32_t FL_GPIO_ReadEXTILines(GPIO_COMMON_Type *GPIOx)
|
|||||||
* @param GPIOx GPIO Port
|
* @param GPIOx GPIO Port
|
||||||
* @param select This parameter can be one of the following values:
|
* @param select This parameter can be one of the following values:
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_XTLF
|
* @arg @ref FL_GPIO_FOUT0_SELECT_XTLF
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_RCLP
|
* @arg @ref FL_GPIO_FOUT0_SELECT_LPOSC
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_RCHF_DIV64
|
* @arg @ref FL_GPIO_FOUT0_SELECT_RCHF_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_LSCLK
|
* @arg @ref FL_GPIO_FOUT0_SELECT_LSCLK
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_AHBCLK_DIV64
|
* @arg @ref FL_GPIO_FOUT0_SELECT_AHBCLK_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_RTCTM
|
* @arg @ref FL_GPIO_FOUT0_SELECT_RTCTM
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_PLLOUTPUT_DIV64
|
* @arg @ref FL_GPIO_FOUT0_SELECT_PLLOUTPUT_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_RTCCLK64Hz
|
* @arg @ref FL_GPIO_FOUT0_SELECT_RTCCLK64Hz
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_APBCLK_DIV64
|
* @arg @ref FL_GPIO_FOUT0_SELECT_APB1CLK_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_PLLOUTPUT
|
* @arg @ref FL_GPIO_FOUT0_SELECT_PLLOUTPUT
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_RC4M_PSC
|
* @arg @ref FL_GPIO_FOUT0_SELECT_RCMF_PSC
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_RCHF
|
* @arg @ref FL_GPIO_FOUT0_SELECT_RCHF
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_XTHF_DIV64
|
* @arg @ref FL_GPIO_FOUT0_SELECT_XTHF_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_ADCCLK_DIV64
|
* @arg @ref FL_GPIO_FOUT0_SELECT_COMP1_OUTPUT
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_CLK_8K
|
* @arg @ref FL_GPIO_FOUT0_SELECT_CLK_8K
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_ADC_CLK
|
* @arg @ref FL_GPIO_FOUT0_SELECT_ADC_CLK
|
||||||
* @retval None
|
* @retval None
|
||||||
@@ -1302,19 +1309,19 @@ __STATIC_INLINE void FL_GPIO_SetFOUT0(GPIO_COMMON_Type *GPIOx, uint32_t select)
|
|||||||
* @param GPIOx GPIO Port
|
* @param GPIOx GPIO Port
|
||||||
* @retval Returned value can be one of the following values:
|
* @retval Returned value can be one of the following values:
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_XTLF
|
* @arg @ref FL_GPIO_FOUT0_SELECT_XTLF
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_RCLP
|
* @arg @ref FL_GPIO_FOUT0_SELECT_LPOSC
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_RCHF_DIV64
|
* @arg @ref FL_GPIO_FOUT0_SELECT_RCHF_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_LSCLK
|
* @arg @ref FL_GPIO_FOUT0_SELECT_LSCLK
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_AHBCLK_DIV64
|
* @arg @ref FL_GPIO_FOUT0_SELECT_AHBCLK_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_RTCTM
|
* @arg @ref FL_GPIO_FOUT0_SELECT_RTCTM
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_PLLOUTPUT_DIV64
|
* @arg @ref FL_GPIO_FOUT0_SELECT_PLLOUTPUT_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_RTCCLK64Hz
|
* @arg @ref FL_GPIO_FOUT0_SELECT_RTCCLK64Hz
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_APBCLK_DIV64
|
* @arg @ref FL_GPIO_FOUT0_SELECT_APB1CLK_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_PLLOUTPUT
|
* @arg @ref FL_GPIO_FOUT0_SELECT_PLLOUTPUT
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_RC4M_PSC
|
* @arg @ref FL_GPIO_FOUT0_SELECT_RCMF_PSC
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_RCHF
|
* @arg @ref FL_GPIO_FOUT0_SELECT_RCHF
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_XTHF_DIV64
|
* @arg @ref FL_GPIO_FOUT0_SELECT_XTHF_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_ADCCLK_DIV64
|
* @arg @ref FL_GPIO_FOUT0_SELECT_COMP1_OUTPUT
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_CLK_8K
|
* @arg @ref FL_GPIO_FOUT0_SELECT_CLK_8K
|
||||||
* @arg @ref FL_GPIO_FOUT0_SELECT_ADC_CLK
|
* @arg @ref FL_GPIO_FOUT0_SELECT_ADC_CLK
|
||||||
*/
|
*/
|
||||||
@@ -1329,19 +1336,19 @@ __STATIC_INLINE uint32_t FL_GPIO_GetFOUT0(GPIO_COMMON_Type *GPIOx)
|
|||||||
* @param GPIOx GPIO Port
|
* @param GPIOx GPIO Port
|
||||||
* @param select This parameter can be one of the following values:
|
* @param select This parameter can be one of the following values:
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_XTLF
|
* @arg @ref FL_GPIO_FOUT1_SELECT_XTLF
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_RCLP
|
* @arg @ref FL_GPIO_FOUT1_SELECT_LPOSC
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_RCHF_DIV64
|
* @arg @ref FL_GPIO_FOUT1_SELECT_RCHF_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_LSCLK
|
* @arg @ref FL_GPIO_FOUT1_SELECT_LSCLK
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_AHBCLK_DIV64
|
* @arg @ref FL_GPIO_FOUT1_SELECT_AHBCLK_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_RTCTM
|
* @arg @ref FL_GPIO_FOUT1_SELECT_RTCTM
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_PLLOUTPUT_DIV64
|
* @arg @ref FL_GPIO_FOUT1_SELECT_PLLOUTPUT_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_RTCCLK64Hz
|
* @arg @ref FL_GPIO_FOUT1_SELECT_RTCCLK64Hz
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_APBCLK_DIV64
|
* @arg @ref FL_GPIO_FOUT1_SELECT_APB1CLK_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_PLLOUTPUT
|
* @arg @ref FL_GPIO_FOUT1_SELECT_PLLOUTPUT
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_RC4M_PSC
|
* @arg @ref FL_GPIO_FOUT1_SELECT_RCMF_PSC
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_RCHF
|
* @arg @ref FL_GPIO_FOUT1_SELECT_RCHF
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_XTHF_DIV64
|
* @arg @ref FL_GPIO_FOUT1_SELECT_XTHF_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_COMP1_OUTPUT
|
* @arg @ref FL_GPIO_FOUT1_SELECT_ADCCLK_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_CLK_8K
|
* @arg @ref FL_GPIO_FOUT1_SELECT_CLK_8K
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_COMP2_OUTPUT
|
* @arg @ref FL_GPIO_FOUT1_SELECT_COMP2_OUTPUT
|
||||||
* @retval None
|
* @retval None
|
||||||
@@ -1357,19 +1364,19 @@ __STATIC_INLINE void FL_GPIO_SetFOUT1(GPIO_COMMON_Type *GPIOx, uint32_t select)
|
|||||||
* @param GPIOx GPIO Port
|
* @param GPIOx GPIO Port
|
||||||
* @retval Returned value can be one of the following values:
|
* @retval Returned value can be one of the following values:
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_XTLF
|
* @arg @ref FL_GPIO_FOUT1_SELECT_XTLF
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_RCLP
|
* @arg @ref FL_GPIO_FOUT1_SELECT_LPOSC
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_RCHF_DIV64
|
* @arg @ref FL_GPIO_FOUT1_SELECT_RCHF_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_LSCLK
|
* @arg @ref FL_GPIO_FOUT1_SELECT_LSCLK
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_AHBCLK_DIV64
|
* @arg @ref FL_GPIO_FOUT1_SELECT_AHBCLK_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_RTCTM
|
* @arg @ref FL_GPIO_FOUT1_SELECT_RTCTM
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_PLLOUTPUT_DIV64
|
* @arg @ref FL_GPIO_FOUT1_SELECT_PLLOUTPUT_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_RTCCLK64Hz
|
* @arg @ref FL_GPIO_FOUT1_SELECT_RTCCLK64Hz
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_APBCLK_DIV64
|
* @arg @ref FL_GPIO_FOUT1_SELECT_APB1CLK_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_PLLOUTPUT
|
* @arg @ref FL_GPIO_FOUT1_SELECT_PLLOUTPUT
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_RC4M_PSC
|
* @arg @ref FL_GPIO_FOUT1_SELECT_RCMF_PSC
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_RCHF
|
* @arg @ref FL_GPIO_FOUT1_SELECT_RCHF
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_XTHF_DIV64
|
* @arg @ref FL_GPIO_FOUT1_SELECT_XTHF_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_COMP1_OUTPUT
|
* @arg @ref FL_GPIO_FOUT1_SELECT_ADCCLK_DIV64
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_CLK_8K
|
* @arg @ref FL_GPIO_FOUT1_SELECT_CLK_8K
|
||||||
* @arg @ref FL_GPIO_FOUT1_SELECT_COMP2_OUTPUT
|
* @arg @ref FL_GPIO_FOUT1_SELECT_COMP2_OUTPUT
|
||||||
*/
|
*/
|
||||||
@@ -1955,5 +1962,5 @@ void FL_GPIO_ALLPIN_LPM_MODE(void);
|
|||||||
|
|
||||||
#endif /* __FM33LC0XX_FL_GPIO_H*/
|
#endif /* __FM33LC0XX_FL_GPIO_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.14-0.2 @ 2021-08-19*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -173,7 +173,7 @@ typedef struct
|
|||||||
* ---------------------------------------------------
|
* ---------------------------------------------------
|
||||||
* ITR2 | 0 | BSTIM32_TRGO | 计数触发
|
* ITR2 | 0 | BSTIM32_TRGO | 计数触发
|
||||||
* | 1 | LPUART2_RX | 宽度捕捉
|
* | 1 | LPUART2_RX | 宽度捕捉
|
||||||
* | 2 | RCLP | 周期捕捉
|
* | 2 | LPOSC | 周期捕捉
|
||||||
* | 3 | XTLF | 周期捕捉
|
* | 3 | XTLF | 周期捕捉
|
||||||
* ---------------------------------------------------
|
* ---------------------------------------------------
|
||||||
* ITR3 | 0 | COMP1_TRGO | 计数触发
|
* ITR3 | 0 | COMP1_TRGO | 计数触发
|
||||||
@@ -198,7 +198,7 @@ typedef struct
|
|||||||
* ---------------------------------------------------
|
* ---------------------------------------------------
|
||||||
* ITR2 | 0 | BSTIM32_TRGO | 计数触发
|
* ITR2 | 0 | BSTIM32_TRGO | 计数触发
|
||||||
* | 1 | LSCLK | 周期捕捉
|
* | 1 | LSCLK | 周期捕捉
|
||||||
* | 2 | RCLP | 周期捕捉
|
* | 2 | LPOSC | 周期捕捉
|
||||||
* | 3 | XTLF | 周期捕捉
|
* | 3 | XTLF | 周期捕捉
|
||||||
* ---------------------------------------------------
|
* ---------------------------------------------------
|
||||||
* ITR3 | 0 | COMP1_TRGO | 计数触发
|
* ITR3 | 0 | COMP1_TRGO | 计数触发
|
||||||
@@ -2955,4 +2955,4 @@ FL_ErrorStatus FL_GPTIM_ETR_Init(GPTIM_Type *TIMx, FL_GPTIM_ETR_InitTypeDef *etr
|
|||||||
#endif /* __FM33LC0XX_FL_GPTIM_H*/
|
#endif /* __FM33LC0XX_FL_GPTIM_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.1 @ 2020-09-23*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.1 @ 2020-09-23*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -1862,4 +1862,4 @@ FL_ErrorStatus FL_I2C_MasterMode_Init(I2C_Type *I2Cx, FL_I2C_MasterMode_InitType
|
|||||||
#endif /* __FM33LC0XX_FL_I2C_H*/
|
#endif /* __FM33LC0XX_FL_I2C_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.1 @ 2020-09-12*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.1 @ 2020-09-12*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -306,4 +306,4 @@ FL_ErrorStatus FL_IWDT_Init(IWDT_Type *IWDTx, FL_IWDT_InitTypeDef *IWDT_InitStru
|
|||||||
#endif /* __FM33LC0XX_FL_IWDT_H*/
|
#endif /* __FM33LC0XX_FL_IWDT_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-27*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-27*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -1012,4 +1012,4 @@ void FL_LCD_8COMDisplay(uint32_t *display, uint8_t com, uint8_t seg, uint8_t sta
|
|||||||
#endif /* __FM33LC0XX_FL_LCD_H*/
|
#endif /* __FM33LC0XX_FL_LCD_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.14-0.1 @ 2021-02-02*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.14-0.1 @ 2021-02-02*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -1170,4 +1170,4 @@ void FL_LPTIM32_OC_StructInit(FL_LPTIM32_OC_InitTypeDef *initStruct_OC);
|
|||||||
#endif /* __FM33LC0XX_FL_LPTIM32_H*/
|
#endif /* __FM33LC0XX_FL_LPTIM32_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -1089,4 +1089,4 @@ FL_ErrorStatus FL_LPUART_Init(LPUART_Type *LPUARTx, FL_LPUART_InitTypeDef *initS
|
|||||||
#endif /* __FM33LC0XX_FL_LPUART_H*/
|
#endif /* __FM33LC0XX_FL_LPUART_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.1 @ 2020-09-22*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.1 @ 2020-09-22*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -782,4 +782,4 @@ FL_ErrorStatus FL_OPA_Init(OPA_Type *OPAx, FL_OPA_InitTypeDef *initStruct);
|
|||||||
#endif /* __FM33LC0XX_FL_OPA_H*/
|
#endif /* __FM33LC0XX_FL_OPA_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -953,4 +953,4 @@ void FL_PMU_StructInit(FL_PMU_SleepInitTypeDef *LPM_InitStruct);
|
|||||||
#endif /* __FM33LC0XX_FL_PMU_H*/
|
#endif /* __FM33LC0XX_FL_PMU_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -59,7 +59,7 @@ extern "C" {
|
|||||||
#define RMU_PDRCR_EN_Msk (0x1U << RMU_PDRCR_EN_Pos)
|
#define RMU_PDRCR_EN_Msk (0x1U << RMU_PDRCR_EN_Pos)
|
||||||
#define RMU_PDRCR_EN RMU_PDRCR_EN_Msk
|
#define RMU_PDRCR_EN RMU_PDRCR_EN_Msk
|
||||||
|
|
||||||
#define RMU_BORCR_CFG_Pos (1U)
|
#define RMU_BORCR_CFG_Pos (2U)
|
||||||
#define RMU_BORCR_CFG_Msk (0x3U << RMU_BORCR_CFG_Pos)
|
#define RMU_BORCR_CFG_Msk (0x3U << RMU_BORCR_CFG_Pos)
|
||||||
#define RMU_BORCR_CFG RMU_BORCR_CFG_Msk
|
#define RMU_BORCR_CFG RMU_BORCR_CFG_Msk
|
||||||
|
|
||||||
@@ -284,4 +284,4 @@ __STATIC_INLINE void FL_RMU_BORPowerUp_Enable(RMU_Type *RMUx)
|
|||||||
#endif /* __FM33LC0XX_FL_RMU_H*/
|
#endif /* __FM33LC0XX_FL_RMU_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -261,4 +261,4 @@ uint32_t GetCrc32(uint32_t dataIn);
|
|||||||
#endif /* __FM33LC0XX_FL_RNG_H*/
|
#endif /* __FM33LC0XX_FL_RNG_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -1386,4 +1386,4 @@ FL_ErrorStatus FL_RTC_ConfigTime(RTC_Type *RTCx, FL_RTC_InitTypeDef *initStruct)
|
|||||||
#endif /* __FM33LC0XX_FL_RTC_H*/
|
#endif /* __FM33LC0XX_FL_RTC_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.1 @ 2020-09-22*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.1 @ 2020-09-22*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -1080,7 +1080,7 @@ __STATIC_INLINE uint32_t FL_SPI_IsEnabledIT_RXComplete(SPI_Type *SPIx)
|
|||||||
*/
|
*/
|
||||||
__STATIC_INLINE void FL_SPI_SetFrameMode(SPI_Type *SPIx, uint32_t mode)
|
__STATIC_INLINE void FL_SPI_SetFrameMode(SPI_Type *SPIx, uint32_t mode)
|
||||||
{
|
{
|
||||||
MODIFY_REG(SPIx->ISR, SPI_ISR_DCN_TX_Msk, mode);
|
WRITE_REG(SPIx->ISR, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1249,4 +1249,4 @@ void FL_SPI_StructInit(FL_SPI_InitTypeDef *initStruct);
|
|||||||
#endif /* __FM33LC0XX_FL_SPI_H*/
|
#endif /* __FM33LC0XX_FL_SPI_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.14-0.1 @ 2020-10-20*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.14-0.1 @ 2020-10-20*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -676,4 +676,4 @@ void FL_SVD_StructInit(FL_SVD_InitTypeDef *initStruct);
|
|||||||
#endif /* __FM33LC0XX_FL_SVD_H*/
|
#endif /* __FM33LC0XX_FL_SVD_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-25*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-25*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -1068,4 +1068,4 @@ void FL_U7816_StructInit(FL_U7816_InitTypeDef *U7816_InitStruct);
|
|||||||
#endif /* __FM33LC0XX_FL_U7816_H*/
|
#endif /* __FM33LC0XX_FL_U7816_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-27*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-27*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -1250,4 +1250,4 @@ void FL_UART_StructInit(FL_UART_InitTypeDef *initStruct);
|
|||||||
#endif /* __FM33LC0XX_FL_UART_H*/
|
#endif /* __FM33LC0XX_FL_UART_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-27*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-27*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -407,4 +407,4 @@ __STATIC_INLINE void FL_VREF_DisableVREFBuffer(VREF_Type *VREFx)
|
|||||||
#endif /* __FM33LC0XX_FL_VREF_H*/
|
#endif /* __FM33LC0XX_FL_VREF_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
/* Includes -------------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl_def.h"
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
@@ -262,4 +262,4 @@ void FL_WWDT_StructInit(FL_WWDT_InitTypeDef *WWDT_InitStruct);
|
|||||||
#endif /* __FM33LC0XX_FL_WWDT_H*/
|
#endif /* __FM33LC0XX_FL_WWDT_H*/
|
||||||
|
|
||||||
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
/*************************Py_Code_Generator Version: 0.1-0.11-0.2 @ 2020-09-23*************************/
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ Src/fm33lc0xx_fl_rcc.c
|
|||||||
Src/fm33lc0xx_fl_gpio.c
|
Src/fm33lc0xx_fl_gpio.c
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
if GetDepend(['RT_USING_PIN']):
|
||||||
|
src += ['Src/fm33lc0xx_fl_exti.c']
|
||||||
|
|
||||||
if GetDepend(['RT_USING_SERIAL']):
|
if GetDepend(['RT_USING_SERIAL']):
|
||||||
src += ['Src/fm33lc0xx_fl_uart.c']
|
src += ['Src/fm33lc0xx_fl_uart.c']
|
||||||
src += ['Src/fm33lc0xx_fl_lpuart.c']
|
src += ['Src/fm33lc0xx_fl_lpuart.c']
|
||||||
|
|||||||
@@ -6,20 +6,21 @@
|
|||||||
****************************************************************************************************
|
****************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
****************************************************************************************************
|
****************************************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Includes -------------------------------------------------------------------------------------------*/
|
|
||||||
|
/* Includes ----------------------------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl.h"
|
#include "fm33lc0xx_fl.h"
|
||||||
|
|
||||||
/** @addtogroup FL_EF_DELAY
|
/** @addtogroup FL_EF_DELAY
|
||||||
@@ -73,7 +74,7 @@ __WEAK void FL_DelayMs(uint32_t count)
|
|||||||
/**
|
/**
|
||||||
* @brief Provide no-blocking delay initialization in microseconds.
|
* @brief Provide no-blocking delay initialization in microseconds.
|
||||||
* @note Should be follow By while(!FL_DelayEnd()){ ** user code ** } immediately.
|
* @note Should be follow By while(!FL_DelayEnd()){ ** user code ** } immediately.
|
||||||
The function is declared as __WEAK to be overwritten in case of other
|
* The function is declared as __WEAK to be overwritten in case of other
|
||||||
* implementation in user file.
|
* implementation in user file.
|
||||||
* @param count specifies the delay count in microseconds.
|
* @param count specifies the delay count in microseconds.
|
||||||
* @retval None
|
* @retval None
|
||||||
@@ -102,7 +103,7 @@ __WEAK void FL_DelayMsStart(uint32_t count)
|
|||||||
/**
|
/**
|
||||||
* @brief Showing if the no-blocking delay has ended.
|
* @brief Showing if the no-blocking delay has ended.
|
||||||
* @note Should be used with FL_DelayMs/UsStart() function.
|
* @note Should be used with FL_DelayMs/UsStart() function.
|
||||||
The function is declared as __WEAK to be overwritten in case of other
|
* The function is declared as __WEAK to be overwritten in case of other
|
||||||
* implementation in user file.
|
* implementation in user file.
|
||||||
* @param count specifies the delay count in milliseconds.
|
* @param count specifies the delay count in milliseconds.
|
||||||
* @retval true - delay has ended
|
* @retval true - delay has ended
|
||||||
@@ -123,7 +124,7 @@ __WEAK bool FL_DelayEnd(void)
|
|||||||
|
|
||||||
void FL_Init(void)
|
void FL_Init(void)
|
||||||
{
|
{
|
||||||
// Init delay support function
|
/* Init delay support function */
|
||||||
FL_DelayInit();
|
FL_DelayInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,7 +132,33 @@ void FL_Init(void)
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*************************(C) COPYRIGHT Fudan Microelectronics **** END OF FILE*************************/
|
/** @addtogroup FL_EF_NVIC
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Configure NVIC for specified Interrupt.
|
||||||
|
* @param configStruct NVIC configuration.
|
||||||
|
* @param irq Interrupt number.
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
void FL_NVIC_Init(FL_NVIC_ConfigTypeDef *configStruct, IRQn_Type irq)
|
||||||
|
{
|
||||||
|
/* Check parameter */
|
||||||
|
if(configStruct->preemptPriority > 3)
|
||||||
|
{
|
||||||
|
configStruct->preemptPriority = 3;
|
||||||
|
}
|
||||||
|
NVIC_DisableIRQ(irq);
|
||||||
|
NVIC_SetPriority(irq, configStruct->preemptPriority);
|
||||||
|
NVIC_EnableIRQ(irq);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,25 +6,22 @@
|
|||||||
****************************************************************************************************
|
****************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
****************************************************************************************************
|
****************************************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl_adc.h"
|
#include "fm33lc0xx_fl.h"
|
||||||
#include "fm33lc0xx_fl_rcc.h"
|
|
||||||
#include "fm33lc0xx_fl_rmu.h"
|
|
||||||
#include "fm33lc0xx_fl_svd.h"
|
|
||||||
#include "fm33lc0xx_fl_vref.h"
|
|
||||||
#include "fm33_assert.h"
|
|
||||||
|
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
@@ -34,8 +31,10 @@
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef FL_ADC_DRIVER_ENABLED
|
||||||
|
|
||||||
/* Private macros ------------------------------------------------------------*/
|
/* Private macros ------------------------------------------------------------*/
|
||||||
/** @addtogroup ADC_FL_Private_Macros
|
/** @addtogroup ADC_FL_PM ADC Private Macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -143,10 +142,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief ADC外设寄存器值为复位值
|
* @brief 恢复ADC公用寄存器到复位值
|
||||||
* @param 外设入口地址
|
* @param None
|
||||||
* @retval 返回错误状态,可能值:
|
* @retval 执行结果
|
||||||
* -FL_PASS 外设寄存器值恢复复位值
|
* -FL_PASS ADC公用寄存器值恢复复位值
|
||||||
* -FL_FAIL 未成功执行
|
* -FL_FAIL 未成功执行
|
||||||
*/
|
*/
|
||||||
FL_ErrorStatus FL_ADC_CommonDeInit(void)
|
FL_ErrorStatus FL_ADC_CommonDeInit(void)
|
||||||
@@ -158,16 +157,11 @@ FL_ErrorStatus FL_ADC_CommonDeInit(void)
|
|||||||
return FL_PASS;
|
return FL_PASS;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @brief ADC共用寄存器设置以配置外设工作时钟
|
* @brief 配置ADC公用寄存器
|
||||||
*
|
* @param ADC_CommonInitStruct 指向 @ref FL_ADC_CommonInitTypeDef 的结构体,它包含ADC公用寄存器的配置信息
|
||||||
* @note 其中LL_LPTIM_OPERATION_MODE_EXTERNAL_ASYN_PAUSE_CNT 模式需要外部脉冲提供给LPTIM模块作为工作时钟,此时
|
* @retval 执行结果
|
||||||
* LPTIM完全工作在异步模式下。
|
|
||||||
* @param LPTIM 外设入口地址
|
|
||||||
* @param LPTIM_InitStruct指向LL_LPTIM_TimeInitTypeDef类的结构体,它包含指定LPTIM外设的配置信息
|
|
||||||
*
|
|
||||||
* @retval ErrorStatus枚举值
|
|
||||||
* -FL_FAIL 配置过程发生错误
|
* -FL_FAIL 配置过程发生错误
|
||||||
* -FL_PASS LPUART配置成功
|
* -FL_PASS ADC公用寄存器配置成功
|
||||||
*/
|
*/
|
||||||
FL_ErrorStatus FL_ADC_CommonInit(FL_ADC_CommonInitTypeDef *ADC_CommonInitStruct)
|
FL_ErrorStatus FL_ADC_CommonInit(FL_ADC_CommonInitTypeDef *ADC_CommonInitStruct)
|
||||||
{
|
{
|
||||||
@@ -186,9 +180,8 @@ FL_ErrorStatus FL_ADC_CommonInit(FL_ADC_CommonInitTypeDef *ADC_CommonInitStruct)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @brief 设置 ADC_CommonInitStruct 为默认配置
|
* @brief 初始化 @ref FL_ADC_CommonInitTypeDef 配置结构体
|
||||||
* @param ADC_CommonInitStruct 指向需要将值设置为默认配置的结构体 @ref LL_ADC_CommonInitTypeDef 结构体
|
* @param ADC_CommonInitStruct 指向需要初始化的 @ref FL_ADC_CommonInitTypeDef 结构体
|
||||||
*
|
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void FL_ADC_CommonStructInit(FL_ADC_CommonInitTypeDef *ADC_CommonInitStruct)
|
void FL_ADC_CommonStructInit(FL_ADC_CommonInitTypeDef *ADC_CommonInitStruct)
|
||||||
@@ -198,13 +191,11 @@ void FL_ADC_CommonStructInit(FL_ADC_CommonInitTypeDef *ADC_CommonInitStruct)
|
|||||||
ADC_CommonInitStruct->clockPrescaler = FL_RCC_ADC_PSC_DIV16;
|
ADC_CommonInitStruct->clockPrescaler = FL_RCC_ADC_PSC_DIV16;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @brief 恢复对应的ADC入口地址寄存器为默认值
|
* @brief 恢复ADC外设寄存器到复位值
|
||||||
*
|
|
||||||
* @param ADCx 外设入口地址
|
* @param ADCx 外设入口地址
|
||||||
*
|
* @retval 执行结果
|
||||||
* @retval ErrorStatus枚举值
|
* -FL_PASS ADC外设寄存器值恢复复位值
|
||||||
* -FL_FAIL 配置过程发生错误
|
* -FL_FAIL 未成功执行
|
||||||
* -FL_PASS LPUART配置成功
|
|
||||||
*/
|
*/
|
||||||
FL_ErrorStatus FL_ADC_DeInit(ADC_Type *ADCx)
|
FL_ErrorStatus FL_ADC_DeInit(ADC_Type *ADCx)
|
||||||
{
|
{
|
||||||
@@ -221,16 +212,14 @@ FL_ErrorStatus FL_ADC_DeInit(ADC_Type *ADCx)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @brief 初始化ADCx指定的入口地址的外设寄存器
|
* @brief 配置指定的ADC外设
|
||||||
*
|
|
||||||
* @note 用户必须检查此函数的返回值,以确保自校准完成,否则转换结果精度无法保证,除此之外ADC使能过采样实际不会增加ADC的
|
* @note 用户必须检查此函数的返回值,以确保自校准完成,否则转换结果精度无法保证,除此之外ADC使能过采样实际不会增加ADC的
|
||||||
* 转换精度只会提高转换结果的稳定性(同时配置移位寄存器的情况下),同时过采样会降低转换速度。
|
* 转换精度只会提高转换结果的稳定性(同时配置移位寄存器的情况下),同时过采样会降低转换速度。
|
||||||
* @param ADCx 外设入口地址
|
* @param ADCx 外设入口地址
|
||||||
* @param ADC_InitStruct 向一FL_ADC_InitTypeDef结构体,它包含指定ADC外设的配置信息
|
* @param ADC_InitStruct 指向 @ref FL_ADC_InitTypeDef 的结构体,它包含ADC外设寄存器的配置信息
|
||||||
*
|
* @retval 执行结果
|
||||||
* @retval ErrorStatus枚举值
|
|
||||||
* -FL_FAIL 配置过程发生错误
|
* -FL_FAIL 配置过程发生错误
|
||||||
* -FL_PASS LPUART配置成功
|
* -FL_PASS ADC外设寄存器配置成功
|
||||||
*/
|
*/
|
||||||
FL_ErrorStatus FL_ADC_Init(ADC_Type *ADCx, FL_ADC_InitTypeDef *ADC_InitStruct)
|
FL_ErrorStatus FL_ADC_Init(ADC_Type *ADCx, FL_ADC_InitTypeDef *ADC_InitStruct)
|
||||||
{
|
{
|
||||||
@@ -245,15 +234,15 @@ FL_ErrorStatus FL_ADC_Init(ADC_Type *ADCx, FL_ADC_InitTypeDef *ADC_InitStruct)
|
|||||||
assert_param(IS_FL_ADC_OVERSAMPCOFIG(ADC_InitStruct->oversamplingMode));
|
assert_param(IS_FL_ADC_OVERSAMPCOFIG(ADC_InitStruct->oversamplingMode));
|
||||||
assert_param(IS_FL_ADC_OVERSAMPINGRATIO(ADC_InitStruct->overSampingMultiplier));
|
assert_param(IS_FL_ADC_OVERSAMPINGRATIO(ADC_InitStruct->overSampingMultiplier));
|
||||||
assert_param(IS_FL_ADC_OVERSAMPINGSHIFT(ADC_InitStruct->oversamplingShift));
|
assert_param(IS_FL_ADC_OVERSAMPINGSHIFT(ADC_InitStruct->oversamplingShift));
|
||||||
/* 使能a工作时钟 */
|
/* 使能ADC工作时钟 */
|
||||||
FL_RCC_EnableGroup1BusClock(FL_RCC_GROUP1_BUSCLK_ANAC);
|
FL_RCC_EnableGroup1BusClock(FL_RCC_GROUP1_BUSCLK_ANAC);
|
||||||
FL_SVD_EnableADCMonitor(SVD);
|
FL_SVD_EnableADCMonitor(SVD);
|
||||||
if(!FL_VREF_IsEnabled(VREF))
|
if(!FL_VREF_IsEnabled(VREF))
|
||||||
{
|
{
|
||||||
FL_VREF_ClearFlag_Ready(VREF);
|
FL_VREF_ClearFlag_Ready(VREF);
|
||||||
FL_VREF_Enable(VREF);//置位VREF_EN寄存器,使能VREF1p2模块
|
FL_VREF_Enable(VREF); /* 置位VREF_EN寄存器,使能VREF1p2模块 */
|
||||||
}
|
}
|
||||||
FL_VREF_EnableTemperatureSensor(VREF);//置位PTAT_EN寄存器
|
FL_VREF_EnableTemperatureSensor(VREF); /* 置位PTAT_EN寄存器 */
|
||||||
while(FL_VREF_IsActiveFlag_Ready(VREF) == 0)
|
while(FL_VREF_IsActiveFlag_Ready(VREF) == 0)
|
||||||
{
|
{
|
||||||
if(i >= 128000)
|
if(i >= 128000)
|
||||||
@@ -321,11 +310,9 @@ FL_ErrorStatus FL_ADC_Init(ADC_Type *ADCx, FL_ADC_InitTypeDef *ADC_InitStruct)
|
|||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 设置 ADC_InitStruct 为默认配置
|
* @brief 初始化 @ref FL_ADC_InitTypeDef 配置结构体
|
||||||
* @param ADC_InitStruct 指向需要将值设置为默认配置的结构体 @ref FL_ADC_InitTypeDef 结构体
|
* @param ADC_InitStruct 指向需要初始化的 @ref FL_ADC_InitTypeDef 结构体
|
||||||
*
|
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void FL_ADC_StructInit(FL_ADC_InitTypeDef *ADC_InitStruct)
|
void FL_ADC_StructInit(FL_ADC_InitTypeDef *ADC_InitStruct)
|
||||||
@@ -347,6 +334,8 @@ void FL_ADC_StructInit(FL_ADC_InitTypeDef *ADC_InitStruct)
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#endif /* FL_ADC_DRIVER_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
@@ -355,7 +344,4 @@ void FL_ADC_StructInit(FL_ADC_InitTypeDef *ADC_InitStruct)
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/******************************************* END OF FILE *******************************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,22 +6,22 @@
|
|||||||
****************************************************************************************************
|
****************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
****************************************************************************************************
|
****************************************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl_rcc.h"
|
#include "fm33lc0xx_fl.h"
|
||||||
#include "fm33lc0xx_fl_aes.h"
|
|
||||||
#include "fm33_assert.h"
|
|
||||||
|
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
@@ -31,6 +31,8 @@
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef FL_AES_DRIVER_ENABLED
|
||||||
|
|
||||||
/* Private macros ------------------------------------------------------------*/
|
/* Private macros ------------------------------------------------------------*/
|
||||||
/** @addtogroup AES_FL_Private_Macros
|
/** @addtogroup AES_FL_Private_Macros
|
||||||
* @{
|
* @{
|
||||||
@@ -140,6 +142,8 @@ void FL_AES_StructInit(FL_AES_InitTypeDef *AES_InitStructer)
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#endif /* FL_AES_DRIVER_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
@@ -148,5 +152,4 @@ void FL_AES_StructInit(FL_AES_InitTypeDef *AES_InitStructer)
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/******************************************* END OF FILE *******************************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|
||||||
|
|||||||
@@ -6,23 +6,22 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl_rcc.h"
|
#include "fm33lc0xx_fl.h"
|
||||||
#include "fm33lc0xx_fl_rmu.h"
|
|
||||||
#include "fm33lc0xx_fl_atim.h"
|
|
||||||
#include "fm33_assert.h"
|
|
||||||
|
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
@@ -32,6 +31,8 @@
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef FL_ATIM_DRIVER_ENABLED
|
||||||
|
|
||||||
/* Private macros ------------------------------------------------------------------*/
|
/* Private macros ------------------------------------------------------------------*/
|
||||||
/** @addtogroup ATIM_FL_Private_Macros
|
/** @addtogroup ATIM_FL_Private_Macros
|
||||||
* @{
|
* @{
|
||||||
@@ -421,7 +422,7 @@ FL_ErrorStatus FL_ATIM_Init(ATIM_Type *TIMx, FL_ATIM_InitTypeDef *TIM_InitStruct
|
|||||||
}
|
}
|
||||||
/* 手动触发更新事件,将配置值写入 */
|
/* 手动触发更新事件,将配置值写入 */
|
||||||
FL_ATIM_GenerateUpdateEvent(TIMx);
|
FL_ATIM_GenerateUpdateEvent(TIMx);
|
||||||
while((!FL_ATIM_IsActiveFlag_Update(ATIM))&i)
|
while((!FL_ATIM_IsActiveFlag_Update(ATIM))&&i)
|
||||||
{
|
{
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
@@ -649,7 +650,7 @@ FL_ErrorStatus FL_ATIM_OC_Init(ATIM_Type *TIMx, uint32_t channel, FL_ATIM_OC_Ini
|
|||||||
OCConfig(TIMx, channel, TIM_OC_InitStruct);
|
OCConfig(TIMx, channel, TIM_OC_InitStruct);
|
||||||
/* 手动触发更新事件,将配置值写入 */
|
/* 手动触发更新事件,将配置值写入 */
|
||||||
FL_ATIM_GenerateUpdateEvent(TIMx);
|
FL_ATIM_GenerateUpdateEvent(TIMx);
|
||||||
while((!FL_ATIM_IsActiveFlag_Update(ATIM))&i)
|
while((!FL_ATIM_IsActiveFlag_Update(ATIM))&&i)
|
||||||
{
|
{
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
@@ -766,6 +767,8 @@ void FL_ATIM_BDTR_StructInit(FL_ATIM_BDTR_InitTypeDef *TIM_BDTR_InitStruct)
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#endif /* FL_ATIM_DRIVER_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
@@ -774,4 +777,4 @@ void FL_ATIM_BDTR_StructInit(FL_ATIM_BDTR_InitTypeDef *TIM_BDTR_InitStruct)
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/******************************************* END OF FILE *******************************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,23 +6,22 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl_rcc.h"
|
#include "fm33lc0xx_fl.h"
|
||||||
#include "fm33lc0xx_fl_rmu.h"
|
|
||||||
#include "fm33lc0xx_fl_bstim32.h"
|
|
||||||
#include "fm33_assert.h"
|
|
||||||
|
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
@@ -32,6 +31,8 @@
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef FL_BSTIM32_DRIVER_ENABLED
|
||||||
|
|
||||||
/* Private macros ------------------------------------------------------------------*/
|
/* Private macros ------------------------------------------------------------------*/
|
||||||
/** @addtogroup BSTIM32_FL_Private_Macros
|
/** @addtogroup BSTIM32_FL_Private_Macros
|
||||||
* @{
|
* @{
|
||||||
@@ -42,9 +43,9 @@
|
|||||||
#define IS_FL_BSTIM32_AUTORELOAD_MODE(__VALUE__) (((__VALUE__) == FL_ENABLE)||\
|
#define IS_FL_BSTIM32_AUTORELOAD_MODE(__VALUE__) (((__VALUE__) == FL_ENABLE)||\
|
||||||
((__VALUE__) == FL_DISABLE))
|
((__VALUE__) == FL_DISABLE))
|
||||||
|
|
||||||
#define IS_FL_BSTIM32_CLOCK_SRC(__VALUE__) (((__VALUE__) == FL_RCC_BSTIM32_CLK_SOURCE_APB1CLK)||\
|
#define IS_FL_BSTIM32_CLOCK_SRC(__VALUE__) (((__VALUE__) == FL_RCC_BSTIM32_CLK_SOURCE_APB2CLK)||\
|
||||||
((__VALUE__) == FL_RCC_BSTIM32_CLK_SOURCE_LSCLK)||\
|
((__VALUE__) == FL_RCC_BSTIM32_CLK_SOURCE_LSCLK)||\
|
||||||
((__VALUE__) == FL_RCC_BSTIM32_CLK_SOURCE_RCLP)||\
|
((__VALUE__) == FL_RCC_BSTIM32_CLK_SOURCE_LPOSC)||\
|
||||||
((__VALUE__) == FL_RCC_BSTIM32_CLK_SOURCE_RCMF_PSC))
|
((__VALUE__) == FL_RCC_BSTIM32_CLK_SOURCE_RCMF_PSC))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -113,7 +114,7 @@ FL_ErrorStatus FL_BSTIM32_Init(BSTIM32_Type *BSTIM32x, FL_BSTIM32_InitTypeDef *i
|
|||||||
}
|
}
|
||||||
/* 手动触发更新事件,将配置值写入 */
|
/* 手动触发更新事件,将配置值写入 */
|
||||||
FL_BSTIM32_GenerateUpdateEvent(BSTIM32x);
|
FL_BSTIM32_GenerateUpdateEvent(BSTIM32x);
|
||||||
while((!FL_BSTIM32_IsActiveFlag_Update(BSTIM32x))&i)
|
while((!FL_BSTIM32_IsActiveFlag_Update(BSTIM32x))&&i)
|
||||||
{
|
{
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
@@ -133,13 +134,15 @@ void FL_BSTIM32_StructInit(FL_BSTIM32_InitTypeDef *initStruct)
|
|||||||
initStruct->prescaler = 0;
|
initStruct->prescaler = 0;
|
||||||
initStruct->autoReload = 0xFFFFFFFF;
|
initStruct->autoReload = 0xFFFFFFFF;
|
||||||
initStruct->autoReloadState = FL_ENABLE;
|
initStruct->autoReloadState = FL_ENABLE;
|
||||||
initStruct->clockSource = FL_RCC_BSTIM32_CLK_SOURCE_APB1CLK;
|
initStruct->clockSource = FL_RCC_BSTIM32_CLK_SOURCE_APB2CLK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#endif /* FL_BSTIM32_DRIVER_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
@@ -148,4 +151,4 @@ void FL_BSTIM32_StructInit(FL_BSTIM32_InitTypeDef *initStruct)
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/******************************************* END OF FILE *******************************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,24 +6,22 @@
|
|||||||
****************************************************************************************************
|
****************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
****************************************************************************************************
|
****************************************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl_comp.h"
|
#include "fm33lc0xx_fl.h"
|
||||||
#include "fm33lc0xx_fl_rmu.h"
|
|
||||||
#include "fm33lc0xx_fl_rcc.h"
|
|
||||||
#include "fm33lc0xx_fl_opa.h"
|
|
||||||
#include "fm33_assert.h"
|
|
||||||
|
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
@@ -33,6 +31,8 @@
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef FL_COMP_DRIVER_ENABLED
|
||||||
|
|
||||||
/* Private macros ------------------------------------------------------------*/
|
/* Private macros ------------------------------------------------------------*/
|
||||||
/** @addtogroup COMP_FL_Private_Macros
|
/** @addtogroup COMP_FL_Private_Macros
|
||||||
* @{
|
* @{
|
||||||
@@ -116,8 +116,8 @@ FL_ErrorStatus FL_COMP_Init(COMP_Type *COMPx, FL_COMP_InitTypeDef *initStruct)
|
|||||||
/* 比较器使用vref 打开vref_buf */
|
/* 比较器使用vref 打开vref_buf */
|
||||||
if((initStruct->negativeInput == FL_COMP_INN_SOURCE_VREF) || (initStruct->negativeInput == FL_COMP_INN_SOURCE_VREF_DIV_2))
|
if((initStruct->negativeInput == FL_COMP_INN_SOURCE_VREF) || (initStruct->negativeInput == FL_COMP_INN_SOURCE_VREF_DIV_2))
|
||||||
{
|
{
|
||||||
FL_OPA_EnableVrefBuffer(OPA1);//使能
|
FL_OPA_EnableVrefBuffer(OPA1); /* 使能 */
|
||||||
FL_OPA_DisableBypassVrefBuffer(OPA1);//不bypass
|
FL_OPA_DisableBypassVrefBuffer(OPA1); /* 不bypass */
|
||||||
}
|
}
|
||||||
if(COMPx == COMP1)
|
if(COMPx == COMP1)
|
||||||
{
|
{
|
||||||
@@ -167,6 +167,8 @@ void FL_COMP_StructInit(FL_COMP_InitTypeDef *initStruct)
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#endif /* FL_COMP_DRIVER_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
@@ -175,4 +177,4 @@ void FL_COMP_StructInit(FL_COMP_InitTypeDef *initStruct)
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*************************************************************END OF FILE************************************************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,21 +6,22 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
#include "fm33lc0xx_fl_rcc.h"
|
|
||||||
#include "fm33lc0xx_fl_crc.h"
|
|
||||||
#include "fm33_assert.h"
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
#include "fm33lc0xx_fl.h"
|
||||||
|
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
@@ -30,6 +31,8 @@
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef FL_CRC_DRIVER_ENABLED
|
||||||
|
|
||||||
/* Private macros ------------------------------------------------------------*/
|
/* Private macros ------------------------------------------------------------*/
|
||||||
/** @addtogroup CRC_FL_Private_Macros
|
/** @addtogroup CRC_FL_Private_Macros
|
||||||
* @{
|
* @{
|
||||||
@@ -150,6 +153,8 @@ void FL_CRC_StructInit(FL_CRC_InitTypeDef *CRC_InitStruct)
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#endif /* FL_CRC_DRIVER_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
@@ -158,4 +163,4 @@ void FL_CRC_StructInit(FL_CRC_InitTypeDef *CRC_InitStruct)
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/******************************************* END OF FILE *******************************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
@@ -6,22 +6,22 @@
|
|||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* Copyright (c) [2019] [Fudan Microelectronics]
|
* Copyright (c) [2021] [Fudan Microelectronics]
|
||||||
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
* THIS SOFTWARE is licensed under Mulan PSL v2.
|
||||||
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* You may obtain a copy of Mulan PSL v1 at:
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
* http://license.coscl.org.cn/MulanPSL
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
* PURPOSE.
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
* See the Mulan PSL v1 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*
|
*
|
||||||
*******************************************************************************************************
|
*******************************************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "fm33lc0xx_fl_rcc.h"
|
#include "fm33lc0xx_fl.h"
|
||||||
#include "fm33lc0xx_fl_divas.h"
|
|
||||||
#include "fm33_assert.h"
|
|
||||||
|
|
||||||
/** @addtogroup FM33LC0XX_FL_Driver
|
/** @addtogroup FM33LC0XX_FL_Driver
|
||||||
* @{
|
* @{
|
||||||
@@ -31,6 +31,8 @@
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef FL_DIVAS_DRIVER_ENABLED
|
||||||
|
|
||||||
/* Private macros ------------------------------------------------------------*/
|
/* Private macros ------------------------------------------------------------*/
|
||||||
/** @addtogroup DIVAS_FL_Private_Macros
|
/** @addtogroup DIVAS_FL_Private_Macros
|
||||||
* @{
|
* @{
|
||||||
@@ -144,6 +146,8 @@ uint32_t FL_DIVAS_Hdiv_Calculation(DIV_Type *DIVx, int32_t DivisorEnd, int16_t D
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#endif /* FL_DIVAS_DRIVER_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
@@ -152,4 +156,4 @@ uint32_t FL_DIVAS_Hdiv_Calculation(DIV_Type *DIVx, int32_t DivisorEnd, int16_t D
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/******************************************* END OF FILE *******************************************/
|
/********************** (C) COPYRIGHT Fudan Microelectronics **** END OF FILE ***********************/
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user