增加 BLE MAC 地址管理功能,添加电量灯颜色设置,优化调度器挂起和恢复逻辑

This commit is contained in:
LokLiang
2025-06-23 12:02:30 +08:00
parent 176b2c49f6
commit f34eaca585
13 changed files with 259 additions and 20 deletions

View File

@@ -1194,3 +1194,17 @@ const uint8_t *ble_server_get_mac(void)
{
return s_mac;
}
/**
* @brief 获取远程设备的 MAC 地址
*
* @return const uint8_t* MAC[6]
*/
void ble_server_get_remote_mac(uint8_t *mac)
{
if (mac == NULL)
{
return;
}
memcpy(mac, spp_remote_bda, sizeof(esp_bd_addr_t));
}

View File

@@ -48,3 +48,4 @@ ble_server_status_t ble_server_get_gap_status(void);
uint32_t ble_server_get_mtu(void);
const uint8_t *ble_server_get_mac(void);
void ble_server_get_remote_mac(uint8_t *mac);