TianoCore EDK2 master
Loading...
Searching...
No Matches
BluetoothIo.h File Reference

Go to the source code of this file.

Data Structures

struct  EFI_BLUETOOTH_DEVICE_INFO
 
struct  _EFI_BLUETOOTH_IO_PROTOCOL
 

Macros

#define EFI_BLUETOOTH_IO_SERVICE_BINDING_PROTOCOL_GUID
 
#define EFI_BLUETOOTH_IO_PROTOCOL_GUID
 

Typedefs

typedef struct _EFI_BLUETOOTH_IO_PROTOCOL EFI_BLUETOOTH_IO_PROTOCOL
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_GET_DEVICE_INFO) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, OUT UINTN *DeviceInfoSize, OUT VOID **DeviceInfo)
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_GET_SDP_INFO) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, OUT UINTN *SdpInfoSize, OUT VOID **SdpInfo)
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_RAW_SEND) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, IN OUT UINTN *BufferSize, IN VOID *Buffer, IN UINTN Timeout)
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_RAW_RECEIVE) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer, IN UINTN Timeout)
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_ASYNC_FUNC_CALLBACK) (IN UINT16 ChannelID, IN VOID *Data, IN UINTN DataLength, IN VOID *Context)
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_RAW_ASYNC_RECEIVE) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, IN BOOLEAN IsNewTransfer, IN UINTN PollingInterval, IN UINTN DataLength, IN EFI_BLUETOOTH_IO_ASYNC_FUNC_CALLBACK Callback, IN VOID *Context)
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_SEND) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, IN EFI_HANDLE Handle, IN OUT UINTN *BufferSize, IN VOID *Buffer, IN UINTN Timeout)
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_RECEIVE) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, IN EFI_HANDLE Handle, OUT UINTN *BufferSize, OUT VOID **Buffer, IN UINTN Timeout)
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK) (IN VOID *Data, IN UINTN DataLength, IN VOID *Context)
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_ASYNC_RECEIVE) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, IN EFI_HANDLE Handle, IN EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK Callback, IN VOID *Context)
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_CONNECT) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, OUT EFI_HANDLE *Handle, IN UINT16 Psm, IN UINT16 Mtu, IN EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK Callback, IN VOID *Context)
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_DISCONNECT) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, IN EFI_HANDLE Handle)
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_REGISTER_SERVICE) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, OUT EFI_HANDLE *Handle, IN UINT16 Psm, IN UINT16 Mtu, IN EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK Callback, IN VOID *Context)
 

Variables

EFI_GUID gEfiBluetoothIoServiceBindingProtocolGuid
 
EFI_GUID gEfiBluetoothIoProtocolGuid
 

Detailed Description

EFI Bluetooth IO Service Binding Protocol as defined in UEFI 2.5. EFI Bluetooth IO Protocol as defined in UEFI 2.5. The EFI Bluetooth IO Service Binding Protocol is used to locate EFI Bluetooth IO Protocol drivers to create and destroy child of the driver to communicate with other Bluetooth device by using Bluetooth IO protocol.

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

Revision Reference:
This Protocol is introduced in UEFI Specification 2.5

Definition in file BluetoothIo.h.

Macro Definition Documentation

◆ EFI_BLUETOOTH_IO_PROTOCOL_GUID

#define EFI_BLUETOOTH_IO_PROTOCOL_GUID
Value:
{ \
0x467313de, 0x4e30, 0x43f1, { 0x94, 0x3e, 0x32, 0x3f, 0x89, 0x84, 0x5d, 0xb5 } \
}

Definition at line 25 of file BluetoothIo.h.

◆ EFI_BLUETOOTH_IO_SERVICE_BINDING_PROTOCOL_GUID

#define EFI_BLUETOOTH_IO_SERVICE_BINDING_PROTOCOL_GUID
Value:
{ \
0x388278d3, 0x7b85, 0x42f0, { 0xab, 0xa9, 0xfb, 0x4b, 0xfd, 0x69, 0xf5, 0xab } \
}

Definition at line 20 of file BluetoothIo.h.

Typedef Documentation

◆ EFI_BLUETOOTH_IO_ASYNC_FUNC_CALLBACK

typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_ASYNC_FUNC_CALLBACK) (IN UINT16 ChannelID, IN VOID *Data, IN UINTN DataLength, IN VOID *Context)

