FreeRTOS:
BLE
BLE
|
Return to main page ↑ |
Represents the standard SAL device management interface. More...
#include <bt_hal_manager.h>
Data Fields | |
BTStatus_t(* | pxBtManagerInit )(const BTCallbacks_t *pxCallbacks) |
Initializes the interface and provides callback routines. More... | |
BTStatus_t(* | pxBtManagerCleanup )(void) |
Free up the memory. More... | |
BTStatus_t(* | pxEnable )(uint8_t ucGuestMode) |
Enables Bluetooth module. More... | |
BTStatus_t(* | pxDisable )(void) |
Disables Bluetooth module. More... | |
BTStatus_t(* | pxGetAllDeviceProperties )(void) |
Retrieves all properties of local device. More... | |
BTStatus_t(* | pxGetDeviceProperty )(BTPropertyType_t xType) |
Get Bluetooth Adapter property of 'type'. More... | |
BTStatus_t(* | pxSetDeviceProperty )(const BTProperty_t *pxProperty) |
Sets Bluetooth Adapter property of 'type'.Based on the type, val shall be one of BTBdaddr_t or BTBdname_t or BTScanmode_t etc. More... | |
BTStatus_t(* | pxGetAllRemoteDeviceProperties )(BTBdaddr_t *pxRemoteAddr) |
Retrieves all properties of a remote device. More... | |
BTStatus_t(* | pxGetRemoteDeviceProperty )(BTBdaddr_t *pxRemoteAddr, BTPropertyType_t xType) |
Get Bluetooth property of 'type' associated with a remote device. More... | |
BTStatus_t(* | pxSetRemoteDeviceProperty )(BTBdaddr_t *pxRemoteAddr, const BTProperty_t *pxProperty) |
Sets Bluetooth property of 'type'.Based on the type, to a remote device. More... | |
BTStatus_t(* | pxPair )(const BTBdaddr_t *pxBdAddr, BTTransport_t xTransport, bool bCreateBond) |
Initiates Bluetooth pairing to a remote device. More... | |
BTStatus_t(* | pxCreateBondOutOfBand )(const BTBdaddr_t *pxBdAddr, BTTransport_t xTransport, const BTOutOfBandData_t *pxOobData) |
Sets out of band data for a device for pairing. More... | |
BTStatus_t(* | pxSendSlaveSecurityRequest )(const BTBdaddr_t *pxBdAddr, BTSecurityLevel_t xSecurityLevel, bool bBonding) |
Request authentication from the master. More... | |
BTStatus_t(* | pxCancelBond )(const BTBdaddr_t *pxBdAddr) |
Cancels an on going bonding procedure for the given device. More... | |
BTStatus_t(* | pxRemoveBond )(const BTBdaddr_t *pxBdAddr) |
Removes the bonding with a device. If there is an active connection with the device, connection will be disconnected. More... | |
BTStatus_t(* | pxGetConnectionState )(const BTBdaddr_t *pxBdAddr, bool *bConnectionState) |
Retrieves connection status for a device. More... | |
BTStatus_t(* | pxPinReply )(const BTBdaddr_t *pxBdAddr, uint8_t ucAccept, uint8_t ucPinLen, BTPinCode_t *pxPinCode) |
BT Legacy PinKey Reply. More... | |
BTStatus_t(* | pxSspReply )(const BTBdaddr_t *pxBdAddr, BTSspVariant_t xVariant, uint8_t ucAccept, uint32_t ulPasskey) |
BT SSP Reply - Just Works, Numeric Comparison and Passkey. More... | |
BTStatus_t(* | pxReadEnergyInfo )(void) |
Read Energy info details. More... | |
BTStatus_t(* | pxDutModeConfigure )(bool bEnable) |
BTStatus_t(* | pxDutModeSend )(uint16_t usOpcode, uint8_t *pucBuf, size_t xLen) |
Send any test HCI (vendor-specific) command to the controller. Must be in DUT Mode. More... | |
BTStatus_t(* | pxLeTestMode )(uint16_t usOpcode, uint8_t *pucBuf, size_t xLen) |
Send LE test command (LE_Receiver_Test, LE_Transmitter_Test, LE_Test_End ) command to the controller. More... | |
BTStatus_t(* | pxConfigHCISnoopLog )(bool bEnable) |
Enables/disables capturing of HCI (snoop) logs. More... | |
BTStatus_t(* | pxConfigClear )(void) |
Clears the stack configuration cache. Equivalent to BT layer Factory reset. More... | |
BTStatus_t(* | pxReadRssi )(const BTBdaddr_t *pxBdAddr) |
Retrieves RSSI of a remote device. More... | |
BTStatus_t(* | pxGetTxpower )(const BTBdaddr_t *pxBdAddr, BTTransport_t xTransport) |
Retrieves TX power of a remote device. More... | |
const void *(* | pxGetClassicAdapter )(void) |
Retrieves the Classic interface. More... | |
const void *(* | pxGetLeAdapter )(void) |
Retrieves the HAL LE interface. More... | |
uint32_t(* | pxGetLastError )(void) |
Retrieves last error number from the stack. More... | |
BTStatus_t(* | pxGetStackFeaturesSupport )(uint32_t *pulFeatureMask) |
get stack features supported. More... | |
Represents the standard SAL device management interface.
BTStatus_t( * BTInterface_t::pxBtManagerInit) (const BTCallbacks_t *pxCallbacks) |
Initializes the interface and provides callback routines.
[in] | pxCallbacks | Initializer for common GAP callbacks. |
BTStatus_t( * BTInterface_t::pxBtManagerCleanup) (void) |
Free up the memory.
: Note that similarly to pxBtManagerInit. Memory of adapter of server/client needs to be freed first (by calling pxUnregisterBleApp for example)
BTStatus_t( * BTInterface_t::pxEnable) (uint8_t ucGuestMode) |
Enables Bluetooth module.
Trigger BTDeviceStateChangedCallback_t.
[in] | ucGuestMode | True if Bluetooth needs to be enabled in guest mode else FALSE. |
BTStatus_t( * BTInterface_t::pxDisable) (void) |
Disables Bluetooth module.
Trigger BTDeviceStateChangedCallback_t.
BTStatus_t( * BTInterface_t::pxGetAllDeviceProperties) (void) |
Retrieves all properties of local device.
Triggers BTDevicePropertiesCallback_t.
BTStatus_t( * BTInterface_t::pxGetDeviceProperty) (BTPropertyType_t xType) |
Get Bluetooth Adapter property of 'type'.
Triggers BTDevicePropertiesCallback_t.
[in] | xType | Property type. |
BTStatus_t( * BTInterface_t::pxSetDeviceProperty) (const BTProperty_t *pxProperty) |
Sets Bluetooth Adapter property of 'type'.Based on the type, val shall be one of BTBdaddr_t or BTBdname_t or BTScanmode_t etc.
Triggers BTDevicePropertiesCallback_t.
[in] | pxProperty | Property containing BTProperty_t structure. |
BTStatus_t( * BTInterface_t::pxGetAllRemoteDeviceProperties) (BTBdaddr_t *pxRemoteAddr) |
Retrieves all properties of a remote device.
Triggers BTRemoteDevicePropertiesCallback_t.
[in] | pxRemoteAddr | BT Address of remote device |
BTStatus_t( * BTInterface_t::pxGetRemoteDeviceProperty) (BTBdaddr_t *pxRemoteAddr, BTPropertyType_t xType) |
Get Bluetooth property of 'type' associated with a remote device.
Triggers BTRemoteDevicePropertiesCallback_t.
[in] | pxRemoteAddr | BT Address of remote device. |
[in] | xType | Property type. |
BTStatus_t( * BTInterface_t::pxSetRemoteDeviceProperty) (BTBdaddr_t *pxRemoteAddr, const BTProperty_t *pxProperty) |
Sets Bluetooth property of 'type'.Based on the type, to a remote device.
Triggers BTRemoteDevicePropertiesCallback_t.
[in] | pxRemoteAddr | BT Address of remote device. |
[in] | pxProperty | Property to be set on remote device. |
BTStatus_t( * BTInterface_t::pxPair) (const BTBdaddr_t *pxBdAddr, BTTransport_t xTransport, bool bCreateBond) |
Initiates Bluetooth pairing to a remote device.
Triggers BTPairingStateChangedCallback_t on both central and peripheral.
[in] | pxBdAddr | BT Address of remote device. |
[in] | xTransport | Transport for bonding, one of the enumeration value from BTTransport_t. |
[in] | bCreateBond | set this flag to TRUE if device needs to be bonded. (Remember link authentication information) |
BTStatus_t( * BTInterface_t::pxCreateBondOutOfBand) (const BTBdaddr_t *pxBdAddr, BTTransport_t xTransport, const BTOutOfBandData_t *pxOobData) |
Sets out of band data for a device for pairing.
Triggers BTPairingStateChangedCallback_t.
[in] | pxBdAddr | BT Address of remote device. |
[in] | xTransport | Specify if BLE and BT classic is being used. |
[in] | pxOobData | Out of band data |
BTStatus_t( * BTInterface_t::pxSendSlaveSecurityRequest) (const BTBdaddr_t *pxBdAddr, BTSecurityLevel_t xSecurityLevel, bool bBonding) |
Request authentication from the master.
Triggers BTSlaveSecurityRequestCallBack_t and BTPairingStateChangedCallback_t if request is accepted.
[in] | pxBda | Remote device address. |
[in] | xSecurityLevel | Request security |
[in] | bBonding | True is bonding is requested |
BTStatus_t( * BTInterface_t::pxCancelBond) (const BTBdaddr_t *pxBdAddr) |
Cancels an on going bonding procedure for the given device.
Triggers BTPairingStateChangedCallback_t.
[in] | pxBdAddr | BT Address of device getting bonded. |
BTStatus_t( * BTInterface_t::pxRemoveBond) (const BTBdaddr_t *pxBdAddr) |
Removes the bonding with a device. If there is an active connection with the device, connection will be disconnected.
Will invoke pxBondedCb.
[in] | pxBdAddr | BT Address of device that needs to be unbonded. |
BTStatus_t( * BTInterface_t::pxGetConnectionState) (const BTBdaddr_t *pxBdAddr, bool *bConnectionState) |
Retrieves connection status for a device.
!TODO need an enum for connection state
[in] | pxBdAddr | BT Address of device. |
[in] | bConnectionState | true if connected false if not connected |
BTStatus_t( * BTInterface_t::pxPinReply) (const BTBdaddr_t *pxBdAddr, uint8_t ucAccept, uint8_t ucPinLen, BTPinCode_t *pxPinCode) |
BT Legacy PinKey Reply.
[in] | pxBdAddr | BT Address of device. |
[in] | ucAccept | TRUE is pairing request is accepted, else FALSE. |
[in] | ucPinLen | length of the pin code. |
[in] | pxPinCode | Pin code. |
BTStatus_t( * BTInterface_t::pxSspReply) (const BTBdaddr_t *pxBdAddr, BTSspVariant_t xVariant, uint8_t ucAccept, uint32_t ulPasskey) |
BT SSP Reply - Just Works, Numeric Comparison and Passkey.
[in] | pxBdAddr | BT Address of device. |
[in] | xVariant | Pairing variant. |
[in] | ucAccept | TRUE is pairing request is accepted, else FALSE. When accept = FALSE,passkey shall be zero |
[in] | ulPasskey | : passkey valid only when variant is BTSspVariantPasskeyEntry and BTSspVariantPasskeyNotification |
BTStatus_t( * BTInterface_t::pxReadEnergyInfo) (void) |
Read Energy info details.
Triggers BTEnergyInfoCallback_t.
BTStatus_t( * BTInterface_t::pxDutModeConfigure) (bool bEnable) |
Enables/disables local device to DUT mode.
[in] | bEnable | TRUE if DUT mode needs to be enabled, else FALSE. |
BTStatus_t( * BTInterface_t::pxDutModeSend) (uint16_t usOpcode, uint8_t *pucBuf, size_t xLen) |
Send any test HCI (vendor-specific) command to the controller. Must be in DUT Mode.
Triggers BTDutModeRecvCallback_t on remote device.
[in] | usOpcode | HCI VSC opcode. |
[in] | pucBuf | Parameters associated with the command represented in byte buffer. |
[in] | xLen | Total length of parameter buffer. |
BTStatus_t( * BTInterface_t::pxLeTestMode) (uint16_t usOpcode, uint8_t *pucBuf, size_t xLen) |
Send LE test command (LE_Receiver_Test, LE_Transmitter_Test, LE_Test_End ) command to the controller.
Triggers BTLeTestModeCallback_t.
[in] | usOpcode,LE | test VSC opcode. |
[in] | pucBuf | Parameters associated with the command represented in byte buffer. |
[in] | xLen | Total length of parameter buffer. |
BTStatus_t( * BTInterface_t::pxConfigHCISnoopLog) (bool bEnable) |
Enables/disables capturing of HCI (snoop) logs.
[in] | bEnable | TRUE if snoop logs needs to be enabled, else FALSE |
BTStatus_t( * BTInterface_t::pxConfigClear) (void) |
Clears the stack configuration cache. Equivalent to BT layer Factory reset.
BTStatus_t( * BTInterface_t::pxReadRssi) (const BTBdaddr_t *pxBdAddr) |
Retrieves RSSI of a remote device.
Triggers BTReadRssiCallback_t.
[in] | pxBdAddr | BT Address of remote device |
BTStatus_t( * BTInterface_t::pxGetTxpower) (const BTBdaddr_t *pxBdAddr, BTTransport_t xTransport) |
Retrieves TX power of a remote device.
Triggers BTTxPowerCallback_t.
[in] | pxBdAddr | BT Address of remote device. |
[in] | xTransport | LE / Classic. |
const void*( * BTInterface_t::pxGetClassicAdapter) (void) |
Retrieves the Classic interface.
const void*( * BTInterface_t::pxGetLeAdapter) (void) |
Retrieves the HAL LE interface.
uint32_t( * BTInterface_t::pxGetLastError) (void) |
Retrieves last error number from the stack.
BTStatus_t( * BTInterface_t::pxGetStackFeaturesSupport) (uint32_t *pulFeatureMask) |
get stack features supported.
[out] | pulFeatureMask | feature mask |