Arduino庫和STM32的暫存器、標準庫、HAL庫、LL庫開發比較之GPIO

夢幻之心星發表於2021-07-01

標題: Arduino庫和STM32的暫存器、標準庫、HAL庫、LL庫開發比較之GPIO
作者: 夢幻之心星    sky-seeker@qq.com
標籤: [#Arduino,#STM32,#庫,#開發]
日期: 2021-07-01

背景說明

STM32開發方式

  • 暫存器(STM32Snippets):直接操作暫存器
  • SPL庫(Standard Peripheral Libraries):標準外設庫,將暫存器操作封裝成函式
  • HAL庫(Hardware Abstraction Layer):硬體抽象層,將功能操作封裝成函式
  • LL庫(Low Layer):底層庫,直接操作暫存器

操作說明

操作步驟

Arduino

  1. 配置引腳
  2. 操作引腳

STM32

  1. 配置時鐘
  2. 配置引腳
  3. 操作引腳

操作方法

Arduino

//讀操作
pinMode(3,INPUT);
digitalRead(3);

//寫操作
pinMode(3,OUTPUT);
digitalWrite(3);

STM32

暫存器
//1.配置時鐘 
RCC_APB2ENR |= (1<<3);
//2.配置引腳
GPIOB_CRL &= ~( 0x0F<< (4*0));
GPIOB_CRL |= (1<<4*0);
//3.操作引腳
GPIOB_ODR &= (0<<0);
標準庫
//1.配置時鐘
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
//2.配置引腳
GPIO_InitTypeDef GPIO_InitStructure; 
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7; 
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_10MHz; 
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; 
GPIO_Init(GPIOB, &GPIO_InitStructure); 
//3.操作引腳
ReadValue = GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_7);
HAL庫(支援圖形化初始配置)
//1.配置時鐘
//巨集定義方式
__HAL_RCC_GPIOA_CLK_ENABLE();
//2.配置引腳
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStruct.Pin = GPIO_PIN_1;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
//3.操作引腳
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1, GPIO_PIN_RESET);
LL庫(支援圖形化初始配置)
//1.配置時鐘
//該函式位於stm32f1xx_ll_bus.h
LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_GPIOA);
//2.配置引腳
LL_GPIO_InitTypeDef LL_GPIO_InitStructure;
LL_GPIO_InitStructure.Pin = LL_GPIO_PIN_1;
LL_GPIO_InitStructure.Mode = LL_GPIO_MODE_OUTPUT;
LL_GPIO_InitStructure.Speed = LL_GPIO_SPEED_FREQ_LOW;
LL_GPIO_InitStructure.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
LL_GPIO_InitStructure.Pull = LL_GPIO_PULL_UP;
LL_GPIO_Init(GPIOA, &LL_GPIO_InitStructure);
//3.操作引腳
LL_GPIO_SetOutputPin(GPIOA,LL_GPIO_PIN_1);

GPIO函式庫

Arduino 數字 I/O

digitalRead(pin)
digitalWrite(pin, value)
pinMode(pin, mode)

STM32

