@@ -248,6 +248,7 @@ typedef enum {
248248 ESP_GAP_BLE_READ_CHANNEL_MAP_COMPLETE_EVT , /*!< When BLE channel map result is received, the event comes */
249249 ESP_GAP_BLE_SET_COMMON_FACTOR_CMPL_EVT , /*!< When set the common factor complete, the event comes */
250250 ESP_GAP_BLE_SET_SCH_LEN_CMPL_EVT , /*!< When set the scheduling length complete, the event comes */
251+ ESP_GAP_BLE_SET_SCAN_CHAN_MAP_CMPL_EVT , /*!< When set the channel map for scanning complete, the event comes */
251252 ESP_GAP_BLE_EVT_MAX , /*!< when maximum advertising event complete, the event comes */
252253} esp_gap_ble_cb_event_t ;
253254
@@ -1762,6 +1763,12 @@ typedef union {
17621763 struct ble_set_sch_len_cmpl_evt_param {
17631764 esp_bt_status_t status ; /*!< Indicate scheduling length set operation success status */
17641765 } set_sch_len_cmpl ; /*!< Event parameter of ESP_GAP_BLE_SET_SCH_LEN_CMPL_EVT */
1766+ /**
1767+ * @brief ESP_GAP_BLE_SET_SCAN_CHAN_MAP_CMPL_EVT
1768+ */
1769+ struct ble_set_scan_chan_map_cmpl_evt_param {
1770+ esp_bt_status_t status ; /*!< Indicate channel map for scanning set operation success status */
1771+ } set_scan_chan_map_cmpl ; /*!< Event parameter of ESP_GAP_BLE_SET_SCAN_CHAN_MAP_CMPL_EVT */
17651772#endif // #if (BLE_VENDOR_HCI_EN == TRUE)
17661773#if (BLE_FEAT_POWER_CONTROL_EN == TRUE )
17671774 /**
@@ -3144,6 +3151,28 @@ esp_err_t esp_ble_gap_set_common_factor(uint32_t common_factor);
31443151 */
31453152esp_err_t esp_ble_gap_set_sch_len (uint8_t role , uint32_t len );
31463153
3154+ /**
3155+ * @brief This function is used to Set the channel map for LE scanning or initiating state.
3156+ *
3157+ * @note - This function must be called before starting scanning or initiating.
3158+ * - At least one channel should be marked as used.
3159+ *
3160+ * @param[in] state: The LE state for which the channel map is applied.
3161+ * - 0 : Scanning state
3162+ * - 1 : Initiating state
3163+ * @param[in] chan_map: A 5-byte array representing the channel usage bit mask.
3164+ * Each bit corresponds to one channel from channel 0 to channel 39.
3165+ * The least significant bit of chan_map[0] corresponds to channel 0.
3166+ * The most significant bit of chan_map[4] corresponds to channel 39.
3167+ * - Bit = 1 : channel is used
3168+ * - Bit = 0 : channel is not used
3169+ *
3170+ * @return
3171+ * - ESP_OK : success
3172+ * - other : failed
3173+ */
3174+ esp_err_t esp_ble_gap_set_scan_chan_map (uint8_t state , uint8_t chan_map [5 ]);
3175+
31473176/**
31483177 * @brief This function is used to read the current and maximum transmit power levels of the local Controller.
31493178 *
0 commit comments