增加 BLE MAC 地址管理功能,添加电量灯颜色设置,优化调度器挂起和恢复逻辑
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user