mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-20 20:57:12 +08:00
Merge pull request #3182 from balanceTWK/master_doc
[stm32][doc] update STM32系列外设驱动添加指南.md
This commit is contained in:
commit
265577ee08
@ -144,3 +144,18 @@
|
||||
|
||||

|
||||

|
||||
|
||||
#### 5.3.4 编码器外设驱动添加说明
|
||||
|
||||
1. 打开 STM32CubeMX 工程,设置 TIMER 在 Cube 里的选项,如下图所示:
|
||||
|
||||

|
||||
|
||||
2. 打开 stm32/stm32f407-atk-explorer/board/Kconfig ,添加 Kconfig 选项。选中自己添加的选项后,生成一遍工程,如下图所示:
|
||||
|
||||

|
||||
|
||||
3. 打开工程进行编译,工程会提示 PULSE_ENCODER4_CONFIG 未定义。 可以在 stm32/libraries/HAL_Drivers/config/f4/pulse_encoder_config.h 中进行定义,如下图所示:
|
||||
|
||||

|
||||

|
||||
|
BIN
bsp/stm32/docs/figures/pulse_encoder_config1.png
Normal file
BIN
bsp/stm32/docs/figures/pulse_encoder_config1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 110 KiB |
BIN
bsp/stm32/docs/figures/pulse_encoder_config2.png
Normal file
BIN
bsp/stm32/docs/figures/pulse_encoder_config2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
BIN
bsp/stm32/docs/figures/pulse_encoder_config3.png
Normal file
BIN
bsp/stm32/docs/figures/pulse_encoder_config3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
BIN
bsp/stm32/docs/figures/pulse_encoder_config4.png
Normal file
BIN
bsp/stm32/docs/figures/pulse_encoder_config4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 82 KiB |
Loading…
x
Reference in New Issue
Block a user