FreeRTOS: BLE
BLE
Return to main page ↑
bt_hal_manager.h File Reference
#include <stdint.h>
#include "bt_hal_manager_types.h"

Go to the source code of this file.

Data Structures

struct  BTPinCode_t
 Bluetooth PinKey Code, Valid only for BT legacy. More...
 
struct  BTProperty_t
 Bluetooth Adapter Property data structure. More...
 
struct  BTOutOfBandData_t
 Bluetooth Out Of Band data for bonding. More...
 
struct  BTActivityEnergyInfo
 Energy info. More...
 
struct  BTUidTraffic_t
 UUID traffic info. More...
 
struct  BTCallbacks_t
 Bluetooth DM callback structure. More...
 
struct  BTInterface_t
 Represents the standard SAL device management interface. More...
 

Macros

#define btMAJOR_VERSION   5
 Incompatible API changes without backward compatibility.
 
#define btMINOR_VERSION   0
 Add new functionality with backward compatibility.
 
#define btPATCH_VERSION   1
 Make changes in the API with backward compatibility.
 
#define btSTR_HELPER(x, y, z)   # x "." # y "." # z
 Help functions to convert version to string.
 
#define btSTR(x, y, z)   btSTR_HELPER( x, y, z )
 
#define btSTRING_VERSION   btSTR( btMAJOR_VERSION, btMINOR_VERSION, btPATCH_VERSION )
 Stringified version number.
 
#define btBLE_ADD_BLOB_SERVICE_SUPPORTED_BIT   0x0001 /** Support GATT server database decleration as a blob. */
 
#define btBLE_ADD_BLE_DYNAMIC_PRIVACY   0x0002 /** Stack can dynamicall enable or disable privacy. */
 
#define btBLE_BLE_CENTRAL_WHITELISTING   0x0004 /** Provide a mechanism to manage whitelist for Gatt server. */
 

Typedefs

typedef uint8_t BTSecurityLevel_t
 
typedef uint8_t BTAuthReq_t
 
typedef void(* BTDeviceStateChangedCallback_t) (BTState_t xState)
 Bluetooth state change Callback. Invoked on pxEnable/pxDisable. More...
 
typedef void(* BTDevicePropertiesCallback_t) (BTStatus_t xStatus, uint32_t ulNumProperties, BTProperty_t *pxProperties)
 GET/SET local device Properties callback. More...
 
typedef void(* BTRemoteDevicePropertiesCallback_t) (BTStatus_t xStatus, BTBdaddr_t *pxBdAddr, uint32_t ulNumProperties, BTProperty_t *pxProperties)
 GET/SET Remote Device Properties callback. Invoked on pxGetRemoteDeviceProperty, pxSetRemoteDeviceProperty, pxGetAllRemoteDeviceProperties. More...
 
typedef void(* BTPinRequestCallback_t) (BTBdaddr_t *pxRemoteBdAddr, BTBdname_t *pxBdName, uint32_t ulCod, uint8_t ucMin16Digit)
 Callback Invoked on Pin Request. More...
 
typedef void(* BTSspRequestCallback_t) (BTBdaddr_t *pxRemoteBdAddr, BTBdname_t *pxRemoteBdName, uint32_t ulCod, BTSspVariant_t xPairingVariant, uint32_t ulPassKey)
 Callback Invoked on SSP event. More...
 
typedef void(* BTPairingStateChangedCallback_t) (BTStatus_t xStatus, BTBdaddr_t *pxRemoteBdAddr, BTBondState_t xState, BTSecurityLevel_t xSecurityLevel, BTAuthFailureReason_t xReason)
 Bluetooth pairing state changed event callback. Invoked in response to create_bond, cancel_bond or remove_bond reason field is valid only in case of xStatus == eBTStatusFail. Invoked on pairing event. More...
 
typedef void(* BTEnergyInfoCallback_t) (BTActivityEnergyInfo *pxEnergyInfo, BTUidTraffic_t *pxUidData)
 Callback invoked on pxReadEnergyInfo. Invoked on pxReadEnergyInfo. More...
 
typedef void(* BTDutModeRecvCallback_t) (uint16_t usOpcode, uint8_t *pucBuf, size_t xLen)
 Bluetooth Test Mode Callback. Invoked when remote device uses pxDutModeSend. More...
 
typedef void(* BTLeTestModeCallback_t) (BTStatus_t xStatus, uint16_t usNumPackets)
 LE Test mode callbacks. Invoked on pxLeTestMode. More...
 
typedef void(* BTReadRssiCallback_t) (BTBdaddr_t *pxBda, uint32_t ulRssi, BTStatus_t xStatus)
 Read RSSI Callback. Invoked on pxReadRssi. More...
 
