Files
Wang Beihong ffdb7065e3 功能:集成SU-03T语音模块,完善UI代码文档
- 在CMakeLists.txt中添加SU-03T语音模块依赖。
- 在main.cpp中实现SU-03T接收回调函数,处理接收消息。
- 完善各UI源文件文档,包括动作、屏幕和字体,明确模块作用与数据流向。
- 更新主应用逻辑,初始化并启动SU-03T接收器。
- 修改过程中确保兼容性,保留原有接口。
2026-04-22 01:06:10 +08:00

49 lines
1.0 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* 文件: components/bh1750/include/bh1750_use.h
* 角色: BH1750 光照传感器驱动封装
* 说明:
* - 本文件用于实现当前模块的核心功能或接口定义。
* - 修改前请先确认该模块与其它任务/外设之间的数据流关系。
* - 涉及协议与硬件时,优先保持现有接口兼容,避免联调回归。
*/
#ifndef BH1750_USE_H
#define BH1750_USE_H
#include "esp_err.h"
#include "driver/i2c_master.h"
#ifdef __cplusplus
extern "C" {
#endif
// 定义使用的 I2C 引脚
#define BH1750_I2C_SCL_IO 1
#define BH1750_I2C_SDA_IO 2
/**
* @brief 初始化 BH1750 传感器及其所需的 I2C 总线
*/
esp_err_t bh1750_user_init(void);
/**
* @brief 获取 I2C 总线句柄,以便其他传感器(如 AHT30共用总线
*/
i2c_master_bus_handle_t bh1750_get_i2c_bus_handle(void);
/**
* @brief 读取一次光照强度数据 (Lux)
*/
esp_err_t bh1750_user_read(float *lux);
/**
* @brief 释放 BH1750 相关资源
*/
void bh1750_user_deinit(void);
#ifdef __cplusplus
}
#endif
#endif