你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

基于stm32f1的使能5个串口经验分享

[复制链接]
攻城狮Melo 发布时间:2023-3-14 13:23
  1. #define BSP_USING_UART1
  2. #define BSP_USING_UART2
  3. #define BSP_USING_UART3
  4. #define BSP_USING_UART4
  5. #define BSP_USING_UART5


  6. #if defined(BSP_USING_UART1)
  7. #define UART1_TX_PORT       GPIOA
  8. #define UART1_RX_PORT       GPIOA
  9. #define UART1_TX_PIN        GPIO_PIN_9
  10. #define UART1_RX_PIN        GPIO_PIN_10
  11. #endif
  12. #if defined(BSP_USING_UART2)
  13. #define UART2_TX_PORT       GPIOA
  14. #define UART2_RX_PORT       GPIOA
  15. #define UART2_TX_PIN        GPIO_PIN_2
  16. #define UART2_RX_PIN        GPIO_PIN_3
  17. #endif
  18. #if defined(BSP_USING_UART3)
  19. #define UART3_TX_PORT       GPIOB
  20. #define UART3_RX_PORT       GPIOB
  21. #define UART3_TX_PIN        GPIO_PIN_10
  22. #define UART3_RX_PIN        GPIO_PIN_11
  23. #endif
  24. #if defined(BSP_USING_UART4)
  25. #define UART4_TX_PORT       GPIOC
  26. #define UART4_RX_PORT       GPIOC
  27. #define UART4_TX_PIN        GPIO_PIN_10
  28. #define UART4_RX_PIN        GPIO_PIN_11
  29. #endif
  30. #if defined(BSP_USING_UART5)
  31. #define UART5_TX_PORT       GPIOC
  32. #define UART5_RX_PORT       GPIOD
  33. #define UART5_TX_PIN        GPIO_PIN_12
  34. #define UART5_RX_PIN        GPIO_PIN_2
  35. #endif

复制代码
转载自:小盼你最萌哒
如有侵权请联系删除

收藏 评论0 发布时间:2023-3-14 13:23

举报

0个回答

所属标签

相似分享

官网相关资源

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32N6 AI生态系统
STM32MCU,MPU高性能GUI
ST ACEPACK电源模块
意法半导体生物传感器
STM32Cube扩展软件包
关注我们
st-img 微信公众号
st-img 手机版