开发进行中:添加输入捕获实验支持

在ultrasonic_driver项目中,此次提交标志着向主目录添加新的源文件和头文件,旨在支持输入捕获实验。修改了CMakeLists.txt以包含新的input_capture_exp.c文件,同时在src和inc目录下分别创建了相应的源码和头文件。此外,此次提交还引入了输入捕获相关的硬件配置和初始化例程,为后续的功能开发和测试奠定了基础。
This commit is contained in:
yelvlab 2024-09-23 21:01:30 +08:00
parent 00aa50f15c
commit a3a5dc2af9
4 changed files with 19 additions and 5 deletions

View File

@ -19,6 +19,7 @@ set(TARGET_C_SRC
${CMAKE_SOURCE_DIR}/src/gd32e23x_it.c
${CMAKE_SOURCE_DIR}/src/systick.c
${CMAKE_SOURCE_DIR}/src/ultrasonic_driver.c
${CMAKE_SOURCE_DIR}/src/input_capture_exp.c
)
add_executable(xlsw_3dp_ultrasonic_300K ${TARGET_C_SRC})

8
inc/input_capture_exp.h Normal file
View File

@ -0,0 +1,8 @@
//
// Created by yelv1 on 24-9-23.
//
#ifndef INPUT_CAPTURE_EXP_H
#define INPUT_CAPTURE_EXP_H
#endif //INPUT_CAPTURE_EXP_H

7
src/input_capture_exp.c Normal file
View File

@ -0,0 +1,7 @@
//
// Created by yelv1 on 24-9-23.
//
#include "input_capture_exp.h"
#include "gd32e23x.h"

View File

@ -25,8 +25,8 @@ int main(void)
/* configure systick */
systick_config();
/* configure ultrasonic board hardware */
ultrasonic_config();
// ultrasonic_config();
usart_config();
/* ---------- debug start ---------- */
@ -43,9 +43,7 @@ int main(void)
while(1)
{
delay_ms(50);
ultrasonic_pwm_out_cycles(ULTRASONIC_CYCLES);
// printf("Send ultra sonic driver signal!\r\n");
}
}