generated from hulk/gd32e23x_template_cmake_vscode
22 lines
653 B
C
22 lines
653 B
C
#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_RINGDOWN_RELOAD 240U // 240us
|
|
#define ULTRASONIC_MAX_TOF_RELOAD 2000U // 1000us
|
|
|
|
/**************************************************************************************************/
|
|
|
|
void ultrasonic_pwm_out_cycles(void);
|
|
|
|
void ultrasonic_config(void);
|
|
|
|
#endif // ULTRASONIC_ANALOG_H
|