COMMON IO-BLE v1.0.0
Hardware abstraction layer for Bluetooth
 
Loading...
Searching...
No Matches
bt_hal_gatt_types.h File Reference

T HAL provides the standard defintions used by BT GATT interfaces. More...

#include <stdint.h>
#include <stdbool.h>
#include "bt_hal_manager.h"
#include "bt_hal_manager_types.h"

Go to the source code of this file.

Data Structures

struct  BTGattInstanceId_t
 GATT service instance ID. More...
 
struct  BTGattSrvcId_t
 GATT Service ID. More...
 
struct  BTGattTrackAdvInfo_t
 Structure that contains all advertisements info. Used to compress parameters in BTTrackAdvEventCallback_t. More...
 
struct  BTCharacteristic_t
 Structure describing a characteristic. More...
 
struct  BTCharacteristicDescr_t
 Structure describing a characteristic descriptor. More...
 
struct  BTIncludedService_t
 Structure describing an included service. More...
 
struct  BTAttribute_t
 Generic BLE attribute. More...
 
struct  BTService_t
 Structure describing a service. Note, handles are allocated separately so the attribute array can be allocated in ROM. pxHandlesBuffer has to dimensions: x and y [x][y] . x : Number of copies of the service y : needs to be equal to xNumberOfAttributes. More...
 
struct  BTGattDbElement_t
 BLE GATT Db element. More...
 

Macros

#define btGATT_MAX_ATTR_LEN   600
 

Typedefs

typedef uint16_t BTCharProperties_t
 
typedef uint16_t BTCharPermissions_t
 
typedef BTUuid_t BTServiceUUID_t
 Structure describing a service UUID.
 
typedef void(* BTConnectCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, uint8_t ucClientIf, BTBdaddr_t *pxBda)
 
typedef void(* BTDisconnectCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, uint8_t ucClientIf, BTBdaddr_t *pxBda)
 
typedef void(* BTReadRemoteRssiCallback_t) (uint8_t ucClientIf, BTBdaddr_t *pxBda, uint32_t ulRssi, BTStatus_t xStatus)
 
typedef void(* BTCongestionCallback_t) (uint16_t usConnId, bool bCongested)
 

Enumerations

enum  BTGattStatus_t {
  eBTGattStatusSuccess = 0x00 , eBTInvalidHandle = 0x01 , eBTGattStatusReadNotPermitted = 0x02 , eBTGattStatusWriteNotPermitted = 0x03 ,
  eBTGattStatusInvalidPDU = 0x04 , eBTGattStatusInsufficientAuthentication = 0x05 , eBTGattStatusRequestNotSupported = 0x06 , eBTGattStatusInvalidOffset = 0x07 ,
  eBTGattStatusInsufficientAuthorization = 0x08 , eBTGattStatusPrepareQueueFull = 0x09 , eBTGattStatusAttributeNotFound = 0x0A , eBTGattStatusAttributeNotLong = 0x0B ,
  eBTGattStatusInsufficientKeySize = 0x0C , eBTGattStatusInvalidAttributeLength = 0x0D , eBTGattStatusUnlikelyError = 0x0E , eBTGattStatusInsufficientEncryption = 0x0F ,
  eBTGattStatusUnsupportedGroupType = 0x10 , eBTGattStatusInsufficientResources = 0x11 , eBTGattStatusInternalError = 0x81 , eBTGattStatusError = 0x85 ,
  eBTGattStatusConnectionCongested = 0x8f , eBTGattStatusErrorConnEstFail = 0x93 , eBTGattStatusErrorConnTimeout = 0x94 , eBTGattStatusLocalHostTerminatedConnection = 0x99
}
 GATT Status Codes. More...
 
enum  {
  eBTPropNone = 0x0000 , eBTPropBroadcast = 0x0001 , eBTPropRead = 0x0002 , eBTPropWriteNoResponse = 0x0004 ,
  eBTPropWrite = 0x0008 , eBTPropNotify = 0x0010 , eBTPropIndicate = 0x0020 , eBTPropSignedWrite = 0x0040 ,
  eBTPropExtendedProps = 0x0080
}
 GATT Characteristic property. More...
 
enum  {
  eBTPermNone = 0x0000 , eBTPermRead = 0x0001 , eBTPermReadEncrypted = 0x0002 , eBTPermReadEncryptedMitm = 0x0004 ,
  eBTPermWrite = 0x0010 , eBTPermWriteEncrypted = 0x0020 , eBTPermWriteEncryptedMitm = 0x0040 , eBTPermWriteSigned = 0x0080 ,
  eBTPermWriteSignedMitm = 0x0100
}
 GATT permissions. More...
 
enum  BTAttrWriteRequests_t { eBTWriteTypeNoResponse = 0x0001 , eBTWriteTypeDefault = 0x0002 , eBTWriteTypePrepare = 0x0003 , eBTWriteTypeSigned = 0x0004 }
 Write request type. More...
 
enum  BTGattServiceTypes_t { eBTServiceTypePrimary , eBTServiceTypeSecondary }
 GATT Service types. More...
 
enum  BTDbAttributeType_t {
  eBTDbPrimaryService , eBTDbSecondaryService , eBTDbIncludedService , eBTDbCharacteristicDecl ,
  eBTDbCharacteristic , eBTDbDescriptor
}
 Attribute types. More...
 

Detailed Description

T HAL provides the standard defintions used by BT GATT interfaces.

USAGE

Typedef Documentation

◆ BTCharProperties_t

typedef uint16_t BTCharProperties_t

GATT Characteristic Property.

◆ BTCharPermissions_t

typedef uint16_t BTCharPermissions_t

GATT Permissions.

◆ BTConnectCallback_t

typedef void(* BTConnectCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, uint8_t ucClientIf, BTBdaddr_t *pxBda)

GATT open callback invoked in response to open

◆ BTDisconnectCallback_t

typedef void(* BTDisconnectCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, uint8_t ucClientIf, BTBdaddr_t *pxBda)

Callback invoked in response to close

◆ BTReadRemoteRssiCallback_t

typedef void(* BTReadRemoteRssiCallback_t) (uint8_t ucClientIf, BTBdaddr_t *pxBda, uint32_t ulRssi, BTStatus_t xStatus)

Callback triggered in response to readRemoteRssi

◆ BTCongestionCallback_t

typedef void(* BTCongestionCallback_t) (uint16_t usConnId, bool bCongested)

Callback notifying an application that a remote device connection is currently congested and cannot receive any more data. An application should avoid sending more data until a further callback is received indicating the congestion status has been cleared.