generated from hulk/gd32e23x_template
有问题版本,暂存
This commit is contained in:
43
inc/ultrasonic_analog.h
Normal file
43
inc/ultrasonic_analog.h
Normal file
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// Created by yelv1 on 24-12-31.
|
||||
//
|
||||
|
||||
#ifndef ULTRASONIC_ANALOG_H
|
||||
#define ULTRASONIC_ANALOG_H
|
||||
|
||||
#include "gd32e23x.h"
|
||||
#include "systick.h"
|
||||
#include "gd32e23x_libopt.h"
|
||||
#include "board_config.h"
|
||||
#include "usart.h"
|
||||
#include "fwdgt.h"
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
extern volatile bool ultrasonicMeasurementDone;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#define ULTRASONIC_TX_CYCLES 0x05U
|
||||
#define ULTRASONIC_TX_TIME 498 // (ms)
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void ultrasonic_gpio_config(void);
|
||||
|
||||
void ultrasonic_pwm_out_cycles(const uint8_t cycles);
|
||||
|
||||
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);
|
||||
|
||||
uint32_t ultrasonic_calc_distance(void);
|
||||
|
||||
|
||||
#endif //ULTRASONIC_ANALOG_H
|
||||
Reference in New Issue
Block a user