Arduino库和STM32的寄存器、标准库、HAL库、LL库开发比较之GPIO
背景说明
STM32 开发方式
- 寄存器(STM32Snippets):直接操作寄存器
- SPL 库(Standard Peripheral Libraries):标准外设库,将寄存器操作封装成函数
- HAL 库(Hardware Abstraction Layer):硬件抽象层,将功能操作封装成函数
- LL 库(Low Layer):底层库,直接操作寄存器
操作说明
操作原理
Arduino操作原理
- 配置引脚
- 操作引脚
STM32操作原理
- 配置时钟
- 配置引脚
- 操作引脚
操作方法
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)
相关说明
参考资料
- 《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
微信公众号:关注微信公众号,获取即时推送