bt_br_inquiry_scan_update_param

Function bt_br_inquiry_scan_update_param 

Source
pub unsafe extern "C" fn bt_br_inquiry_scan_update_param(
    param: *const bt_br_inquiry_scan_param,
) -> i32
Expand description

@brief Update BR/EDR inquiry scan parameters.

This function updates the inquiry scan parameters of the local BR/EDR controller. Inquiry scan parameters determine how the controller handles inquiry requests.

The function validates the provided parameters, including the interval, window, and scan type, and sends the appropriate HCI commands to update the controller’s inquiry scan activity and scan type.

The user can set custom inquiry scan parameters using the helper macro @ref BT_BR_INQUIRY_SCAN_PARAM to define their own values. Alternatively, the user can use predefined standard parameters as defined in the Bluetooth specification:

  • @ref BT_BR_INQUIRY_SCAN_PARAM_DEFAULT Default inquiry scan parameters. These predefined parameters are designed to meet common use cases and ensure compliance with the Bluetooth specification.

@param param Inquiry scan parameters, including: - interval: Time between consecutive inquiry scans (in 0.625 ms units). Must be in the range [0x0012, 0x1000]. - window: Duration of a single inquiry scan (in 0.625 ms units). Must be in the range [0x0011, 0x1000]. - type: Inquiry scan type (e.g., standard or interlaced).

@return 0 on success. @return -EINVAL if the provided parameters are invalid. @return -EAGAIN if the device is not ready. @return -ENOBUFS if memory allocation for HCI commands fails. @return Other negative error codes for internal failures.