feat(ble/bluedroid): Added API to set channel map for scanning

(cherry picked from commit fd4bb69357aaf56fe017de95b9b4fa6c6ba473ef)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
This commit is contained in:
Chen Jian Hua
2025-09-28 19:10:03 +08:00
committed by BLE BOT
parent e8ff0a5656
commit 2b533e88ce
3 changed files with 51 additions and 0 deletions
@@ -1795,6 +1795,24 @@ esp_err_t esp_ble_gap_set_sch_len(uint8_t role, uint32_t len)
return esp_ble_gap_vendor_command_send(&vs_cmd);
}
#endif // CONFIG_SOC_BLE_MULTI_CONN_OPTIMIZATION
esp_err_t esp_ble_gap_set_scan_chan_map(uint8_t state, uint8_t chan_map[5])
{
esp_ble_vendor_cmd_params_t vs_cmd;
uint8_t cmd_param[6];
if (chan_map == NULL) {
return ESP_ERR_INVALID_ARG;
}
cmd_param[0] = state;
memcpy(&cmd_param[1], chan_map, 5);
vs_cmd.opcode = 0xFD19;
vs_cmd.param_len = 6;
vs_cmd.p_param_buf = cmd_param;
return esp_ble_gap_vendor_command_send(&vs_cmd);
}
#endif // (BLE_VENDOR_HCI_EN == TRUE)
#if (BLE_FEAT_POWER_CONTROL_EN == TRUE)