Skip to content

Commit 3155996

Browse files
author
Rohit Grover
committed
move constants for appearance and UUIDs into blecommon.h
1 parent e88e3ba commit 3155996

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

common/blecommon.h

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,92 @@ extern "C" {
2828

2929
#include <stdint.h>
3030

31+
/** @defgroup BLE_UUID_VALUES Assigned Values for BLE UUIDs
32+
* @{ */
33+
/* Generic UUIDs, applicable to all services */
34+
enum {
35+
BLE_UUID_UNKNOWN = 0x0000, /**< Reserved UUID. */
36+
BLE_UUID_SERVICE_PRIMARY = 0x2800, /**< Primary Service. */
37+
BLE_UUID_SERVICE_SECONDARY = 0x2801, /**< Secondary Service. */
38+
BLE_UUID_SERVICE_INCLUDE = 0x2802, /**< Include. */
39+
BLE_UUID_CHARACTERISTIC = 0x2803, /**< Characteristic. */
40+
BLE_UUID_DESCRIPTOR_CHAR_EXT_PROP = 0x2900, /**< Characteristic Extended Properties Descriptor. */
41+
BLE_UUID_DESCRIPTOR_CHAR_USER_DESC = 0x2901, /**< Characteristic User Description Descriptor. */
42+
BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG = 0x2902, /**< Client Characteristic Configuration Descriptor. */
43+
BLE_UUID_DESCRIPTOR_SERVER_CHAR_CONFIG = 0x2903, /**< Server Characteristic Configuration Descriptor. */
44+
BLE_UUID_DESCRIPTOR_CHAR_PRESENTATION_FORMAT = 0x2904, /**< Characteristic Presentation Format Descriptor. */
45+
BLE_UUID_DESCRIPTOR_CHAR_AGGREGATE_FORMAT = 0x2905, /**< Characteristic Aggregate Format Descriptor. */
46+
47+
/* GATT specific UUIDs */
48+
BLE_UUID_GATT = 0x1801, /**< Generic Attribute Profile. */
49+
BLE_UUID_GATT_CHARACTERISTIC_SERVICE_CHANGED = 0x2A05, /**< Service Changed Characteristic. */
50+
51+
/* GAP specific UUIDs */
52+
BLE_UUID_GAP = 0x1800, /**< Generic Access Profile. */
53+
BLE_UUID_GAP_CHARACTERISTIC_DEVICE_NAME = 0x2A00, /**< Device Name Characteristic. */
54+
BLE_UUID_GAP_CHARACTERISTIC_APPEARANCE = 0x2A01, /**< Appearance Characteristic. */
55+
BLE_UUID_GAP_CHARACTERISTIC_PPF = 0x2A02, /**< Peripheral Privacy Flag Characteristic. */
56+
BLE_UUID_GAP_CHARACTERISTIC_RECONN_ADDR = 0x2A03, /**< Reconnection Address Characteristic. */
57+
BLE_UUID_GAP_CHARACTERISTIC_PPCP = 0x2A04, /**< Peripheral Preferred Connection Parameters Characteristic. */
58+
};
59+
/** @} */
60+
61+
/** @defgroup BLE_APPEARANCES Bluetooth Appearance values
62+
* @note Retrieved from http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.gap.appearance.xml
63+
* @{ */
64+
enum {
65+
BLE_APPEARANCE_UNKNOWN = 0, /**< Unknown. */
66+
BLE_APPEARANCE_GENERIC_PHONE = 64, /**< Generic Phone. */
67+
BLE_APPEARANCE_GENERIC_COMPUTER = 128, /**< Generic Computer. */
68+
BLE_APPEARANCE_GENERIC_WATCH = 192, /**< Generic Watch. */
69+
BLE_APPEARANCE_WATCH_SPORTS_WATCH = 193, /**< Watch: Sports Watch. */
70+
BLE_APPEARANCE_GENERIC_CLOCK = 256, /**< Generic Clock. */
71+
BLE_APPEARANCE_GENERIC_DISPLAY = 320, /**< Generic Display. */
72+
BLE_APPEARANCE_GENERIC_REMOTE_CONTROL = 384, /**< Generic Remote Control. */
73+
BLE_APPEARANCE_GENERIC_EYE_GLASSES = 448, /**< Generic Eye-glasses. */
74+
BLE_APPEARANCE_GENERIC_TAG = 512, /**< Generic Tag. */
75+
BLE_APPEARANCE_GENERIC_KEYRING = 576, /**< Generic Keyring. */
76+
BLE_APPEARANCE_GENERIC_MEDIA_PLAYER = 640, /**< Generic Media Player. */
77+
BLE_APPEARANCE_GENERIC_BARCODE_SCANNER = 704, /**< Generic Barcode Scanner. */
78+
BLE_APPEARANCE_GENERIC_THERMOMETER = 768, /**< Generic Thermometer. */
79+
BLE_APPEARANCE_THERMOMETER_EAR = 769, /**< Thermometer: Ear. */
80+
BLE_APPEARANCE_GENERIC_HEART_RATE_SENSOR = 832, /**< Generic Heart rate Sensor. */
81+
BLE_APPEARANCE_HEART_RATE_SENSOR_HEART_RATE_BELT = 833, /**< Heart Rate Sensor: Heart Rate Belt. */
82+
BLE_APPEARANCE_GENERIC_BLOOD_PRESSURE = 896, /**< Generic Blood Pressure. */
83+
BLE_APPEARANCE_BLOOD_PRESSURE_ARM = 897, /**< Blood Pressure: Arm. */
84+
BLE_APPEARANCE_BLOOD_PRESSURE_WRIST = 898, /**< Blood Pressure: Wrist. */
85+
BLE_APPEARANCE_GENERIC_HID = 960, /**< Human Interface Device (HID). */
86+
BLE_APPEARANCE_HID_KEYBOARD = 961, /**< Keyboard (HID Subtype). */
87+
BLE_APPEARANCE_HID_MOUSE = 962, /**< Mouse (HID Subtype). */
88+
BLE_APPEARANCE_HID_JOYSTICK = 963, /**< Joystiq (HID Subtype). */
89+
BLE_APPEARANCE_HID_GAMEPAD = 964, /**< Gamepad (HID Subtype). */
90+
BLE_APPEARANCE_HID_DIGITIZERSUBTYPE = 965, /**< Digitizer Tablet (HID Subtype). */
91+
BLE_APPEARANCE_HID_CARD_READER = 966, /**< Card Reader (HID Subtype). */
92+
BLE_APPEARANCE_HID_DIGITAL_PEN = 967, /**< Digital Pen (HID Subtype). */
93+
BLE_APPEARANCE_HID_BARCODE = 968, /**< Barcode Scanner (HID Subtype). */
94+
BLE_APPEARANCE_GENERIC_GLUCOSE_METER = 1024, /**< Generic Glucose Meter. */
95+
BLE_APPEARANCE_GENERIC_RUNNING_WALKING_SENSOR = 1088, /**< Generic Running Walking Sensor. */
96+
BLE_APPEARANCE_RUNNING_WALKING_SENSOR_IN_SHOE = 1089, /**< Running Walking Sensor: In-Shoe. */
97+
BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_SHOE = 1090, /**< Running Walking Sensor: On-Shoe. */
98+
BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_HIP = 1091, /**< Running Walking Sensor: On-Hip. */
99+
BLE_APPEARANCE_GENERIC_CYCLING = 1152, /**< Generic Cycling. */
100+
BLE_APPEARANCE_CYCLING_CYCLING_COMPUTER = 1153, /**< Cycling: Cycling Computer. */
101+
BLE_APPEARANCE_CYCLING_SPEED_SENSOR = 1154, /**< Cycling: Speed Sensor. */
102+
BLE_APPEARANCE_CYCLING_CADENCE_SENSOR = 1155, /**< Cycling: Cadence Sensor. */
103+
BLE_APPEARANCE_CYCLING_POWER_SENSOR = 1156, /**< Cycling: Power Sensor. */
104+
BLE_APPEARANCE_CYCLING_SPEED_CADENCE_SENSOR = 1157, /**< Cycling: Speed and Cadence Sensor. */
105+
BLE_APPEARANCE_GENERIC_PULSE_OXIMETER = 3136, /**< Generic Pulse Oximeter. */
106+
BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP = 3137, /**< Fingertip (Pulse Oximeter subtype). */
107+
BLE_APPEARANCE_PULSE_OXIMETER_WRIST_WORN = 3138, /**< Wrist Worn(Pulse Oximeter subtype). */
108+
BLE_APPEARANCE_GENERIC_WEIGHT_SCALE = 3200, /**< Generic Weight Scale. */
109+
BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS_ACT = 5184, /**< Generic Outdoor Sports Activity. */
110+
BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_DISP = 5185, /**< Location Display Device (Outdoor Sports Activity subtype). */
111+
BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_DISP = 5186, /**< Location and Navigation Display Device (Outdoor Sports Activity subtype). */
112+
BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_POD = 5187, /**< Location Pod (Outdoor Sports Activity subtype). */
113+
BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_POD = 5188, /**< Location and Navigation Pod (Outdoor Sports Activity subtype). */
114+
};
115+
/** @} */
116+
31117
/**************************************************************************/
32118
/*!
33119
\brief Error codes for the BLE API

0 commit comments

Comments
 (0)