/** Size of a full 128 bit UUID, in bytes. */\r
#define UUID_SIZE_BYTES 16\r
\r
- /** First 96 bits common to all standardized Bluetooth services. */\r
- #define BASE_96BIT_UUID 0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00\r
+ /** First 80 bits common to all standardized Bluetooth services. */\r
+ #define BASE_80BIT_UUID SWAPENDIAN_32(0xFB349B5F), SWAPENDIAN_16(0x8000), SWAPENDIAN_16(0x0080), SWAPENDIAN_16(0x0010)\r
\r
#define SDP_ATTRIBUTE_ID_SERVICERECORDHANDLE 0x0000\r
#define SDP_ATTRIBUTE_ID_SERVICECLASSIDS 0x0001\r
#define SERVICE_ATTRIBUTE_TABLE_TERMINATOR {.Data = NULL}\r
\r
/* Type Defines: */\r
+ typedef struct\r
+ {\r
+ uint32_t A;\r
+ uint16_t B;\r
+ uint16_t C;\r
+ uint16_t D;\r
+ uint8_t E[6];\r
+ } UUID_t;\r
+ \r
/** Structure for the association of attribute ID values to an attribute value in FLASH. A table of these\r
* structures can then be built up for each supported UUID service within the device.\r
*/\r
*/\r
typedef struct\r
{\r
- uint8_t UUID[UUID_SIZE_BYTES]; /**< UUID of a service supported by the device */\r
+ UUID_t UUID; /**< UUID of a service supported by the device */\r
const void* AttributeTable; /**< Pointer to the UUID's attribute table, located in PROGMEM memory space */\r
} ServiceTable_t;\r
\r
typedef struct\r
{\r
uint8_t Header; /**< Data Element header, should be (SDP_DATATYPE_UUID | SDP_DATASIZE_128Bit) */\r
- uint8_t UUID[UUID_SIZE_BYTES]; /**< UUID to store in the list Data Element */\r
- } ClassUUID_t;\r
+ UUID_t UUID; /**< UUID to store in the list Data Element */\r
+ } ItemUUID_t;\r
\r
/** Structure for a list of Data Elements containing 8-bit integers, for service attributes requiring such lists. */\r
typedef struct\r
{\r
- uint8_t Header; /**< Data Element header, should be (SDP_DATATYPE_UnsignedInt | SDP_DATASIZE_8Bit) */\r
+ uint8_t Header; /**< Data Element header, should be (SDP_DATATYPE_UnsignedInt | SDP_DATASIZE_8Bit) */\r
uint8_t Value; /**< Value to store in the list Data Element */\r
} Item8Bit_t;\r
\r