22 lines
507 B
C
22 lines
507 B
C
#ifndef __INFRARED_H
|
||
#define __INFRARED_H
|
||
|
||
// 红外避障模块
|
||
|
||
#include "main.h"
|
||
|
||
// 有障碍
|
||
#define INFRARED_MEET 0
|
||
// 无障碍
|
||
#define INFRARED_NONE 1
|
||
|
||
/// @brief 红外模块检测左前方20-30厘米(估计值)是否有障碍
|
||
/// @return 有障碍:INFRARED_MEET 无障碍:INFRARED_NONE
|
||
uint8_t INFRARED_GetL();
|
||
|
||
/// @brief 红外模块检测右前方20-30厘米(估计值)是否有障碍
|
||
/// @return 有障碍:INFRARED_MEET 无障碍:INFRARED_NONE
|
||
uint8_t INFRARED_GetR();
|
||
|
||
#endif
|