50 lines
1.3 KiB
C
50 lines
1.3 KiB
C
#pragma once
|
||
|
||
#ifdef __cplusplus
|
||
extern "C" {
|
||
#endif
|
||
|
||
// ============================================================
|
||
// BLE JSON 通讯服务 - 配置参数
|
||
// ============================================================
|
||
|
||
// GATT App ID (BluFi 使用 0,本模块使用 1)
|
||
#define BLE_JSON_APP_ID 1
|
||
|
||
// Service UUID (16-bit)
|
||
#define BLE_JSON_SERVICE_UUID 0xAB00
|
||
|
||
// Characteristic UUIDs
|
||
#define BLE_JSON_CHAR_WRITE_UUID 0xAB01 // App -> 设备 (WRITE)
|
||
#define BLE_JSON_CHAR_NOTIFY_UUID 0xAB02 // 设备 -> App (NOTIFY)
|
||
#define BLE_JSON_CHAR_STATUS_UUID 0xAB03 // 设备状态 (READ)
|
||
|
||
// Service handle 数量 (service + chars + descriptors,预留足够)
|
||
#define BLE_JSON_HANDLE_NUM 10
|
||
|
||
// MTU
|
||
#define BLE_JSON_LOCAL_MTU 512
|
||
|
||
// Characteristic 最大值长度
|
||
#define BLE_JSON_CHAR_VAL_MAX_LEN 512
|
||
|
||
// 广播设备名称
|
||
#define BLE_JSON_DEVICE_NAME "Kapi_BLE"
|
||
|
||
// 广播参数
|
||
#define BLE_JSON_ADV_INT_MIN 0x40 // 40ms
|
||
#define BLE_JSON_ADV_INT_MAX 0x80 // 80ms
|
||
|
||
// 命令处理队列深度
|
||
#define BLE_JSON_CMD_QUEUE_SIZE 8
|
||
|
||
// WiFi 列表最大返回条数
|
||
#define BLE_JSON_WIFI_LIST_MAX 8
|
||
|
||
// 日志标签
|
||
#define BLE_JSON_TAG "BleJsonSvc"
|
||
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif
|