XDK API  3.6.0
Documentation
Data Structures | Macros | Typedefs
BleTypes.h File Reference
#include "BleConfig.h"
+ Include dependency graph for BleTypes.h:

Data Structures

struct  BD_ADDR
 

Macros

#define BLEADDRESS_PUBLIC   0x00
 
#define BLEADDRESS_RANDOM   0x01
 
#define BLECONNROLE_MASTER   0x00
 
#define BLECONNROLE_SLAVE   0x01
 
#define BLEDISCREASON_CONNECTIONTIMEOUT   0x08
 
#define BLEDISCREASON_LL_FAILED_TO_ESTABLISH   0x3E
 
#define BLEDISCREASON_LOCALHOST   0x16
 
#define BLEDISCREASON_REMOTELOWRESOURCES   0x14
 
#define BLEDISCREASON_REMOTEPOWEROFF   0x15
 
#define BLEDISCREASON_REMOTEUSER   0x13
 
#define BLEDISCREASON_UNACCEPTABLECONNECTIONINTERVAL   0x3B
 
#define BLESTATUS_BUSY   0x03
 
#define BLESTATUS_FAILED   0x01
 
#define BLESTATUS_INSUFFICIENT_AUTHENTICATION   0x04
 
#define BLESTATUS_INSUFFICIENT_AUTHORIZATION   0x05
 
#define BLESTATUS_INSUFFICIENT_ENCRYPTION   0x06
 
#define BLESTATUS_INSUFFICIENT_ENCRYPTION_KEY_SIZE   0x07
 
#define BLESTATUS_INVALID_PARMS   0x10
 
#define BLESTATUS_NO_RESOURCES   0x11
 
#define BLESTATUS_NOT_SUPPORTED   0x12
 
#define BLESTATUS_PENDING   0x02
 
#define BLESTATUS_SUCCESS   0x00
 
#define LE_TO_U16(ptr)   (U16)( (U16)(*(ptr)) + (U16) (*(ptr + 1) << 8) )
 

Typedefs

typedef U8 BleAddressType
 
typedef U8 BleConnRole
 
typedef U8 BleDisconnectionReason
 
typedef U8 BleStatus
 
typedef signed short S16
 
typedef signed char S8
 
typedef unsigned short U16
 
typedef unsigned long U32
 
typedef unsigned char U8
 

Macro Definition Documentation

#define BLEADDRESS_PUBLIC   0x00
#define BLEADDRESS_RANDOM   0x01
#define BLECONNROLE_MASTER   0x00
#define BLECONNROLE_SLAVE   0x01
#define BLEDISCREASON_CONNECTIONTIMEOUT   0x08
#define BLEDISCREASON_LL_FAILED_TO_ESTABLISH   0x3E
#define BLEDISCREASON_LOCALHOST   0x16
#define BLEDISCREASON_REMOTELOWRESOURCES   0x14
#define BLEDISCREASON_REMOTEPOWEROFF   0x15
#define BLEDISCREASON_REMOTEUSER   0x13
#define BLEDISCREASON_UNACCEPTABLECONNECTIONINTERVAL   0x3B
#define BLESTATUS_BUSY   0x03
#define BLESTATUS_FAILED   0x01
#define BLESTATUS_INSUFFICIENT_AUTHENTICATION   0x04
#define BLESTATUS_INSUFFICIENT_AUTHORIZATION   0x05
#define BLESTATUS_INSUFFICIENT_ENCRYPTION   0x06
#define BLESTATUS_INSUFFICIENT_ENCRYPTION_KEY_SIZE   0x07
#define BLESTATUS_INVALID_PARMS   0x10
#define BLESTATUS_NO_RESOURCES   0x11
#define BLESTATUS_NOT_SUPPORTED   0x12
#define BLESTATUS_PENDING   0x02
#define BLESTATUS_SUCCESS   0x00
#define LE_TO_U16 (   ptr)    (U16)( (U16)(*(ptr)) + (U16) (*(ptr + 1) << 8) )

LE_TO_U16 This macro convert a LSO First (Less Significant Octets first - Little endian) single byte based and formatted (U8) buffer into a 2 octets unsigned integer. The macro definitions do the same thing: if the input buffer is 0x01 0x02 the output U16 is 0x0201. For a Big-Endian based microprocessor; there is only one choice :

  • Take the first octets and adding a shift of the second octets. For a Little-Endian based microprocessor; there is two choices:
  • Also take the first octets and adding a sift of the second octets.
  • Cast directly the buffer into a U16, It saves some instructions and uses less registers ( generally, three registers are used for addition and shifting, none for direct cast)

ptr is an U8 *

Typedef Documentation

typedef U8 BleAddressType

Definition for the AddressType type The Bluetooth device Address (BD_ADDR) could be a public address (BLEADDRESS_PUBLIC) or a random address (BLEADDRESS_RANDOM)

typedef U8 BleConnRole

Definition for the BleConnRole type

Indicates the connection role of the local device in the connection information could be Master role (BLECONNROLE_MASTER) or Slave role (BLECONNROLE_SLAVE)

Definition for the BleDisconnectionReason type

Indicates the disconnection reason reported during a link layer disconnection. This subset is the most common disconnection error codes received the complete list of possible error code can be found in the Bluetooth Core Specification 4.0 Volume 2 part D: Error Code

typedef U8 BleStatus

Definition for the BleStatus type, representing general status information in the stack

typedef signed short S16

Definition for the S16 type, signed 16-bit size (2 byte)

typedef signed char S8

Definition for the S8 type, signed 8-bit size (1 byte)

typedef unsigned short U16

Definition for the U16 type, unsigned 16-bit size (2 byte)

typedef unsigned long U32

Definition for the U32 type, unsigned 32-bit size (4 byte)

typedef unsigned char U8

Definition for the U8 type, unsigned 8-bit size (1 byte)


All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:41 by doxygen 1.8.8