MdePkg[all]  1.08
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
BluetoothHc.h File Reference

Data Structures

struct  _EFI_BLUETOOTH_HC_PROTOCOL
 

Macros

#define EFI_BLUETOOTH_HC_PROTOCOL_GUID
 

Typedefs

typedef struct
_EFI_BLUETOOTH_HC_PROTOCOL 
EFI_BLUETOOTH_HC_PROTOCOL
 
typedef EFI_STATUS(EFIAPIEFI_BLUETOOTH_HC_SEND_COMMAND )(IN EFI_BLUETOOTH_HC_PROTOCOL *This, IN OUT UINTN *BufferSize, IN VOID *Buffer, IN UINTN Timeout)
 
typedef EFI_STATUS(EFIAPIEFI_BLUETOOTH_HC_RECEIVE_EVENT )(IN EFI_BLUETOOTH_HC_PROTOCOL *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer, IN UINTN Timeout)
 
typedef IN UINTN DataLength
 
typedef IN UINTN IN VOIDContext
 
typedef IN BOOLEAN IsNewTransfer
 
typedef IN BOOLEAN IN UINTN PollingInterval
 
typedef IN BOOLEAN IN UINTN IN
UINTN IN
EFI_BLUETOOTH_HC_ASYNC_FUNC_CALLBACK 
Callback
 
typedef EFI_STATUS(EFIAPIEFI_BLUETOOTH_HC_SEND_ACL_DATA )(IN EFI_BLUETOOTH_HC_PROTOCOL *This, IN OUT UINTN *BufferSize, IN VOID *Buffer, IN UINTN Timeout)
 
typedef EFI_STATUS(EFIAPIEFI_BLUETOOTH_HC_RECEIVE_ACL_DATA )(IN EFI_BLUETOOTH_HC_PROTOCOL *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer, IN UINTN Timeout)
 
typedef EFI_STATUS(EFIAPIEFI_BLUETOOTH_HC_SEND_SCO_DATA )(IN EFI_BLUETOOTH_HC_PROTOCOL *This, IN OUT UINTN *BufferSize, IN VOID *Buffer, IN UINTN Timeout)
 
typedef EFI_STATUS(EFIAPIEFI_BLUETOOTH_HC_RECEIVE_SCO_DATA )(IN EFI_BLUETOOTH_HC_PROTOCOL *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer, IN UINTN Timeout)
 

Functions

typedef EFI_STATUS (EFIAPI *EFI_BLUETOOTH_HC_ASYNC_FUNC_CALLBACK)(IN VOID *Data
 

Variables

EFI_GUID gEfiBluetoothHcProtocolGuid
 

Detailed Description

EFI Bluetooth Host Controller Protocol as defined in UEFI 2.5. This protocol abstracts the Bluetooth host controller layer message transmit and receive.

Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Revision Reference:
This Protocol is introduced in UEFI Specification 2.5

Macro Definition Documentation

#define EFI_BLUETOOTH_HC_PROTOCOL_GUID
Value:
{ \
0xb3930571, 0xbeba, 0x4fc5, { 0x92, 0x3, 0x94, 0x27, 0x24, 0x2e, 0x6a, 0x43 } \
}

Typedef Documentation

typedef IN BOOLEAN IN UINTN IN UINTN IN EFI_BLUETOOTH_HC_ASYNC_FUNC_CALLBACK Callback
typedef IN BOOLEAN IN UINTN IN UINTN IN EFI_BLUETOOTH_HC_ASYNC_FUNC_CALLBACK IN VOID* Context
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_HC_RECEIVE_ACL_DATA)(IN EFI_BLUETOOTH_HC_PROTOCOL *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer, IN UINTN Timeout)

Receive HCI ACL data packet.

The ReceiveACLData() function receives HCI ACL data packet. Buffer holds the whole HCI ACL data packet, including Handle, PB flag, BC flag, data length, and data.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.
[in,out]BufferSizeOn input, indicates the size, in bytes, of the data buffer specified by Buffer. On output, indicates the amount of data actually transferred.
[out]BufferA pointer to the buffer of data that will be received from Bluetooth host controller.
[in]TimeoutIndicating the transfer should be completed within this time frame. The units are in milliseconds. If Timeout is 0, then the caller must wait for the function to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.
Return values
EFI_SUCCESSThe HCI ACL data packet is received successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: BufferSize is NULL. BufferSize is 0. Buffer is NULL.
EFI_TIMEOUTReceiving HCI ACL data packet fail due to timeout.
EFI_DEVICE_ERRORReceiving HCI ACL data packet fail due to host controller or device error.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_HC_RECEIVE_EVENT)(IN EFI_BLUETOOTH_HC_PROTOCOL *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer, IN UINTN Timeout)

