mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 03:27:45 +08:00
添加了北醒激光单点测距模块,修复了遥控器离线检测命名错误,增加了i2c寄存器读写的16位地址模式
This commit is contained in:
20
modules/TFminiPlus/tfminiplus.h
Normal file
20
modules/TFminiPlus/tfminiplus.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef __TFMINIPLUS_H__
|
||||
#define __TFMINIPLUS_H__
|
||||
|
||||
#include "stdint.h"
|
||||
#include "bsp_iic.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
IICInstance *iic;
|
||||
uint8_t Mode; //= buf[6];
|
||||
uint16_t Dist; //= buf[2] | (buf[3] << 8);
|
||||
uint32_t Strength; //= buf[4] | (buf[5] << 8);
|
||||
uint8_t buf[9];
|
||||
} TFMiniInstance;
|
||||
|
||||
TFMiniInstance *TFMiniRegister(I2C_HandleTypeDef *hi2c);
|
||||
|
||||
float GetDistance(TFMiniInstance *tfmini);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user