X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/8cdb141eed000c7a40782820a63544513e682afe..f64e3db07ac167bf0b64bf429a53721f1848e91d:/Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.h?ds=inline diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.h b/Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.h index bf79c531e..9103dce63 100644 --- a/Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.h +++ b/Demos/Host/Incomplete/BluetoothHost/Lib/ServiceDiscoveryProtocol.h @@ -59,12 +59,7 @@ #define SDP_ATTRIBUTE_ID_LANGIDOFFSET 0x0006 #define SDP_ATTRIBUTE_ID_AVAILABILITY 0x0008 #define SDP_ATTRIBUTE_ID_VERSION 0x0200 - #define SDP_ATTRIBUTE_ID_NAME (0x0000 + SDP_ATTRIBUTE_LANGOFFSET) - #define SDP_ATTRIBUTE_ID_DESCRIPTION (0x0001 + SDP_ATTRIBUTE_LANGOFFSET) - /** Attribute ID offset for localised language string attributes. */ - #define SDP_ATTRIBUTE_LANGOFFSET 0x0100 - /** Size of a full 128 bit UUID, in bytes. */ #define UUID_SIZE_BYTES 16 @@ -138,10 +133,17 @@ /** Structure for a list of Data Elements containing UUIDs, for service attributes requiring UUID lists. */ typedef struct { - uint8_t Header; /**< Data Element header, should be (SDP_DATATYPE_Sequence | SDP_DATASIZE_Variable16Bit) */ - uint16_t UUID[UUID_SIZE_BYTES]; /**< UUID to store in the list Data Element */ + uint8_t Header; /**< Data Element header, should be (SDP_DATATYPE_UUID | SDP_DATASIZE_128Bit) */ + uint8_t UUID[UUID_SIZE_BYTES]; /**< UUID to store in the list Data Element */ } ClassUUID_t; + /** Structure for a list of Data Elements containing Version Numbers, for service attributes requiring Version lists. */ + typedef struct + { + uint8_t Header; /**< Data Element header, should be (SDP_DATATYPE_UnsignedInt | SDP_DATASIZE_16Bit) */ + uint16_t Version; /**< Version number to store in the list Data Element */ + } Version_t; + /* Inline Functions: */ /** Adds a new Data Element container of the given type with a 16-bit size header to the buffer. The * buffer pointer's position is advanced past the added header once the element has been added. The @@ -180,7 +182,7 @@ static ServiceAttributeTable_t* SDP_GetAttributeTable(const uint8_t* const UUID); static uint8_t SDP_GetAttributeList(uint16_t AttributeList[][2], const void** const CurrentParameter); static uint8_t SDP_GetUUIDList(uint8_t UUIDList[][UUID_SIZE_BYTES], const void** const CurrentParameter); - static uint32_t SDP_GetLocalAttributeContainerSize(const void* const AttributeData); + static uint32_t SDP_GetLocalAttributeContainerSize(const void* const AttributeData, uint8_t* const HeaderSize); static uint32_t SDP_GetDataElementSize(const void** const AttributeHeader, uint8_t* const ElementHeaderSize); #endif