Files
wuchuyuan 0dd65e1552 1、喷淋器 P1/P2功能实现
2、红灯按连接态慢闪
2026-09-09 19:57:00 +08:00

43 lines
1.5 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.
/******************************************************************************
* @file app_th_scan.h
* @brief CBR2 断连湿度扫描(规格书第 8 章):500ms 重连广播 ↔ 500ms 扫描
* @author cyWu <1917507415@qq.com>
* @date 2026.09.09
* @version V1.0.0,首次发布
*
* @note 只在「断连 + 已配对 + 非配对/OTA 流程 + 联动配置有效(缸体≠0)」
* 时进入 500ms 交替:偶拍重连广播 / 奇拍扫描。匹配规则(8.1):
* 名字 == "JBao-"+本机 DP9 缸体号(uint16 十进制)+ 配置版本相等
* → humi = 厂商段第 3 字节(uint8 %);温度不参与开停(DP5 忽略)。
* 名字/版本不对或解析失败 → 当没收到,保持上一湿度与上一喷淋态。
******************************************************************************/
#ifndef __APP_TH_SCAN_H__
#define __APP_TH_SCAN_H__
#include <stdint.h>
/**
* @brief 初始化扫描模块
* @return 无
*/
void app_th_scan_init(void);
/**
* @brief 500ms 任务上下文:满足条件时重连广播/扫描各占一拍交替
* @return 无
*/
void app_th_scan_tick(void);
/**
* @brief GAP 扫描上报(栈线程)
* @note 杰理把扫描结果包成 GAP_EVENT_ADVERTISING_REPORT(0xE2)
* packet[2] 起为 adv_report_t。与 wireless_mic 中央示例同一布局。
* @param packet HCI 事件包
* @param size 事件包长度
* @return 无
*/
void app_th_scan_report_event(uint8_t *packet, uint16_t size);
#endif /* __APP_TH_SCAN_H__ */