Receive HCI event packet.

The ReceiveEvent() function receives HCI event packet. Buffer holds the whole HCI event packet, including EventCode, parameter length, and parameters.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.
[in,out]BufferSizeOn input, indicates the size, in bytes, of the data buffer specified by Buffer. On output, indicates the amount of data actually transferred.
[out]BufferA pointer to the buffer of data that will be received from Bluetooth host controller.
[in]TimeoutIndicating the transfer should be completed within this time frame. The units are in milliseconds. If Timeout is 0, then the caller must wait for the function to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.
Return values
EFI_SUCCESSThe HCI event packet is received successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: BufferSize is NULL. BufferSize is 0. Buffer is NULL.
EFI_TIMEOUTReceiving HCI event packet fail due to timeout.
EFI_DEVICE_ERRORReceiving HCI event packet fail due to host controller or device error.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_HC_RECEIVE_SCO_DATA)(IN EFI_BLUETOOTH_HC_PROTOCOL *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer, IN UINTN Timeout)

Receive HCI SCO data packet.

The ReceiveSCOData() function receives HCI SCO data packet. Buffer holds the whole HCI SCO data packet, including ConnectionHandle, PacketStatus flag, data length, and data.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.
[in,out]BufferSizeOn input, indicates the size, in bytes, of the data buffer specified by Buffer. On output, indicates the amount of data actually transferred.
[out]BufferA pointer to the buffer of data that will be received from Bluetooth host controller.
[in]TimeoutIndicating the transfer should be completed within this time frame. The units are in milliseconds. If Timeout is 0, then the caller must wait for the function to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.
Return values
EFI_SUCCESSThe HCI SCO data packet is received successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: BufferSize is NULL. BufferSize is 0. Buffer is NULL.
EFI_TIMEOUTReceiving HCI SCO data packet fail due to timeout.
EFI_DEVICE_ERRORReceiving HCI SCO data packet fail due to host controller or device error.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_HC_SEND_ACL_DATA)(IN EFI_BLUETOOTH_HC_PROTOCOL *This, IN OUT UINTN *BufferSize, IN VOID *Buffer, IN UINTN Timeout)

Send HCI ACL data packet.

The SendACLData() function sends HCI ACL data packet. Buffer holds the whole HCI ACL data packet, including Handle, PB flag, BC flag, data length, and data.

The SendACLData() function and ReceiveACLData() function just send and receive data payload from application layer. In order to protect the payload data, the Bluetooth bus is required to call HCI_Set_Connection_Encryption command to enable hardware based encryption after authentication completed, according to pairing mode and host capability.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.
[in,out]BufferSizeOn input, indicates the size, in bytes, of the data buffer specified by Buffer. On output, indicates the amount of data actually transferred.
[in]BufferA pointer to the buffer of data that will be transmitted to Bluetooth host controller.
[in]TimeoutIndicating the transfer should be completed within this time frame. The units are in milliseconds. If Timeout is 0, then the caller must wait for the function to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.
Return values
EFI_SUCCESSThe HCI ACL data packet is sent successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: BufferSize is NULL. BufferSize is 0. Buffer is NULL.
EFI_TIMEOUTSending HCI ACL data packet fail due to timeout.
EFI_DEVICE_ERRORSending HCI ACL data packet fail due to host controller or device error.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_HC_SEND_COMMAND)(IN EFI_BLUETOOTH_HC_PROTOCOL *This, IN OUT UINTN *BufferSize, IN VOID *Buffer, IN UINTN Timeout)

Send HCI command packet.

The SendCommand() function sends HCI command packet. Buffer holds the whole HCI command packet, including OpCode, OCF, OGF, parameter length, and parameters. When this function is returned, it just means the HCI command packet is sent, it does not mean the command is success or complete. Caller might need to wait a command status event to know the command status, or wait a command complete event to know if the command is completed.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.
[in,out]BufferSizeOn input, indicates the size, in bytes, of the data buffer specified by Buffer. On output, indicates the amount of data actually transferred.
[in]BufferA pointer to the buffer of data that will be transmitted to Bluetooth host controller.
[in]TimeoutIndicating the transfer should be completed within this time frame. The units are in milliseconds. If Timeout is 0, then the caller must wait for the function to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.
Return values
EFI_SUCCESSThe HCI command packet is sent successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: BufferSize is NULL. BufferSize is 0. Buffer is NULL.
EFI_TIMEOUTSending HCI command packet fail due to timeout.
EFI_DEVICE_ERRORSending HCI command packet fail due to host controller or device error.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_HC_SEND_SCO_DATA)(IN EFI_BLUETOOTH_HC_PROTOCOL *This, IN OUT UINTN *BufferSize, IN VOID *Buffer, IN UINTN Timeout)

