c96a1e3f0d
Commit: 11b1ebdc
16 lines
381 B
C
16 lines
381 B
C
#ifndef __HCSR04_H
|
||
#define __HCSR04_H
|
||
|
||
#include "main.h"
|
||
|
||
extern uint32_t sonor_distance; // 测量出的距离,单位mm
|
||
extern uint8_t sonor_state; // 测距状态变量,0:未测量,1:正在测量,2:已测量
|
||
|
||
void HC_SR04_Init(void);
|
||
uint32_t sonar_mm(void);
|
||
|
||
// 测距完毕回调,执行完自定义任务后将sonor_state置0
|
||
void Sonar_CP_Callback();
|
||
|
||
#endif
|