未验证 提交 265577ee 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #3182 from balanceTWK/master_doc

[stm32][doc] update STM32系列外设驱动添加指南.md
......@@ -144,3 +144,18 @@
![adc 编译](figures/adc_config3.png)
![adc 编译](figures/adc_config4.png)
#### 5.3.4 编码器外设驱动添加说明
1. 打开 STM32CubeMX 工程,设置 TIMER 在 Cube 里的选项,如下图所示:
![pulse_encoder CubeMX 配置](figures/pulse_encoder_config1.png)
2. 打开 stm32/stm32f407-atk-explorer/board/Kconfig ,添加 Kconfig 选项。选中自己添加的选项后,生成一遍工程,如下图所示:
![pulse_encoder Kconfig 配置](figures/pulse_encoder_config2.png)
3. 打开工程进行编译,工程会提示 PULSE_ENCODER4_CONFIG 未定义。 可以在 stm32/libraries/HAL_Drivers/config/f4/pulse_encoder_config.h 中进行定义,如下图所示:
![pulse_encoder 编译](figures/pulse_encoder_config3.png)
![pulse_encoder 编译](figures/pulse_encoder_config4.png)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册