diff --git a/CMakeLists.txt b/CMakeLists.txt index c913a6c..76d4696 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) diff --git a/inc/input_capture_exp.h b/inc/input_capture_exp.h new file mode 100644 index 0000000..987ba28 --- /dev/null +++ b/inc/input_capture_exp.h @@ -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 diff --git a/src/input_capture_exp.c b/src/input_capture_exp.c new file mode 100644 index 0000000..7f9586f --- /dev/null +++ b/src/input_capture_exp.c @@ -0,0 +1,7 @@ +// +// Created by yelv1 on 24-9-23. +// + +#include "input_capture_exp.h" +#include "gd32e23x.h" + diff --git a/src/main.c b/src/main.c index 8ebb333..4c837d8 100644 --- a/src/main.c +++ b/src/main.c @@ -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"); + } }