TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | EFI_BLUETOOTH_LE_CONFIG_SCAN_PARAMETER |
struct | EFI_BLUETOOTH_LE_SCAN_CALLBACK_INFORMATION |
struct | EFI_BLUETOOTH_LE_CONFIG_CONNECT_PARAMETER |
struct | _EFI_BLUETOOTH_LE_CONFIG_PROTOCOL |
Macros | |
#define | EFI_BLUETOOTH_LE_CONFIG_PROTOCOL_GUID |
Enumerations | |
enum | EFI_BLUETOOTH_LE_SMP_EVENT_DATA_TYPE { EfiBluetoothSmpAuthorizationRequestEvent , EfiBluetoothSmpPasskeyReadyEvent , EfiBluetoothSmpPasskeyRequestEvent , EfiBluetoothSmpOOBDataRequestEvent , EfiBluetoothSmpNumericComparisonEvent } |
enum | EFI_BLUETOOTH_LE_SMP_DATA_TYPE { EfiBluetoothSmpLocalIR , EfiBluetoothSmpLocalER , EfiBluetoothSmpLocalDHK , EfiBluetoothSmpKeysDistributed = 0x1000 , EfiBluetoothSmpKeySize , EfiBluetoothSmpKeyType , EfiBluetoothSmpPeerLTK , EfiBluetoothSmpPeerIRK , EfiBluetoothSmpPeerCSRK , EfiBluetoothSmpPeerRand , EfiBluetoothSmpPeerEDIV , EfiBluetoothSmpPeerSignCounter , EfiBluetoothSmpLocalLTK , EfiBluetoothSmpLocalIRK , EfiBluetoothSmpLocalCSRK , EfiBluetoothSmpLocalSignCounter , EfiBluetoothSmpLocalDIV , EfiBluetoothSmpPeerAddressList , EfiBluetoothSmpMax } |
Variables | |
EFI_GUID | gEfiBluetoothLeConfigProtocolGuid |
EFI Bluetooth LE Config Protocol as defined in UEFI 2.7. This protocol abstracts user interface configuration for BluetoothLe device.
Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file BluetoothLeConfig.h.
#define EFI_BLUETOOTH_LE_CONFIG_PROTOCOL_GUID |
Definition at line 19 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_CONNECT) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN BOOLEAN AutoReconnect, IN BOOLEAN DoBonding, IN EFI_BLUETOOTH_LE_CONFIG_CONNECT_PARAMETER *ConnectParameter OPTIONAL, IN BLUETOOTH_LE_ADDRESS *BD_ADDR) |
Connect a BluetoothLE device.
The Connect() function connects a Bluetooth device. When this function is returned successfully, a new EFI_BLUETOOTH_IO_PROTOCOL is created.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | AutoReconnect | If TRUE, the BluetoothLE host controller needs to do an auto reconnect. If FALSE, the BluetoothLE host controller does not do an auto reconnect. |
[in] | DoBonding | If TRUE, the BluetoothLE host controller needs to do a bonding. If FALSE, the BluetoothLE host controller does not do a bonding. |
[in] | ConnectParameter | If it is not NULL, the ConnectParameter is used to perform a scan by the BluetoothLE bus driver. If it is NULL, the default parameter is used. |
[in] | BD_ADDR | The address of the BluetoothLE device to be connected. |
EFI_SUCCESS | The BluetoothLE device is connected successfully. |
EFI_ALREADY_STARTED | The BluetoothLE device is already connected. |
EFI_NOT_FOUND | The BluetoothLE device is not found. |
EFI_DEVICE_ERROR | A hardware error occurred trying to connect the BluetoothLE device. |
Definition at line 195 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_CONNECT_COMPLETE_CALLBACK) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN VOID *Context, IN EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE CallbackType, IN BLUETOOTH_LE_ADDRESS *BDAddr, IN VOID *InputBuffer, IN UINTN InputBufferSize) |
The callback function to hook connect complete event.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Context | Data passed into callback function. This is optional parameter and may be NULL. |
[in] | CallbackType | The value defined in EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE. |
[in] | BDAddr | Remote BluetoothLE device address. |
[in] | InputBuffer | A pointer to the buffer of data that is input from callback caller. |
[in] | InputBufferSize | Indicates the size, in bytes, of the data buffer specified by InputBuffer. |
EFI_SUCCESS | The callback function complete successfully. |
Definition at line 571 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_DISCONNECT) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN BLUETOOTH_LE_ADDRESS *BD_ADDR, IN UINT8 Reason) |
Disconnect a BluetoothLE device.
The Disconnect() function disconnects a BluetoothLE device. When this function is returned successfully, the EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL associated with this device is destroyed and all services associated are stopped.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | BD_ADDR | The address of BluetoothLE device to be connected. |
[in] | Reason | Bluetooth disconnect reason. See Bluetooth specification for detail. |
EFI_SUCCESS | The BluetoothLE device is disconnected successfully. |
EFI_NOT_STARTED | The BluetoothLE device is not connected. |
EFI_NOT_FOUND | The BluetoothLE device is not found. |
EFI_DEVICE_ERROR | A hardware error occurred trying to disconnect the BluetoothLE device. |
Definition at line 222 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_GET_DATA) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN EFI_BLUETOOTH_CONFIG_DATA_TYPE DataType, IN OUT UINTN *DataSize, IN OUT VOID *Data OPTIONAL) |
Get BluetoothLE configuration data.
The GetData() function returns BluetoothLE configuration data. For remote BluetoothLE device configuration data, please use GetRemoteData() function with valid BD_ADDR.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | DataType | Configuration data type. |
[in,out] | DataSize | On input, indicates the size, in bytes, of the data buffer specified by Data. On output, indicates the amount of data actually returned. |
[in,out] | Data | A pointer to the buffer of data that will be returned. |
EFI_SUCCESS | The BluetoothLE configuration data is returned successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE:
|
EFI_UNSUPPORTED | The DataType is unsupported. |
EFI_NOT_FOUND | The DataType is not found. |
EFI_BUFFER_TOO_SMALL | The buffer is too small to hold the buffer. |
Definition at line 252 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_GET_REMOTE_DATA) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN EFI_BLUETOOTH_CONFIG_DATA_TYPE DataType, IN BLUETOOTH_LE_ADDRESS *BDAddr, IN OUT UINTN *DataSize, IN OUT VOID *Data) |
Get remove BluetoothLE device configuration data.
The GetRemoteData() function returns remote BluetoothLE device configuration data.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | DataType | Configuration data type. |
[in] | BDAddr | Remote BluetoothLE device address. |
[in,out] | DataSize | On input, indicates the size, in bytes, of the data buffer specified by Data. On output, indicates the amount of data actually returned. |
[in,out] | Data | A pointer to the buffer of data that will be returned. |
EFI_SUCCESS | The remote BluetoothLE device configuration data is returned successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE:
|
EFI_UNSUPPORTED | The DataType is unsupported. |
EFI_NOT_FOUND | The DataType is not found. |
EFI_BUFFER_TOO_SMALL | The buffer is too small to hold the buffer. |
Definition at line 311 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_INIT) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This) |
Initialize BluetoothLE host controller and local device.
The Init() function initializes BluetoothLE host controller and local device.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
EFI_SUCCESS | The BluetoothLE host controller and local device is initialized successfully. |
EFI_DEVICE_ERROR | A hardware error occurred trying to initialize the BluetoothLE host controller and local device. |
Definition at line 39 of file BluetoothLeConfig.h.
Definition at line 24 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN EFI_BLUETOOTH_LE_CONFIG_CONNECT_COMPLETE_CALLBACK Callback, IN VOID *Context) |
Register link connect complete callback function.
The RegisterLinkConnectCompleteCallback() function registers Bluetooth link connect complete callback function. The Bluetooth Configuration driver may call RegisterLinkConnectCompleteCallback() to register a callback function. During pairing, Bluetooth bus driver must trigger this callback function to report device state, if it is registered. Then Bluetooth Configuration driver will get information on device connection, according to CallbackType defined by EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Callback | The callback function. NULL means unregister. |
[in] | Context | Data passed into Callback function. This is optional parameter and may be NULL. |
EFI_SUCCESS | The link connect complete callback function is registered successfully. |
EFI_ALREADY_STARTED | A callback function is already registered on the same attribute opcode and attribute handle, when the Callback is not NULL. |
EFI_NOT_STARTED | A callback function is not registered on the same attribute opcode and attribute handle, when the Callback is NULL |
Definition at line 602 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_REGISTER_SMP_GET_DATA_CALLBACK) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN EFI_BLUETOOTH_LE_CONFIG_SMP_GET_DATA_CALLBACK Callback, IN VOID *Context) |
Register a callback function to get SMP related data.
The RegisterSmpGetDataCallback() function registers a callback function to get SMP related data.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Callback | Callback function for SMP get data. |
[in] | Context | Data passed into Callback function. This is optional parameter and may be NULL. |
EFI_SUCCESS | The SMP get data callback function is registered successfully. |
EFI_ALREADY_STARTED | A callback function is already registered on the same attribute opcode and attribute handle, when the Callback is not NULL. |
EFI_NOT_STARTED | A callback function is not registered on the same attribute opcode and attribute handle, when the Callback is NULL |
Definition at line 501 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_REGISTER_SMP_SET_DATA_CALLBACK) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN EFI_BLUETOOTH_LE_CONFIG_SMP_SET_DATA_CALLBACK Callback, IN VOID *Context) |
Register a callback function to set SMP related data.
The RegisterSmpSetDataCallback() function registers a callback function to set SMP related data.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Callback | Callback function for SMP set data. |
[in] | Context | Data passed into Callback function. This is optional parameter and may be NULL. |
EFI_SUCCESS | The SMP set data callback function is registered successfully. |
EFI_ALREADY_STARTED | A callback function is already registered on the same attribute opcode and attribute handle, when the Callback is not NULL. |
EFI_NOT_STARTED | A callback function is not registered on the same attribute opcode and attribute handle, when the Callback is NULL |
Definition at line 549 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_SCAN) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN BOOLEAN ReScan, IN UINT32 Timeout, IN EFI_BLUETOOTH_LE_CONFIG_SCAN_PARAMETER *ScanParameter OPTIONAL, IN EFI_BLUETOOTH_LE_CONFIG_SCAN_CALLBACK_FUNCTION Callback, IN VOID *Context) |
Scan BluetoothLE device.
The Scan() function scans BluetoothLE device. When this function is returned, it just means scan request is submitted. It does not mean scan process is started or finished. Whenever there is a BluetoothLE device is found, the Callback function will be called. Callback function might be called before this function returns or after this function returns
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | ReScan | If TRUE, a new scan request is submitted no matter there is scan result before. If FALSE and there is scan result, the previous scan result is returned and no scan request is submitted. |
[in] | Timeout | Duration in milliseconds for which to scan. |
[in] | ScanParameter | If it is not NULL, the ScanParameter is used to perform a scan by the BluetoothLE bus driver. If it is NULL, the default parameter is used. |
[in] | Callback | The callback function. This function is called if a BluetoothLE device is found during scan process. |
[in] | Context | Data passed into Callback function. This is optional parameter and may be NULL. |
EFI_SUCCESS | The Bluetooth scan request is submitted. |
EFI_DEVICE_ERROR | A hardware error occurred trying to scan the BluetoothLE device. |
Definition at line 126 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_SCAN_CALLBACK_FUNCTION) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN VOID *Context, IN EFI_BLUETOOTH_LE_SCAN_CALLBACK_INFORMATION *CallbackInfo) |
Callback function, it is called if a BluetoothLE device is found during scan process.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Context | Context passed from scan request. |
[in] | CallbackInfo | Data related to scan result. NULL CallbackInfo means scan complete. |
EFI_SUCCESS | The callback function complete successfully. |
Definition at line 95 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_SET_DATA) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN EFI_BLUETOOTH_CONFIG_DATA_TYPE DataType, IN UINTN DataSize, IN VOID *Data) |
Set BluetoothLE configuration data.
The SetData() function sets local BluetoothLE device configuration data. Not all DataType can be set.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | DataType | Configuration data type. |
[in] | DataSize | Indicates the size, in bytes, of the data buffer specified by Data. |
[in] | Data | A pointer to the buffer of data that will be set. |
EFI_SUCCESS | The BluetoothLE configuration data is set successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE:
|
EFI_UNSUPPORTED | The DataType is unsupported. |
EFI_WRITE_PROTECTED | Cannot set configuration data. |
Definition at line 280 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_SMP_GET_DATA_CALLBACK) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN VOID *Context, IN BLUETOOTH_LE_ADDRESS *BDAddr, IN EFI_BLUETOOTH_LE_SMP_DATA_TYPE DataType, IN OUT UINTN *DataSize, OUT VOID *Data) |
The callback function to get SMP data.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Context | Data passed into callback function. This is optional parameter and may be NULL. |
[in] | BDAddr | Remote BluetoothLE device address. For Local device setting, it should be NULL. |
[in] | DataType | Data type in EFI_BLUETOOTH_LE_SMP_DATA_TYPE. |
[in,out] | DataSize | On input, indicates the size, in bytes, of the data buffer specified by Data. On output, indicates the amount of data actually returned. |
[out] | Data | A pointer to the buffer of data that will be returned. |
EFI_SUCCESS | The callback function complete successfully. |
Definition at line 475 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_SMP_SET_DATA_CALLBACK) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN VOID *Context, IN BLUETOOTH_LE_ADDRESS *BDAddr, IN EFI_BLUETOOTH_LE_SMP_DATA_TYPE Type, IN UINTN DataSize, IN VOID *Data) |
The callback function to set SMP data.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Context | Data passed into callback function. This is optional parameter and may be NULL. |
[in] | BDAddr | Remote BluetoothLE device address. |
[in] | DataType | Data type in EFI_BLUETOOTH_LE_SMP_DATA_TYPE. |
[in] | DataSize | Indicates the size, in bytes, of the data buffer specified by Data. |
[in] | Data | A pointer to the buffer of data. |
EFI_SUCCESS | The callback function complete successfully. |
Definition at line 523 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_REGISTER_SMP_AUTH_CALLBACK) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN EFI_BLUETOOTH_LE_SMP_CALLBACK Callback, IN VOID *Context) |
Register Security Manager Protocol callback function for user authentication/authorization.
The RegisterSmpAuthCallback() function register Security Manager Protocol callback function for user authentication/authorization.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Callback | Callback function for user authentication/authorization. |
[in] | Context | Data passed into Callback function. This is optional parameter and may be NULL. |
EFI_SUCCESS | The SMP callback function is registered successfully. |
EFI_ALREADY_STARTED | A callback function is already registered on the same attribute opcode and attribute handle, when the Callback is not NULL. |
EFI_NOT_STARTED | A callback function is not registered on the same attribute opcode and attribute handle, when the Callback is NULL. |
Definition at line 399 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_SEND_SMP_AUTH_DATA) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN BLUETOOTH_LE_ADDRESS *BDAddr, IN EFI_BLUETOOTH_LE_SMP_EVENT_DATA_TYPE EventDataType, IN UINTN DataSize, IN VOID *Data) |
Send user authentication/authorization to remote device.
The SendSmpAuthData() function sends user authentication/authorization to remote device. It should be used to send these information after the caller gets the request data from the callback function by RegisterSmpAuthCallback().
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | BDAddr | Remote BluetoothLE device address. |
[in] | EventDataType | Event data type in EFI_BLUETOOTH_LE_SMP_EVENT_DATA_TYPE. |
[in] | DataSize | The size of Data in bytes, of the data buffer specified by Data. |
[in] | Data | A pointer to the buffer of data that will be sent. The data format depends on the type of SMP event data being responded to. |
EFI_SUCCESS | The SMP authorization data is sent successfully. |
EFI_NOT_READY | SMP is not in the correct state to receive the auth data. |
Definition at line 425 of file BluetoothLeConfig.h.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_LE_SMP_CALLBACK) (IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN VOID *Context, IN BLUETOOTH_LE_ADDRESS *BDAddr, IN EFI_BLUETOOTH_LE_SMP_EVENT_DATA_TYPE EventDataType, IN UINTN DataSize, IN VOID *Data) |
The callback function for SMP.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Context | Data passed into callback function. This is optional parameter and may be NULL. |
[in] | BDAddr | Remote BluetoothLE device address. |
[in] | EventDataType | Event data type in EFI_BLUETOOTH_LE_SMP_EVENT_DATA_TYPE. |
[in] | DataSize | Indicates the size, in bytes, of the data buffer specified by Data. |
[in] | Data | A pointer to the buffer of data. |
EFI_SUCCESS | The callback function complete successfully. |
Definition at line 371 of file BluetoothLeConfig.h.
enum EFI_BLUETOOTH_LE_SMP_DATA_TYPE |
Definition at line 434 of file BluetoothLeConfig.h.
Definition at line 320 of file BluetoothLeConfig.h.