Send HCI SCO data packet.

The SendSCOData() function sends HCI SCO data packet. Buffer holds the whole HCI SCO data packet, including ConnectionHandle, PacketStatus flag, data length, and data.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.
[in,out]BufferSizeOn input, indicates the size, in bytes, of the data buffer specified by Buffer. On output, indicates the amount of data actually transferred.
[in]BufferA pointer to the buffer of data that will be transmitted to Bluetooth host controller.
[in]TimeoutIndicating the transfer should be completed within this time frame. The units are in milliseconds. If Timeout is 0, then the caller must wait for the function to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.
Return values
EFI_SUCCESSThe HCI SCO data packet is sent successfully.
EFI_UNSUPPORTEDThe implementation does not support HCI SCO transfer.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: BufferSize is NULL. BufferSize is 0. Buffer is NULL.
EFI_TIMEOUTSending HCI SCO data packet fail due to timeout.
EFI_DEVICE_ERRORSending HCI SCO data packet fail due to host controller or device error.

Function Documentation

typedef EFI_STATUS ( EFIAPI EFI_BLUETOOTH_HC_ASYNC_RECEIVE_SCO_DATA)

The async callback of AsyncReceiveEvent().

Parameters
[in]DataData received via asynchronous transfer.
[in]DataLengthThe length of Data in bytes, received via asynchronous transfer.
[in]ContextContext passed from asynchronous transfer request.
Return values
EFI_SUCCESSThe callback does execute successfully.
OthersThe callback doesn't execute successfully.

Receive HCI event packet in non-blocking way.

The AsyncReceiveEvent() function receives HCI event packet in non-blocking way. Data in Callback function holds the whole HCI event packet, including EventCode, parameter length, and parameters.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.
[in]IsNewTransferIf TRUE, a new transfer will be submitted. If FALSE, the request is deleted.
[in]PollingIntervalIndicates the periodic rate, in milliseconds, that the transfer is to be executed.
[in]DataLengthSpecifies the length, in bytes, of the data to be received.
[in]CallbackThe callback function. This function is called if the asynchronous transfer is completed.
[in]ContextData passed into Callback function. This is optional parameter and may be NULL.
Return values
EFI_SUCCESSThe HCI asynchronous receive request is submitted successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: DataLength is 0. If IsNewTransfer is TRUE, and an asynchronous receive request already exists.

Receive HCI ACL data packet in non-blocking way.

The AsyncReceiveACLData() function receives HCI ACL data packet in non-blocking way. Data in Callback holds the whole HCI ACL data packet, including Handle, PB flag, BC flag, data length, and data.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.
[in]IsNewTransferIf TRUE, a new transfer will be submitted. If FALSE, the request is deleted.
[in]PollingIntervalIndicates the periodic rate, in milliseconds, that the transfer is to be executed.
[in]DataLengthSpecifies the length, in bytes, of the data to be received.
[in]CallbackThe callback function. This function is called if the asynchronous transfer is completed.
[in]ContextData passed into Callback function. This is optional parameter and may be NULL.
Return values
EFI_SUCCESSThe HCI asynchronous receive request is submitted successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: DataLength is 0. If IsNewTransfer is TRUE, and an asynchronous receive request already exists.

Receive HCI SCO data packet in non-blocking way.

The AsyncReceiveSCOData() function receives HCI SCO data packet in non-blocking way. Data in Callback holds the whole HCI SCO data packet, including ConnectionHandle, PacketStatus flag, data length, and data.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.
[in]IsNewTransferIf TRUE, a new transfer will be submitted. If FALSE, the request is deleted.
[in]PollingIntervalIndicates the periodic rate, in milliseconds, that the transfer is to be executed.
[in]DataLengthSpecifies the length, in bytes, of the data to be received.
[in]CallbackThe callback function. This function is called if the asynchronous transfer is completed.
[in]ContextData passed into Callback function. This is optional parameter and may be NULL.
Return values
EFI_SUCCESSThe HCI asynchronous receive request is submitted successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: DataLength is 0. If IsNewTransfer is TRUE, and an asynchronous receive request already exists.

Variable Documentation

EFI_GUID gEfiBluetoothHcProtocolGuid