SmartSnippets DA1459x SDK
ble_uuid.h
Go to the documentation of this file.
1 
39 #ifndef BLE_UUID_H_
40 #define BLE_UUID_H_
41 
42 #include "ble_att.h"
43 
44 /* Services UUIDs */
45 #define UUID_SERVICE_GAS (0x1800) // Generic Access Service
46 #define UUID_SERVICE_GATT (0x1801) // Generic Attribute
47 #define UUID_SERVICE_IAS (0x1802) // Immediate Alert Service
48 #define UUID_SERVICE_LLS (0x1803) // Link Loss Service
49 #define UUID_SERVICE_TPS (0x1804) // Tx Power Service
50 #define UUID_SERVICE_CTS (0x1805) // Current Time Service
51 #define UUID_SERVICE_RTUS (0x1806) // Reference Time Update Service
52 #define UUID_SERVICE_NDCS (0x1807) // Next DST Change Service
53 #define UUID_SERVICE_GLS (0x1808) // Glucose Service
54 #define UUID_SERVICE_HTS (0x1809) // Health Thermometer Service
55 #define UUID_SERVICE_DIS (0x180A) // Device Information Service
56 #define UUID_SERVICE_HRS (0x180D) // Heart Rate Service
57 #define UUID_SERVICE_PASS (0x180E) // Phone Alert Status Service
58 #define UUID_SERVICE_BAS (0x180F) // Battery Service
59 #define UUID_SERVICE_BLS (0x1810) // Blood Pressure Service
60 #define UUID_SERVICE_AND (0x1811) // Alert Notification Service
61 #define UUID_SERVICE_HIDS (0x1812) // Human Interface Device Service
62 #define UUID_SERVICE_SCPS (0x1813) // Scan Parameters Service
63 #define UUID_SERVICE_RSCS (0x1814) // Running Speed and Cadence Service
64 #define UUID_SERVICE_CSCS (0x1816) // Cycling Speed and Cadence Service
65 #define UUID_SERVICE_CPS (0x1818) // Cycling Power Service
66 #define UUID_SERVICE_LNS (0x1819) // Location and Navigation Service
67 #define UUID_SERVICE_ESS (0x181A) // Environmental Sensing Service
68 #define UUID_SERVICE_BCS (0x181B) // Body Composition Service
69 #define UUID_SERVICE_UDS (0x181C) // User Data Service
70 #define UUID_SERVICE_WSS (0x181D) // Weight Scale Service
71 #define UUID_SERVICE_BMS (0x181E) // Bond Management Service
72 #define UUID_SERVICE_CGMS (0x181F) // Continuous Glucose Monitoring Service
73 #define UUID_SERVICE_IPSS (0x1820) // Internet Protocol Support Service
74 #define UUID_SERVICE_IPS (0x1821) // Indoor Positioning Service
75 
76 /* GATT UUIDs */
77 #define UUID_GATT_PRIMARY_SERVICE (0x2800)
78 #define UUID_GATT_SECONDARY_SERVICE (0x2801)
79 #define UUID_GATT_INCLUDE (0x2802)
80 #define UUID_GATT_CHARACTERISTIC (0x2803)
81 
82 /* GATT descriptors UUIDs */
83 #define UUID_GATT_CHAR_EXT_PROPERTIES (0x2900)
84 #define UUID_GATT_CHAR_USER_DESCRIPTION (0x2901)
85 #define UUID_GATT_CLIENT_CHAR_CONFIGURATION (0x2902)
86 #define UUID_GATT_SERVER_CHAR_CONFIGURATION (0x2903)
87 #define UUID_GATT_CHAR_PRESENTATION_FORMAT (0x2904)
88 #define UUID_GATT_CHAR_AGGREGATE_FORMAT (0x2905)
89 
97 void ble_uuid_create16(uint16_t uuid16, att_uuid_t *uuid);
98 
109 void ble_uuid_from_buf(const uint8_t *buf, att_uuid_t *uuid);
110 
124 bool ble_uuid_from_string(const char *str, att_uuid_t *uuid);
125 
137 const char *ble_uuid_to_string(const att_uuid_t *uuid);
138 
148 bool ble_uuid_equal(const att_uuid_t *uuid1, const att_uuid_t *uuid2);
149 
150 #endif /* BLE_UUID_H_ */
151 
ble_uuid_to_string
const char * ble_uuid_to_string(const att_uuid_t *uuid)
Convert UUID to string.
ble_uuid_equal
bool ble_uuid_equal(const att_uuid_t *uuid1, const att_uuid_t *uuid2)
Check if two UUIDs are equal.
ble_uuid_create16
void ble_uuid_create16(uint16_t uuid16, att_uuid_t *uuid)
Create 16-bit UUID from integer value.
ble_uuid_from_string
bool ble_uuid_from_string(const char *str, att_uuid_t *uuid)
Create UUID from string.
ble_uuid_from_buf
void ble_uuid_from_buf(const uint8_t *buf, att_uuid_t *uuid)
Create UUID from buffer.
ble_att.h
Attribute protocol API.