new project

This commit is contained in:
2025-08-19 23:24:29 +08:00
parent 1247429882
commit c5eb3ab534
9 changed files with 365 additions and 28 deletions

31
Inc/ultrasonic_analog.h Normal file
View File

@@ -0,0 +1,31 @@
#ifndef ULTRASONIC_ANALOG_H
#define ULTRASONIC_ANALOG_H
#include <stdint.h>
#include <stdbool.h>
extern volatile bool g_ultrasonic_measure_done;
/**************************************************************************************************/
#define ULTRASONIC_TX_CYCLES 5U /* 发送5个PWM周期驱动换能器 */
#define ULTRASONIC_TX_TIME 498U // ms
#define ULTRASONIC_MAX_TOF_RELOAD 1000U //us
/**************************************************************************************************/
void ultrasonic_tx_init(void);
void ultrasonic_pwm_out_cycles(void);
// void ultrasonic_transmit_delay(const uint16_t micro_second);
// void ultrasonic_rece_exti_config(void);
void ultrasonic_echo_timer_config(void);
void ultrasonic_config(void);
// uint16_t ultrasonic_calc_distance(void);
#endif // UART_H