標準庫(STM32F103xx)
  • 復位和時鐘設定(RCC)
    void RCC_DeInit(void);
    void RCC_HSEConfig(uint32_t RCC_HSE);
    ErrorStatus RCC_WaitForHSEStartUp(void);
    void RCC_AdjustHSICalibrationValue(uint8_t HSICalibrationValue);
    void RCC_HSICmd(FunctionalState NewState);
    void RCC_PLLConfig(uint32_t RCC_PLLSource, uint32_t RCC_PLLMul);
    void RCC_PLLCmd(FunctionalState NewState);
    void RCC_SYSCLKConfig(uint32_t RCC_SYSCLKSource);
    uint8_t RCC_GetSYSCLKSource(void);
    void RCC_HCLKConfig(uint32_t RCC_SYSCLK);
    void RCC_PCLK1Config(uint32_t RCC_HCLK);
    void RCC_PCLK2Config(uint32_t RCC_HCLK);
    void RCC_ITConfig(uint8_t RCC_IT, FunctionalState NewState);
    void RCC_USBCLKConfig(uint32_t RCC_USBCLKSource);
    void RCC_ADCCLKConfig(uint32_t RCC_PCLK2);
    void RCC_LSEConfig(uint8_t RCC_LSE);
    void RCC_LSICmd(FunctionalState NewState);
    void RCC_RTCCLKConfig(uint32_t RCC_RTCCLKSource);
    void RCC_RTCCLKCmd(FunctionalState NewState);
    void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks);
    void RCC_AHBPeriphClockCmd(uint32_t RCC_AHBPeriph, FunctionalState NewState);
    void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState);
    void RCC_APB1PeriphClockCmd(uint32_t RCC_APB1Periph, FunctionalState NewState);
    void RCC_APB2PeriphResetCmd(uint32_t RCC_APB2Periph, FunctionalState NewState);
    void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState NewState);
    void RCC_BackupResetCmd(FunctionalState NewState);
    void RCC_ClockSecuritySystemCmd(FunctionalState NewState);
    void RCC_MCOConfig(uint8_t RCC_MCO);
    FlagStatus RCC_GetFlagStatus(uint8_t RCC_FLAG);
    void RCC_ClearFlag(void);
    ITStatus RCC_GetITStatus(uint8_t RCC_IT);
    void RCC_ClearITPendingBit(uint8_t RCC_IT);
    
  • 通用輸入/輸出(GPIO)
    void GPIO_DeInit(GPIO_TypeDef* GPIOx);
    void GPIO_AFIODeInit(void);
    void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct);
    void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct);
    uint8_t GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
    uint16_t GPIO_ReadInputData(GPIO_TypeDef* GPIOx);
    uint8_t GPIO_ReadOutputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
    uint16_t GPIO_ReadOutputData(GPIO_TypeDef* GPIOx);
    void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
    void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
    void GPIO_WriteBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, BitAction BitVal);
    void GPIO_Write(GPIO_TypeDef* GPIOx, uint16_t PortVal);
    void GPIO_PinLockConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
    void GPIO_EventOutputConfig(uint8_t GPIO_PortSource, uint8_t GPIO_PinSource);
    void GPIO_EventOutputCmd(FunctionalState NewState);
    void GPIO_PinRemapConfig(uint32_t GPIO_Remap, FunctionalState NewState);
    void GPIO_EXTILineConfig(uint8_t GPIO_PortSource, uint8_t GPIO_PinSource);
    void GPIO_ETH_MediaInterfaceConfig(uint32_t GPIO_ETH_MediaInterface);
    
    
HAL庫
  • 復位和時鐘設定(RCC)
    HAL_StatusTypeDef HAL_RCC_DeInit(void);
    HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct);
    HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency);
    void HAL_RCC_MCOConfig(uint32_t RCC_MCOx, uint32_t RCC_MCOSource, uint32_t RCC_MCODiv);
    void HAL_RCC_EnableCSS(void);
    void HAL_RCC_DisableCSS(void);
    uint32_t HAL_RCC_GetSysClockFreq(void);
    uint32_t HAL_RCC_GetHCLKFreq(void);
    uint32_t HAL_RCC_GetPCLK1Freq(void);
    uint32_t HAL_RCC_GetPCLK2Freq(void);
    void HAL_RCC_GetOscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct);
    void HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency);
    void HAL_RCC_NMI_IRQHandler(void);
    void HAL_RCC_CSSCallback(void);
    HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit);
    void HAL_RCCEx_GetPeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit);
    uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk);
    
  • 通用輸入/輸出(GPIO)
    void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init);
    void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin);
    GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin);
    void HAL_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState);
    void HAL_GPIO_TogglePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin);
    HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin);
    void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin);
    void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin);
    
    void HAL_GPIOEx_ConfigEventout(uint32_t GPIO_PortSource, uint32_t GPIO_PinSource);
    void HAL_GPIOEx_EnableEventout(void);
    void HAL_GPIOEx_DisableEventout(void);
    
