STM32在进行IO翻转操作的时候可以使用以下方法:以PE.5为例

GPIO_WriteBit(GPIOE,GPIO_Pin_5,(BitAction)(1-(GPIO_ReadOutputDataBit(GPIOE,GPIO_Pin_5))));
GPIO_WriteBit(GPIOE, GPIO_Pin_5, (BitAction)!GPIO_ReadOutputDataBit(GPIOE, GPIO_Pin_5))
GPIOE->ODR ^= GPIO_Pin_5
GPIO_ToggleBits(GPIOE, GPIO_Pin_5)/*有的版本不存在*/

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2021-10-23
猜你喜欢
  • 2021-07-22
  • 2022-12-23
  • 2021-11-11
  • 2022-12-23
  • 2021-08-11
  • 2021-07-06
  • 2022-12-23
相关资源
相似解决方案