Callback function, it is called when asynchronous transfer is completed.

Parameters
[in]ChannelIDBluetooth L2CAP message channel ID.
[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 function complete successfully.

Definition at line 174 of file BluetoothIo.h.

◆ EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK

typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK) (IN VOID *Data, IN UINTN DataLength, IN VOID *Context)

Callback function, it is called when asynchronous transfer is completed.

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 function complete successfully.

Definition at line 284 of file BluetoothIo.h.

◆ EFI_BLUETOOTH_IO_GET_DEVICE_INFO

typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_GET_DEVICE_INFO) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, OUT UINTN *DeviceInfoSize, OUT VOID **DeviceInfo)

Get Bluetooth device information.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.
[out]DeviceInfoSizeA pointer to the size, in bytes, of the DeviceInfo buffer.
[out]DeviceInfoA pointer to a callee allocated buffer that returns Bluetooth device information.
Return values
EFI_SUCCESSThe Bluetooth device information is returned successfully.
EFI_DEVICE_ERRORA hardware error occurred trying to retrieve the Bluetooth device information.

Definition at line 78 of file BluetoothIo.h.

◆ EFI_BLUETOOTH_IO_GET_SDP_INFO

typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_GET_SDP_INFO) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, OUT UINTN *SdpInfoSize, OUT VOID **SdpInfo)

Get Bluetooth SDP information.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.
[out]SdpInfoSizeA pointer to the size, in bytes, of the SdpInfo buffer.
[out]SdpInfoA pointer to a callee allocated buffer that returns Bluetooth SDP information.
Return values
EFI_SUCCESSThe Bluetooth device information is returned successfully.
EFI_DEVICE_ERRORA hardware error occurred trying to retrieve the Bluetooth SDP information.

Definition at line 97 of file BluetoothIo.h.

◆ EFI_BLUETOOTH_IO_L2CAP_ASYNC_RECEIVE

typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_ASYNC_RECEIVE) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, IN EFI_HANDLE Handle, IN EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK Callback, IN VOID *Context)

Receive L2CAP message (excluding L2CAP header) in non-blocking way from a specific channel.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.
[in]HandelA handle created by EFI_BLUETOOTH_IO_PROTOCOL.L2CapConnect indicates which channel to receive.
[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 L2CAP asynchronous receive request is submitted successfully.
EFI_NOT_FOUNDHandle is invalid or not found.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE:
  • DataLength is 0.
  • If an asynchronous receive request already exists on same Handle.

Definition at line 309 of file BluetoothIo.h.

◆ EFI_BLUETOOTH_IO_L2CAP_CONNECT

typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_CONNECT) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, OUT EFI_HANDLE *Handle, IN UINT16 Psm, IN UINT16 Mtu, IN EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK Callback, IN VOID *Context)

Do L2CAP connection.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.
[out]HandelA handle to indicate this L2CAP connection.
[in]PsmBluetooth PSM. See Bluetooth specification for detail.
[in]MtuBluetooth MTU. See Bluetooth specification for detail.
[in]CallbackThe callback function. This function is called whenever there is message received in this channel.
[in]ContextData passed into Callback function. This is optional parameter and may be NULL.
Return values
EFI_SUCCESSThe Bluetooth L2CAP layer connection is created successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE:
  • Handle is NULL.
EFI_DEVICE_ERRORA hardware error occurred trying to do Bluetooth L2CAP connection.

Definition at line 335 of file BluetoothIo.h.

◆ EFI_BLUETOOTH_IO_L2CAP_DISCONNECT

typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_DISCONNECT) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, IN EFI_HANDLE Handle)

Do L2CAP disconnection.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.
[in]HandelA handle to indicate this L2CAP connection.
Return values
EFI_SUCCESSThe Bluetooth L2CAP layer is disconnected successfully.
EFI_NOT_FOUNDHandle is invalid or not found.
EFI_DEVICE_ERRORA hardware error occurred trying to do Bluetooth L2CAP disconnection.

Definition at line 357 of file BluetoothIo.h.

◆ EFI_BLUETOOTH_IO_L2CAP_RAW_ASYNC_RECEIVE

typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_RAW_ASYNC_RECEIVE) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, IN BOOLEAN IsNewTransfer, IN UINTN PollingInterval, IN UINTN DataLength, IN EFI_BLUETOOTH_IO_ASYNC_FUNC_CALLBACK Callback, IN VOID *Context)

