Merge pull request #3182 from balanceTWK/master_doc
[stm32][doc] update STM32系列外设驱动添加指南.md
This commit is contained in:
commit
265577ee08
|
@ -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)
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 110 KiB |
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
Binary file not shown.
After Width: | Height: | Size: 82 KiB |
Loading…
Reference in New Issue