LL庫
  • 復位和時鐘設定(RCC)

    void        LL_RCC_GetSystemClocksFreq(LL_RCC_ClocksTypeDef *RCC_Clocks);
    uint32_t    LL_RCC_GetUSBClockFreq(uint32_t USBxSource);
    uint32_t    LL_RCC_GetADCClockFreq(uint32_t ADCxSource);
    __STATIC_INLINE void LL_RCC_HSE_EnableCSS(void)
    __STATIC_INLINE void LL_RCC_HSE_EnableBypass(void)
    __STATIC_INLINE void LL_RCC_HSE_DisableBypass(void)
    __STATIC_INLINE void LL_RCC_HSE_Enable(void)
    __STATIC_INLINE void LL_RCC_HSE_Disable(void)
    __STATIC_INLINE uint32_t LL_RCC_HSE_IsReady(void)
    __STATIC_INLINE uint32_t LL_RCC_HSE_GetPrediv2(void)
    __STATIC_INLINE void LL_RCC_HSI_Enable(void)
    __STATIC_INLINE void LL_RCC_HSI_Disable(void)
    __STATIC_INLINE uint32_t LL_RCC_HSI_IsReady(void)
    __STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibration(void)
    __STATIC_INLINE void LL_RCC_HSI_SetCalibTrimming(uint32_t Value)
    __STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibTrimming(void)
    __STATIC_INLINE void LL_RCC_LSE_Enable(void)
    __STATIC_INLINE void LL_RCC_LSE_Disable(void)
    __STATIC_INLINE void LL_RCC_LSE_EnableBypass(void)
    __STATIC_INLINE void LL_RCC_LSE_DisableBypass(void)
    __STATIC_INLINE uint32_t LL_RCC_LSE_IsReady(void)
    __STATIC_INLINE void LL_RCC_LSI_Enable(void)
    __STATIC_INLINE void LL_RCC_LSI_Disable(void)
    __STATIC_INLINE uint32_t LL_RCC_LSI_IsReady(void)
    __STATIC_INLINE void LL_RCC_SetSysClkSource(uint32_t Source)
    __STATIC_INLINE uint32_t LL_RCC_GetSysClkSource(void)
    __STATIC_INLINE void LL_RCC_SetAHBPrescaler(uint32_t Prescaler)
    __STATIC_INLINE void LL_RCC_SetAPB1Prescaler(uint32_t Prescaler)
    __STATIC_INLINE void LL_RCC_SetAPB2Prescaler(uint32_t Prescaler)
    __STATIC_INLINE uint32_t LL_RCC_GetAHBPrescaler(void)
    __STATIC_INLINE uint32_t LL_RCC_GetAPB1Prescaler(void)
    __STATIC_INLINE uint32_t LL_RCC_GetAPB2Prescaler(void)
    __STATIC_INLINE void LL_RCC_ConfigMCO(uint32_t MCOxSource)
    __STATIC_INLINE void LL_RCC_SetUSBClockSource(uint32_t USBxSource)
    __STATIC_INLINE void LL_RCC_SetADCClockSource(uint32_t ADCxSource)
    __STATIC_INLINE uint32_t LL_RCC_GetUSBClockSource(uint32_t USBx)
    __STATIC_INLINE uint32_t LL_RCC_GetADCClockSource(uint32_t ADCx)
    __STATIC_INLINE void LL_RCC_SetRTCClockSource(uint32_t Source)
    __STATIC_INLINE uint32_t LL_RCC_GetRTCClockSource(void)
    __STATIC_INLINE void LL_RCC_EnableRTC(void)
    __STATIC_INLINE void LL_RCC_DisableRTC(void)
    __STATIC_INLINE uint32_t LL_RCC_IsEnabledRTC(void)
    __STATIC_INLINE void LL_RCC_ForceBackupDomainReset(void)
    __STATIC_INLINE void LL_RCC_ReleaseBackupDomainReset(void)
    __STATIC_INLINE void LL_RCC_PLL_Enable(void)
    __STATIC_INLINE void LL_RCC_PLL_Disable(void)
    __STATIC_INLINE uint32_t LL_RCC_PLL_IsReady(void)
    __STATIC_INLINE void LL_RCC_PLL_ConfigDomain_SYS(uint32_t Source, uint32_t PLLMul)
    __STATIC_INLINE void LL_RCC_PLL_SetMainSource(uint32_t PLLSource)
    __STATIC_INLINE uint32_t LL_RCC_PLL_GetMainSource(void)
    __STATIC_INLINE uint32_t LL_RCC_PLL_GetMultiplicator(void)
    __STATIC_INLINE uint32_t LL_RCC_PLL_GetPrediv(void)
    __STATIC_INLINE void LL_RCC_ClearFlag_LSIRDY(void)
    __STATIC_INLINE void LL_RCC_ClearFlag_LSERDY(void)
    __STATIC_INLINE void LL_RCC_ClearFlag_HSIRDY(void)
    __STATIC_INLINE void LL_RCC_ClearFlag_HSERDY(void)
    __STATIC_INLINE void LL_RCC_ClearFlag_PLLRDY(void)
    __STATIC_INLINE void LL_RCC_ClearFlag_HSECSS(void)
    __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSIRDY(void)
    __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSERDY(void)
    __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSIRDY(void)
    __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSERDY(void)
    __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PLLRDY(void)
    __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSECSS(void)
    __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_IWDGRST(void)
    __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LPWRRST(void)
    __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PINRST(void)
    __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PORRST(void)
    __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_SFTRST(void)
    __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_WWDGRST(void)
    __STATIC_INLINE void LL_RCC_ClearResetFlags(void)
    __STATIC_INLINE void LL_RCC_EnableIT_LSIRDY(void)
    __STATIC_INLINE void LL_RCC_EnableIT_LSERDY(void)
    __STATIC_INLINE void LL_RCC_EnableIT_HSIRDY(void)
    __STATIC_INLINE void LL_RCC_EnableIT_HSERDY(void)
    __STATIC_INLINE void LL_RCC_EnableIT_PLLRDY(void)
    __STATIC_INLINE void LL_RCC_DisableIT_LSIRDY(void)
    __STATIC_INLINE void LL_RCC_DisableIT_LSERDY(void)
    __STATIC_INLINE void LL_RCC_DisableIT_HSIRDY(void)
    __STATIC_INLINE void LL_RCC_DisableIT_HSERDY(void)
    __STATIC_INLINE void LL_RCC_DisableIT_PLLRDY(void)
    __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_LSIRDY(void)
    __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_LSERDY(void)
    __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_HSIRDY(void)
    __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_HSERDY(void)
    __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_PLLRDY(void)
    
    
  • 通用輸入/輸出(GPIO)

    ErrorStatus LL_GPIO_DeInit(GPIO_TypeDef *GPIOx);
    ErrorStatus LL_GPIO_Init(GPIO_TypeDef *GPIOx, LL_GPIO_InitTypeDef *GPIO_InitStruct);
    void LL_GPIO_StructInit(LL_GPIO_InitTypeDef *GPIO_InitStruct);
    __STATIC_INLINE void LL_GPIO_SetPinMode(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Mode)
    __STATIC_INLINE uint32_t LL_GPIO_GetPinMode(GPIO_TypeDef *GPIOx, uint32_t Pin)
    __STATIC_INLINE void LL_GPIO_SetPinSpeed(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t  Speed)
    __STATIC_INLINE uint32_t LL_GPIO_GetPinSpeed(GPIO_TypeDef *GPIOx, uint32_t Pin)
    __STATIC_INLINE void LL_GPIO_SetPinOutputType(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t OutputType)
    __STATIC_INLINE uint32_t LL_GPIO_GetPinOutputType(GPIO_TypeDef *GPIOx, uint32_t Pin)
    __STATIC_INLINE void LL_GPIO_SetPinPull(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Pull)
    __STATIC_INLINE uint32_t LL_GPIO_GetPinPull(GPIO_TypeDef *GPIOx, uint32_t Pin)
    __STATIC_INLINE void LL_GPIO_LockPin(GPIO_TypeDef *GPIOx, uint32_t PinMask)
    __STATIC_INLINE uint32_t LL_GPIO_IsPinLocked(GPIO_TypeDef *GPIOx, uint32_t PinMask)
    __STATIC_INLINE uint32_t LL_GPIO_IsAnyPinLocked(GPIO_TypeDef *GPIOx)
    __STATIC_INLINE uint32_t LL_GPIO_ReadInputPort(GPIO_TypeDef *GPIOx)
    __STATIC_INLINE uint32_t LL_GPIO_IsInputPinSet(GPIO_TypeDef *GPIOx, uint32_t PinMask)
    __STATIC_INLINE void LL_GPIO_WriteOutputPort(GPIO_TypeDef *GPIOx, uint32_t PortValue)
    __STATIC_INLINE uint32_t LL_GPIO_ReadOutputPort(GPIO_TypeDef *GPIOx)
    __STATIC_INLINE uint32_t LL_GPIO_IsOutputPinSet(GPIO_TypeDef *GPIOx, uint32_t PinMask)
    __STATIC_INLINE void LL_GPIO_SetOutputPin(GPIO_TypeDef *GPIOx, uint32_t PinMask)
    __STATIC_INLINE void LL_GPIO_ResetOutputPin(GPIO_TypeDef *GPIOx, uint32_t PinMask)
    __STATIC_INLINE void LL_GPIO_TogglePin(GPIO_TypeDef *GPIOx, uint32_t PinMask)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_SPI1(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_SPI1(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_SPI1(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_I2C1(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_I2C1(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_I2C1(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_USART1(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_USART1(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_USART1(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_USART2(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_USART2(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_USART2(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_USART3(void)
    __STATIC_INLINE void LL_GPIO_AF_RemapPartial_USART3(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_USART3(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM1(void)
    __STATIC_INLINE void LL_GPIO_AF_RemapPartial_TIM1(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM1(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM2(void)
    __STATIC_INLINE void LL_GPIO_AF_RemapPartial2_TIM2(void)
    __STATIC_INLINE void LL_GPIO_AF_RemapPartial1_TIM2(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM2(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM3(void)
    __STATIC_INLINE void LL_GPIO_AF_RemapPartial_TIM3(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM3(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM4(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM4(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_TIM4(void)
    __STATIC_INLINE void LL_GPIO_AF_RemapPartial1_CAN1(void)
    __STATIC_INLINE void LL_GPIO_AF_RemapPartial2_CAN1(void)
    __STATIC_INLINE void LL_GPIO_AF_RemapPartial3_CAN1(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_PD01(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_PD01(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_PD01(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM5CH4(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM5CH4(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_TIM5CH4(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_ETH(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_ETH(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_ETH(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_CAN2(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_CAN2(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_CAN2(void)
    __STATIC_INLINE void LL_GPIO_AF_Select_ETH_RMII(void)
    __STATIC_INLINE void LL_GPIO_AF_Select_ETH_MII(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_ADC1_ETRGINJ(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_ADC1_ETRGINJ(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_ADC1_ETRGINJ(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_ADC1_ETRGREG(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_ADC1_ETRGREG(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_ADC1_ETRGREG(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_ADC2_ETRGINJ(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_ADC2_ETRGINJ(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_ADC2_ETRGINJ(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_ADC2_ETRGREG(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_ADC2_ETRGREG(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_ADC2_ETRGREG(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_SWJ(void)
    __STATIC_INLINE void LL_GPIO_AF_Remap_SWJ_NONJTRST(void)
    __STATIC_INLINE void LL_GPIO_AF_Remap_SWJ_NOJTAG(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_SWJ(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_SPI3(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_SPI3(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_SPI3(void)
    __STATIC_INLINE void LL_GPIO_AF_Remap_TIM2ITR1_TO_USB(void)
    __STATIC_INLINE void LL_GPIO_AF_Remap_TIM2ITR1_TO_ETH(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_ETH_PTP_PPS(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_ETH_PTP_PPS(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM9(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM9(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_TIM9(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM10(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM10(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_TIM10(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM11(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM11(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_TIM11(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM13(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM13(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_TIM13(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM14(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM14(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_TIM14(void)
    __STATIC_INLINE void LL_GPIO_AF_Disconnect_FSMCNADV(void)
    __STATIC_INLINE void LL_GPIO_AF_Connect_FSMCNADV(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM15(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM15(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_TIM15(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM16(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM16(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_TIM16(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM17(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM17(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_TIM17(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_CEC(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_CEC(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_CEC(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM1DMA(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM1DMA(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_TIM1DMA(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM67DACDMA(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM67DACDMA(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_TIM67DACDMA(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_TIM12(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_TIM12(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_TIM12(void)
    __STATIC_INLINE void LL_GPIO_AF_EnableRemap_MISC(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableRemap_MISC(void)
    __STATIC_INLINE uint32_t LL_GPIO_AF_IsEnabledRemap_MISC(void)
    __STATIC_INLINE void LL_GPIO_AF_ConfigEventout(uint32_t LL_GPIO_PortSource, uint32_t LL_GPIO_PinSource)
    __STATIC_INLINE void LL_GPIO_AF_EnableEventout(void)
    __STATIC_INLINE void LL_GPIO_AF_DisableEventout(void)
    __STATIC_INLINE void LL_GPIO_AF_SetEXTISource(uint32_t Port, uint32_t Line)
    __STATIC_INLINE uint32_t LL_GPIO_AF_GetEXTISource(uint32_t Line)
    

相關說明

STM32庫的可用性
ST嵌入式軟體支援包比較
ST嵌入式軟體支援包
ST嵌入式軟體支援包定位
支援包的遷移性

參考資料

  • 《STM32F103xB_User_Manual.chm》(Drivers\STM32F1xx_HAL_Driver)
  • 《stm32f10x_stdperiph_lib_um.chm》(STM32F1xx_DFP\Device\StdPeriph_Driver)
  • 《STM32韌體庫使用手冊(中文)》
  • 《零死角玩轉STM32—F103霸道》
  • 《STM32 HAL庫開發實戰指南——F103系列》

版權宣告:本文為「夢幻之心星」原創,依據 CC BY-NC-SA 4.0 許可證進行授權,轉載請附上原文出處連結及本宣告。


部落格園地址:https://www.cnblogs.com/Sky-seeker
微信公眾號:關注微信公眾號,獲取即時推送
微信名:夢幻之心星 微訊號:Sky-seeker


相關文章