Receive L2CAP message (including L2CAP header) in non-blocking way.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_IO_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 L2CAP 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.

Definition at line 200 of file BluetoothIo.h.

◆ EFI_BLUETOOTH_IO_L2CAP_RAW_RECEIVE

typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_RAW_RECEIVE) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer, IN UINTN Timeout)

Receive L2CAP message (including L2CAP header).

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.
[in]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 L2CAP layer.
[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 L2CAP message 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 L2CAP message fail due to timeout.
EFI_DEVICE_ERRORReceiving L2CAP message fail due to host controller or device error.

Definition at line 154 of file BluetoothIo.h.

◆ EFI_BLUETOOTH_IO_L2CAP_RAW_SEND

typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_RAW_SEND) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, IN OUT UINTN *BufferSize, IN VOID *Buffer, IN UINTN Timeout)

Send L2CAP message (including L2CAP header).

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_IO_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 L2CAP layer.
[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 L2CAP message 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 L2CAP message fail due to timeout.
EFI_DEVICE_ERRORSending L2CAP message fail due to host controller or device error.

Definition at line 125 of file BluetoothIo.h.

◆ EFI_BLUETOOTH_IO_L2CAP_RECEIVE

typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_RECEIVE) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, IN EFI_HANDLE Handle, OUT UINTN *BufferSize, OUT VOID **Buffer, IN UINTN Timeout)

Receive L2CAP message (excluding L2CAP header) from a specific channel.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.
[in]HandleA handle created by EFI_BLUETOOTH_IO_PROTOCOL.L2CapConnect indicates which channel to receive.
[out]BufferSizeIndicates the size, in bytes, of the data buffer specified by Buffer.
[out]BufferA pointer to the buffer of data that will be received from Bluetooth L2CAP layer.
[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 L2CAP message is received successfully.
EFI_NOT_FOUNDHandle is invalid or not found.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE:
  • BufferSize is NULL.
  • *BufferSize is 0.
  • Buffer is NULL.
EFI_TIMEOUTReceiving L2CAP message fail due to timeout.
EFI_DEVICE_ERRORReceiving L2CAP message fail due to host controller or device error.

Definition at line 264 of file BluetoothIo.h.

◆ EFI_BLUETOOTH_IO_L2CAP_REGISTER_SERVICE

typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_REGISTER_SERVICE) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, OUT EFI_HANDLE *Handle, IN UINT16 Psm, IN UINT16 Mtu, IN EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK Callback, IN VOID *Context)

Register L2CAP callback function for special channel.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.
[out]HandelA handle to indicate this L2CAP connection.
[in]PsmBluetooth PSM. See Bluetooth specification for detail.
[in]MtuBluetooth MTU. See Bluetooth specification for detail.
[in]CallbackThe callback function. This function is called whenever there is message received in this channel. NULL means unregister.
[in]ContextData passed into Callback function. This is optional parameter and may be NULL.
Return values
EFI_SUCCESSThe Bluetooth L2CAP callback function is registered successfully.
EFI_ALREADY_STARTEDThe callback function already exists when register.
EFI_NOT_FOUNDThe callback function does not exist when unregister.

Definition at line 380 of file BluetoothIo.h.

◆ EFI_BLUETOOTH_IO_L2CAP_SEND

typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_IO_L2CAP_SEND) (IN EFI_BLUETOOTH_IO_PROTOCOL *This, IN EFI_HANDLE Handle, IN OUT UINTN *BufferSize, IN VOID *Buffer, IN UINTN Timeout)

Send L2CAP message (excluding L2CAP header) to a specific channel.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_IO_PROTOCOL instance.
[in]HandleA handle created by EFI_BLUETOOTH_IO_PROTOCOL.L2CapConnect indicates which channel to send.
[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 L2CAP layer.
[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 L2CAP message is sent successfully.
EFI_NOT_FOUNDHandle is invalid or not found.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE:
  • BufferSize is NULL.
  • *BufferSize is 0.
  • Buffer is NULL.
EFI_TIMEOUTSending L2CAP message fail due to timeout.
EFI_DEVICE_ERRORSending L2CAP message fail due to host controller or device error.

Definition at line 233 of file BluetoothIo.h.

◆ EFI_BLUETOOTH_IO_PROTOCOL

Definition at line 30 of file BluetoothIo.h.