/******************************************************************************* * Copyright (C) 2018, Huada Semiconductor Co.,Ltd All rights reserved. * * This software is owned and published by: * Huada Semiconductor Co.,Ltd ("HDSC"). * * BY DOWNLOADING, INSTALLING OR USING THIS SOFTWARE, YOU AGREE TO BE BOUND * BY ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT. * * This software contains source code for use with HDSC * components. This software is licensed by HDSC to be adapted only * for use in systems utilizing HDSC components. HDSC shall not be * responsible for misuse or illegal use of this software for devices not * supported herein. HDSC is providing this software "AS IS" and will * not be responsible for issues arising from incorrect user implementation * of the software. * * Disclaimer: * HDSC MAKES NO WARRANTY, EXPRESS OR IMPLIED, ARISING BY LAW OR OTHERWISE, * REGARDING THE SOFTWARE (INCLUDING ANY ACOOMPANYING WRITTEN MATERIALS), * ITS PERFORMANCE OR SUITABILITY FOR YOUR INTENDED USE, INCLUDING, * WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY, THE IMPLIED * WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE OR USE, AND THE IMPLIED * WARRANTY OF NONINFRINGEMENT. * HDSC SHALL HAVE NO LIABILITY (WHETHER IN CONTRACT, WARRANTY, TORT, * NEGLIGENCE OR OTHERWISE) FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT * LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, * LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING FROM USE OR * INABILITY TO USE THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS OF DATA, * SAVINGS OR PROFITS, * EVEN IF Disclaimer HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * YOU ASSUME ALL RESPONSIBILITIES FOR SELECTION OF THE SOFTWARE TO ACHIEVE YOUR * INTENDED RESULTS, AND FOR THE INSTALLATION OF, USE OF, AND RESULTS OBTAINED * FROM, THE SOFTWARE. * * This software may be replicated in part or whole for the licensed use, * with the restriction that this Disclaimer and Copyright notice must be * included with each copy of this software, whether used in part or whole, * at all times. */ /******************************************************************************/ /** \file gpio.h ** ** GPIO driver ** @link GPIO Group Some description @endlink ** ** - 2018-04-18 ** ******************************************************************************/ #ifndef __GPIO_H__ #define __GPIO_H__ /******************************************************************************* * Include files ******************************************************************************/ #include "hc32l196_ddl.h" /* C binding of definitions if building with C++ compiler */ #ifdef __cplusplus extern "C" { #endif /** ******************************************************************************* ** \defgroup GpioGroup General Purpose I/O (GPIO) ** ** ******************************************************************************/ //@{ #define GPIO_GPSZ (0x40u) /******************************************************************************* * Global type definitions ******************************************************************************/ /** ******************************************************************************* ** \brief GPIO PORT类型定义 ******************************************************************************/ typedef enum en_gpio_port { GpioPortA = 0x00u, ///< GPIO PORT A GpioPortB = 0x40u, ///< GPIO PORT B GpioPortC = 0x80u, ///< GPIO PORT C GpioPortD = 0xc0u, ///< GPIO PORT D GpioPortE = 0x1000u, ///< GPIO PORT E GpioPortF = 0x1040u, ///< GPIO PORT F }en_gpio_port_t; /** ******************************************************************************* ** \brief GPIO PIN类型定义 ******************************************************************************/ typedef enum en_gpio_pin { GpioPin0 = 0u, ///< GPIO PIN0 GpioPin1 = 1u, ///< GPIO PIN1 GpioPin2 = 2u, ///< GPIO PIN2 GpioPin3 = 3u, ///< GPIO PIN3 GpioPin4 = 4u, ///< GPIO PIN4 GpioPin5 = 5u, ///< GPIO PIN5 GpioPin6 = 6u, ///< GPIO PIN6 GpioPin7 = 7u, ///< GPIO PIN7 GpioPin8 = 8u, ///< GPIO PIN8 GpioPin9 = 9u, ///< GPIO PIN9 GpioPin10 = 10u, ///< GPIO PIN10 GpioPin11 = 11u, ///< GPIO PIN11 GpioPin12 = 12u, ///< GPIO PIN12 GpioPin13 = 13u, ///< GPIO PIN13 GpioPin14 = 14u, ///< GPIO PIN14 GpioPin15 = 15u, ///< GPIO PIN15 }en_gpio_pin_t; /** ******************************************************************************* ** \brief GPIO 端口复用功能(AF-Alternate function)类型定义 ** \note 具体功能及含义请参考用户手册GPIO复用表或下表 ******************************************************************************/ typedef enum en_gpio_af { GpioAf0 = 0u, ///< GPIO功能 GpioAf1 = 1u, ///< GPIO AF1:复用功能1 GpioAf2 = 2u, ///< GPIO AF2:复用功能2 GpioAf3 = 3u, ///< GPIO AF3:复用功能3 GpioAf4 = 4u, ///< GPIO AF4:复用功能4 GpioAf5 = 5u, ///< GPIO AF5:复用功能5 GpioAf6 = 6u, ///< GPIO AF6:复用功能6 GpioAf7 = 7u, ///< GPIO AF7:复用功能7 }en_gpio_af_t; ///*||======||=============||=============||=============||=============||=============||=============||=============||*/// ///*||PSEL || GpioAf1 || GpioAf2 || GpioAf3 || GpioAf4 || GpioAf5 || GpioAf6 || GpioAf7 ||*/// ///*||======||=============||=============||=============||=============||=============||=============||=============||*/// ///*||PA00 ||UART1_CTS ||LPUART1_TXD ||TIM0_ETR ||VC0_OUT ||TIM1_CHA ||TIM3_ETR ||TIM0_CHA ||*/// ///*||PA01 ||UART1_RTS ||LPUART1_RXD ||TIM0_CHB ||TIM1_ETR ||TIM1_CHB ||HCLK_OUT ||SPI1_MOSI ||*/// ///*||PA02 ||UART1_TXD ||TIM0_CHA ||VC1_OUT ||TIM1_CHA ||TIM2_CHA ||PCLK_OUT ||SPI1_MISO ||*/// ///*||PA03 ||UART1_RXD ||TIM0_GATE ||TIM1_CHB ||TIM2_CHB ||SPI1_CS ||TIM3_CH1A ||TIM5_CHA ||*/// ///*||PA04 ||SPI0_CS ||UART1_TXD ||PCA_CH4 ||TIM2_ETR ||TIM5_CHA ||LVD_OUT ||TIM3_CH2B ||*/// ///*||PA05 ||SPI0_SCK ||TIM0_ETR ||PCA_ECI ||TIM0_CHA ||TIM5_CHB ||XTL_OUT ||XTH_OUT ||*/// ///*||PA06 ||SPI0_MISO ||PCA_CH0 ||TIM3_BK ||TIM1_CHA ||VC0_OUT ||TIM3_GATE ||LPUART0_CTS ||*/// ///*||PA07 ||SPI0_MOSI ||PCA_CH1 ||HCLK_OUT ||TIM3_CH0B ||TIM2_CHA ||VC1_OUT ||TIM4_CHB ||*/// ///*||PA08 ||UART0_TXD ||TIM3_CH0A || || ||TIM1_GATE ||TIM4_CHA ||TIM3_BK ||*/// ///*||PA09 ||UART0_TXD ||TIM3_CH1A ||TIM0_BK ||I2C0_SCL || ||HCLK_OUT ||TIM5_CHA ||*/// ///*||PA10 ||UART0_RXD ||TIM3_CH2A ||TIM2_BK ||I2C0_SDA ||TIM2_GATE ||PCLK_OUT ||TIM6_CHA ||*/// ///*||PA11 ||UART0_CTS ||TIM3_GATE ||I2C1_SCL || ||VC0_OUT ||SPI0_MISO ||TIM4_CHB ||*/// ///*||PA12 ||UART0_RTS ||TIM3_ETR ||I2C1_SDA || ||VC1_OUT ||SPI0_MOSI ||PCNT_S0 ||*/// ///*||PA13 ||IR_OUT ||UART0_RXD ||LVD_OUT ||TIM3_ETR ||RTC_1HZ ||PCNT_S1 ||VC2_OUT ||*/// ///*||PA14 ||UART1_TXD ||UART0_TXD ||TIM3_CH2A ||LVD_OUT ||RCH_OUT ||RCL_OUT ||PLL_OUT ||*/// ///*||PA15 ||SPI0_CS ||UART1_RXD ||LPUART1_RTS ||TIM0_ETR ||TIM0_CHA ||TIM3_CH1A || ||*/// ///*||PB00 ||PCA_CH2 ||TIM3_CH1B ||LPUART0_TXD ||TIM5_CHB ||RCH_OUT ||RCL_OUT ||PLL_OUT ||*/// ///*||PB01 ||PCA_CH3 ||PCLK_OUT ||TIM3_CH2B ||TIM6_CHB ||LPUART0_RTS ||VC2_OUT ||TCLK_OUT  ||*/// ///*||PB02 ||LPTIM_TOG ||PCA_ECI ||LPUART1_TXD ||TIM4_CHA ||TIM1_BK ||TIM0_BK ||TIM2_BK ||*/// ///*||PB03 ||SPI0_SCK ||TIM0_CHB ||TIM1_GATE ||TIM3_CH0A ||LPTIM_GATE ||XTL_OUT ||XTH_OUT ||*/// ///*||PB04 ||SPI0_MISO ||PCA_CH0 ||TIM2_BK ||UART0_CTS ||TIM2_GATE ||TIM3_CH0B ||LPTIM_ETR ||*/// ///*||PB05 ||SPI0_MOSI || ||TIM1_BK ||PCA_CH1 ||LPTIM_GATE ||PCNT_S0 ||UART0_RTS ||*/// ///*||PB06 ||I2C0_SCL ||UART0_TXD ||TIM1_CHB ||TIM0_CHA ||LPTIM_ETR ||TIM3_CH0A ||LPTIM_TOG ||*/// ///*||PB07 ||I2C0_SDA ||UART0_RXD ||TIM2_CHB ||LPUART1_CTS ||TIM0_CHB ||LPTIM_TOGN ||PCNT_S1 ||*/// ///*||PB08 ||I2C0_SCL ||TIM1_CHA || ||TIM2_CHA ||TIM0_GATE ||TIM3_CH2A ||UART0_TXD ||*/// ///*||PB09 ||I2C0_SDA ||IR_OUT ||SPI1_CS ||TIM2_CHA || ||TIM2_CHB ||UART0_RXD ||*/// ///*||PB10 ||I2C1_SCL ||SPI1_SCK ||TIM1_CHA ||LPUART0_TXD ||TIM3_CH1A ||LPUART1_RTS ||UART1_RTS ||*/// ///*||PB11 ||I2C1_SDA ||TIM1_CHB ||LPUART0_RXD ||TIM2_GATE ||TIM6_CHA ||LPUART1_CTS ||UART1_CTS ||*/// ///*||PB12 ||SPI1_CS ||TIM3_BK ||LPUART0_TXD ||TIM0_BK || ||LPUART0_RTS ||TIM6_CHA ||*/// ///*||PB13 ||SPI1_SCK ||I2C1_SCL ||TIM3_CH0B ||LPUART0_CTS ||TIM1_CHA ||TIM1_GATE ||TIM6_CHB ||*/// ///*||PB14 ||SPI1_MISO ||I2C1_SDA ||TIM3_CH1B ||TIM0_CHA ||RTC_1HZ ||LPUART0_RTS ||TIM1_BK ||*/// ///*||PB15 ||SPI1_MOSI ||TIM3_CH2B ||TIM0_CHB ||TIM0_GATE || || ||LPUART1_RXD ||*/// ///*||PC00 ||LPTIM_GATE ||PCNT_S0 ||UART1_CTS ||UART2_RTS || || || ||*/// ///*||PC01 ||LPTIM_TOG ||TIM5_CHB ||UART1_RTS ||PCNT_S0FO || ||UART2_CTS || ||*/// ///*||PC02 ||SPI1_MISO ||LPTIM_TOGN ||PCNT_S1 ||UART2_RXD || || || ||*/// ///*||PC03 ||SPI1_MOSI ||LPTIM_ETR ||LPTIM_TOGN ||PCNT_S1FO ||UART2_TXD || || ||*/// ///*||PC04 ||LPUART0_TXD ||TIM2_ETR ||IR_OUT ||VC2_OUT || || || ||*/// ///*||PC05 ||LPUART0_RXD ||TIM6_CHB ||PCA_CH4 || || || || ||*/// ///*||PC06 ||PCA_CH0 ||TIM4_CHA ||TIM2_CHA ||LPTIM1_GATE || ||UART3_RXD || ||*/// ///*||PC07 ||PCA_CH1 ||TIM5_CHA ||TIM2_CHB ||LPTIM1_ETR || ||UART3_TXD || ||*/// ///*||PC08 ||PCA_CH2 ||TIM6_CHA ||TIM2_ETR ||LPTIM1_TOG || ||UART3_CTS || ||*/// ///*||PC09 ||PCA_CH3 ||TIM4_CHB ||TIM1_ETR ||LPTIM1_TOGN || ||UART3_RTS || ||*/// ///*||PC10 ||LPUART1_TXD ||LPUART0_TXD ||PCA_CH2 || || || || ||*/// ///*||PC11 ||LPUART1_RXD ||LPUART0_RXD ||PCA_CH3 ||PCNT_S0FO || || || ||*/// ///*||PC12 ||LPUART0_TXD ||LPUART1_TXD ||PCA_CH4 ||PCNT_S1FO || || || ||*/// ///*||PC13 || ||RTC_1HZ ||TIM3_CH1B || || || || ||*/// ///*||PC14 || || || || || || || ||*/// ///*||PC15 || || || || || || || ||*/// ///*||PD00 || ||SPI1_CS || || || || || ||*/// ///*||PD01 || ||SPI1_SCK || || || || || ||*/// ///*||PD02 ||PCA_ECI ||LPUART0_RTS ||TIM1_ETR || || || || ||*/// ///*||PD03 ||UART1_CTS ||SPI1_MISO ||LPTIM1_TOG || || || || ||*/// ///*||PD04 ||UART1_RTS ||SPI1_MOSI ||LPTIM1_TOGN || || || || ||*/// ///*||PD05 ||UART1_TXD ||LPTIM1_GATE || || || || || ||*/// ///*||PD06 ||UART1_RXD ||LPTIM1_ETR || || || || || ||*/// ///*||PD07 ||UART1_TXD || || || || || || ||*/// ///*||PD08 ||LPUART0_TXD || || || || || || ||*/// ///*||PD09 ||LPUART0_RXD || || || || || || ||*/// ///*||PD10 ||LPUART0_TXD || || || || || || ||*/// ///*||PD11 ||LPUART0_CTS || || || || || || ||*/// ///*||PD12 ||LPUART0_RTS ||UART2_RTS || || || || || ||*/// ///*||PD13 ||UART2_RXD || || || || || || ||*/// ///*||PD14 ||UART2_TXD || || || || || || ||*/// ///*||PD15 || ||UART2_CTS || || || || || ||*/// ///*||PE00 ||TIM1_CHA || || || || || || ||*/// ///*||PE01 ||TIM2_CHA || || || || || || ||*/// ///*||PE02 ||PCA_ECI || || || || || || ||*/// ///*||PE03 ||PCA_CH0 || || || || || || ||*/// ///*||PE04 ||PCA_CH1 || || || || || || ||*/// ///*||PE05 ||PCA_CH2 || || || || || || ||*/// ///*||PE06 ||PCA_CH3 || || || || || || ||*/// ///*||PE07 ||TIM3_ETR ||LPTIM1_GATE || || || || || ||*/// ///*||PE08 ||TIM3_CH0B ||LPTIM1_ETR || || || || || ||*/// ///*||PE09 ||TIM3_CH0A ||LPTIM1_TOG || || || || || ||*/// ///*||PE10 ||TIM3_CH1B ||LPTIM1_TOGN || || || || || ||*/// ///*||PE11 ||TIM3_CH1A || || || || || || ||*/// ///*||PE12 ||TIM3_CH2B ||SPI0_CS ||UART3_CTS || || || || ||*/// ///*||PE13 ||TIM3_CH2A ||SPI0_SCK ||UART3_RTS || || || || ||*/// ///*||PE14 ||TIM3_CH0B ||SPI0_MISO ||UART3_RXD || || || || ||*/// ///*||PE15 ||TIM3_BK ||SPI0_MOSI ||UART3_TXD || || || || ||*/// ///*||PF00 ||I2C0_SDA || ||UART1_TXD || || || || ||*/// ///*||PF01 ||I2C0_SCL ||TIM4_CHB ||UART1_RXD || || || || ||*/// ///*||PF02 || || || || || || || ||*/// ///*||PF03 || || || || || || || ||*/// ///*||PF04 || || || || || || || ||*/// ///*||PF05 || || || || || || || ||*/// ///*||PF06 ||I2C1_SCL ||LPUART1_CTS ||UART0_CTS || || || || ||*/// ///*||PF07 ||I2C1_SDA ||LPUART1_RTS ||UART0_RTS || || || || ||*/// ///*||PF09 ||TIM0_CHA || || || || || || ||*/// ///*||PF10 ||TIM0_CHB || || || || || || ||*/// ///*||PF11 || || || || || || || ||*/// ///*||======||=============||=============||=============||=============||=============||=============||=============||*/// /** ******************************************************************************* ** \brief GPIO输入输出配置数据类型定义 ******************************************************************************/ typedef enum en_gpio_dir { GpioDirOut = 0u, ///< GPIO 输出 GpioDirIn = 1u, ///< GPIO 输入 }en_gpio_dir_t; /** ******************************************************************************* ** \brief GPIO端口上拉配置数据类型定义 ******************************************************************************/ typedef enum en_gpio_pu { GpioPuDisable = 0u, ///< GPIO无上拉 GpioPuEnable = 1u, ///< GPIO上拉 }en_gpio_pu_t; /** ******************************************************************************* ** \brief GPIO端口下拉配置数据类型定义 ******************************************************************************/ typedef enum en_gpio_pd { GpioPdDisable = 0u, ///< GPIO无下拉 GpioPdEnable = 1u, ///< GPIO下拉 }en_gpio_pd_t; /** ******************************************************************************* ** \brief GPIO端口输出驱动能力配置数据类型定义 ******************************************************************************/ typedef enum en_gpio_drv { GpioDrvH = 0u, ///< GPIO高驱动能力 GpioDrvL = 1u, ///< GPIO低驱动能力 }en_gpio_drv_t; /** ******************************************************************************* ** \brief GPIO端口开漏输出控制数据类型定义 ******************************************************************************/ typedef enum en_gpio_od { GpioOdDisable = 0u, ///< GPIO开漏输出关闭 GpioOdEnable = 1u, ///< GPIO开漏输出使能 }en_gpio_od_t; /** ******************************************************************************* ** \brief GPIO端口输入/输出值寄存器总线控制模式选择 ******************************************************************************/ typedef enum en_gpio_ctrl_mode { GpioFastIO = 0u, ///< FAST IO 总线控制模式 GpioAHB = 1u, ///< AHB 总线控制模式 }en_gpio_ctrl_mode_t; /** ******************************************************************************* ** \brief GPIO中断触发方式类型定义 ******************************************************************************/ typedef enum en_gpio_irqtype { GpioIrqHigh = 0u, ///< GPIO高电平触发 GpioIrqLow = 1u, ///< GPIO低电平触发 GpioIrqRising = 2u, ///< GPIO上升沿触发 GpioIrqFalling = 3u, ///< GPIO下降沿触发 }en_gpio_irqtype_t; /** ******************************************************************************* ** \brief GPIO 辅助功能(SF-Secondary Function)端口中断模式类型定义 ******************************************************************************/ typedef enum en_gpio_sf_irqmode { GpioSfIrqDpslpMode = 1u, ///< Deep Sleep模式 GpioSfIrqActSlpMode = 0u, ///< Active/Sleep模式 }en_gpio_sf_irqmode_t; /** ******************************************************************************* ** \brief GPIO 辅助功能(SF-Secondary Function)HCLK输出门控类型定义 ******************************************************************************/ typedef enum en_gpio_sf_hclkout_g { GpioSfHclkOutDisable = 0u, ///< HCLK输出门控关闭 GpioSfHclkOutEnable = 1u, ///< HCLK输出门控使能 }en_gpio_sf_hclkout_g_t; /** ******************************************************************************* ** \brief GPIO 辅助功能(SF-Secondary Function)HCLK输出分频选择类型定义 ******************************************************************************/ typedef enum en_gpio_sf_hclkout_div { GpioSfHclkOutDiv1 = 0u, ///< HCLK GpioSfHclkOutDiv2 = 1u, ///< HCLK/2 GpioSfHclkOutDiv4 = 2u, ///< HCLK/4 GpioSfHclkOutDiv8 = 3u, ///< HCLK/8 }en_gpio_sf_hclkout_div_t; /** ******************************************************************************* ** \brief GPIO 辅助功能(SF-Secondary Function)PCLK输出门控类型定义 ******************************************************************************/ typedef enum en_gpio_sf_pclkout_g { GpioSfPclkOutDisable = 0u, ///< PCLK输出门控关闭 GpioSfPclkOutEnable = 1u, ///< PCLK输出门控使能 }en_gpio_sf_pclkout_g_t; /** ******************************************************************************* ** \brief GPIO 辅助功能(SF-Secondary Function)PCLK输出分频选择类型定义 ******************************************************************************/ typedef enum en_gpio_sf_pclkout_div { GpioSfPclkOutDiv1 = 0u, ///< PCLK GpioSfPclkOutDiv2 = 1u, ///< PCLK/2 GpioSfPclkOutDiv4 = 2u, ///< PCLK/4 GpioSfPclkOutDiv8 = 3u, ///< PCLK/8 }en_gpio_sf_pclkout_div_t; /** ******************************************************************************* ** \brief GPIO 辅助功能(SF-Secondary Function)IR输出极性选择类型定义 ******************************************************************************/ typedef enum en_gpio_sf_irpol { GpioSfIrP = 0u, ///< IR正向输出 GpioSfIrN = 1u, ///< IR反向输出 }en_gpio_sf_irpol_t; /** ******************************************************************************* ** \brief GPIO 辅助功能(SF-Secondary Function)SSN通道类型定义 ******************************************************************************/ typedef enum en_gpio_sf_ssnspi { GpioSpi0 = 0u, ///< SPI0 SSN GpioSpi1 = 1u, ///< SPI1 SSN }en_gpio_sf_ssnspi_t; /** ******************************************************************************* ** \brief GPIO 辅助功能(SF-Secondary Function)SSN与外部时钟输入信号源选择类型定义 ******************************************************************************/ typedef enum en_gpio_sf_ssn_extclk { GpioSfSsnExtClkH = 0u, ///< 高电平 GpioSfSsnExtClkPA03 = 1u, ///< PA03 GpioSfSsnExtClkPA04 = 2u, ///< PA04 GpioSfSsnExtClkPA06 = 3u, ///< PA06 GpioSfSsnExtClkPA08 = 4u, ///< PA08 GpioSfSsnExtClkPA09 = 5u, ///< PA09 GpioSfSsnExtClkPA12 = 6u, ///< PA12 GpioSfSsnExtClkPA15 = 7u, ///< PA15 GpioSfSsnExtClkPB01 = 8u, ///< PB01 GpioSfSsnExtClkPB02 = 9u, ///< PB02 GpioSfSsnExtClkPB05 = 10u, ///< PB05 GpioSfSsnExtClkPB06 = 11u, ///< PB06 GpioSfSsnExtClkPB09 = 12u, ///< PB09 GpioSfSsnExtClkPB10 = 13u, ///< PB10 GpioSfSsnExtClkPB12 = 14u, ///< PB12 GpioSfSsnExtClkPB14 = 15u, ///< PB14 }en_gpio_sf_ssn_extclk_t; /** ******************************************************************************* ** \brief GPIO 辅助功能(SF-Secondary Function)定时器互联功能选择类型定义 ** \note 具体功能及含义请参考用户手册GPIO辅助寄存器描述 ******************************************************************************/ typedef enum en_gpio_sf { GpioSf0 = 0u, ///< SF0:PX_SEL的配置功能 GpioSf1 = 1u, ///< SF1:辅助功能1 GpioSf2 = 2u, ///< SF2:辅助功能2 GpioSf3 = 3u, ///< SF3:辅助功能3 GpioSf4 = 4u, ///< SF4:辅助功能4 GpioSf5 = 5u, ///< SF5:辅助功能5 GpioSf6 = 6u, ///< SF6:辅助功能6 GpioSf7 = 7u, ///< SF7:辅助功能7 }en_gpio_sf_t; /** ******************************************************************************* ** \brief GPIO 辅助功能(SF-Secondary Function)定时器门控类型选择数据类型定义 ******************************************************************************/ typedef enum en_gpio_sf_tim_g { GpioSfTim0G = 0u, ///