typedef void(* BTSlaveSecurityRequestCallBack_t) (BTBdaddr_t *pxBda, BTSecurityLevel_t xSecurityLevel, bool bBonding)
 Security request callback. Invoked on master from remote slave security request event. More...
 
typedef void(* BTTxPowerCallback_t) (BTBdaddr_t *pxBda, BTTransport_t xTransport, uint8_t ucTxPowerValue, BTStatus_t xStatus)
 TX power Callback. Invoked on pxGetTxpower. More...
 
typedef void(* BTBondedCallback_t) (BTStatus_t xStatus, BTBdaddr_t *pxRemoteBdAddr, bool bIsBonded)
 Bonded callback, called when a bonded is established or removed. Invoked on bond event or on pxRemoveBond. More...
 

Enumerations

enum  {
  eBTPropNone = 0x0000, eBTPropBroadcast = 0x0001, eBTPropRead = 0x0002, eBTPropWriteNoResponse = 0x0004,
  eBTPropWrite = 0x0008, eBTPropNotify = 0x0010, eBTPropIndicate = 0x0020, eBTPropSignedWrite = 0x0040,
  eBTPropExtendedProps = 0x0080, eBTSecLevelNoSecurity = 0x01, eBTSecLevelUnauthenticatedPairing = 0x02, eBTSecLevelAuthenticatedPairing = 0x03,
  eBTSecLevelSecureConnect = 0x04
}
 Security Level. More...
 
enum  {
  eBTPermNone = 0x0000, eBTPermRead = 0x0001, eBTPermReadEncrypted = 0x0002, eBTPermReadEncryptedMitm = 0x0004,
  eBTPermWrite = 0x0010, eBTPermWriteEncrypted = 0x0020, eBTPermWriteEncryptedMitm = 0x0040, eBTPermWriteSigned = 0x0080,
  eBTPermWriteSignedMitm = 0x0100, eBTAuthReqBonding = 0x01, eBTAuthReqMitm = 0x03, eBTAuthReqSecureConnect = 0x04,
  eBTAuthReqKeyPress = 0x05
}
 Authentication requirement. More...
 
enum  BTTransport_t { BTTransportAuto, BTTransportBredr, BTTransportLe }
 Preferred physical Transport for GATT connection . More...
 
enum  BTState_t { eBTstateOff, eBTstateOn }
 Bluetooth power State. More...
 
enum  BTAuthFailureReason_t {
  eBTauthSuccess, eBTauthFailLmpRespTimeout, eBTauthFailKeyMissing, eBTauthFailEncrypMode,
  eBTauthFailUnitKey, eBTauthFailSmpCfrmValue, eBTauthFailSmpEnc, eBTauthFailSmpTimeout,
  eBTauthFailPageTimeout, eBTauthFailSmpPasskeyFail, eBTauthFailSmpOobFail, eBTauthFailSmpFail,
  eBTauthFailConnTimeout, eBTauthFailSmp, eBTauthFailSmpPairNotSupport, eBTauthFailSmpUnknownIo,
  eBTauthFailSmpUnknown, eBTauthFailHostRejectSecurity, eBTauthFailInsuffSecurity, eBTauthFailPeerUser,
  eBTauthFailUnspecified
}
 Authentication failure reasons. More...
 
enum  BTPropertyType_t {
  eBTpropertyBdname = 0x1, eBTpropertyBdaddr, eBTpropertyTypeOfDevice, eBTpropertyAdapterBondedDevices,
  eBTpropertyRemoteFriendlyName, eBTpropertyRemoteRssi, eBTpropertyRemoteVersionInfo, eBTpropertyLocalMTUSize,
  eBTpropertyBondable, eBTpropertyIO, eBTpropertyConnectable, eBTpropertySecureConnectionOnly
}
 Bluetooth local device and Remote Device property types. Properties common to both adapter and remote device. More...
 
enum  BTDeviceType_t { eBTdeviceDevtypeBredr = 0x1, eBTdeviceDevtypeBle, eBTdeviceDevtypeDual }
 Bluetooth Device Type. More...
 
enum  BTBondState_t { eBTbondStateNone, eBTbondStateBonding, eBTbondStateBonded }
 
enum  BTSspVariant_t { eBTsspVariantPasskeyConfirmation, eBTsspVariantPasskeyEntry, eBTsspVariantConsent, eBTsspVariantPasskeyNotification }
 Bluetooth SSP Bonding Variant. More...
 

Functions

const BTInterface_tBTGetBluetoothInterface ()