| BlueNRG-1 ACI APIs and events callbacks

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

bluenrg1_gatt_server.h
Go to the documentation of this file.
1
21 #ifndef __GATT_SERVER_H__
22 #define __GATT_SERVER_H__
23
24 #include "compiler.h"
25 #include "ble_status.h"
26
37 #define PRIMARY_SERVICE_UUID (0x2800)
38 #define SECONDARY_SERVICE_UUID (0x2801)
39 #define INCLUDE_SERVICE_UUID (0x2802)
40 #define CHARACTERISTIC_UUID (0x2803)
41 #define CHAR_EXTENDED_PROP_DESC_UUID (0x2900)
42 #define CHAR_USER_DESC_UUID (0x2901)
43 #define CHAR_CLIENT_CONFIG_DESC_UUID (0x2902)
44 #define CHAR_SERVER_CONFIG_DESC_UUID (0x2903)
45 #define CHAR_FORMAT_DESC_UUID (0x2904)
46 #define CHAR_AGGR_FMT_DESC_UUID (0x2905)
47 #define GATT_SERVICE_UUID (0x1801)
48 #define GAP_SERVICE_UUID (0x1800)
49 #define SERVICE_CHANGED_UUID (0x2A05)
50
60 #define ATTR_NO_ACCESS (0x00)
61 #define ATTR_ACCESS_READ_ONLY (0x01)
62 #define ATTR_ACCESS_WRITE_REQ_ONLY (0x02)
63 #define ATTR_ACCESS_READ_WRITE (0x03)
64 #define ATTR_ACCESS_WRITE_WITHOUT_RESPONSE (0x04)
65 #define ATTR_ACCESS_SIGNED_WRITE_ALLOWED (0x08)
66
69 #define ATTR_ACCESS_WRITE_ANY (0x0E)
70
79 #define CHAR_PROP_BROADCAST (0x01)
80 #define CHAR_PROP_READ (0x02)
81 #define CHAR_PROP_WRITE_WITHOUT_RESP (0x04)
82 #define CHAR_PROP_WRITE (0x08)
83 #define CHAR_PROP_NOTIFY (0x10)
84 #define CHAR_PROP_INDICATE (0x20)
85 #define CHAR_PROP_SIGNED_WRITE (0x40)
86 #define CHAR_PROP_EXT (0x80)
87
97 #define ATTR_PERMISSION_NONE (0x00)
98 #define ATTR_PERMISSION_AUTHEN_READ (0x01)
99 #define ATTR_PERMISSION_AUTHOR_READ (0x02)
100 #define ATTR_PERMISSION_ENCRY_READ (0x04)
101 #define ATTR_PERMISSION_AUTHEN_WRITE (0x08)
102 #define ATTR_PERMISSION_AUTHOR_WRITE (0x10)
103 #define ATTR_PERMISSION_ENCRY_WRITE (0x20)
113 #define UUID_TYPE_16 (0x01)
114 #define UUID_TYPE_128 (0x02)
115
124 #define PRIMARY_SERVICE (0x01)
125 #define SECONDARY_SERVICE (0x02)
126
136 #define GATT_DONT_NOTIFY_EVENTS (0x00)
137 #define GATT_NOTIFY_ATTRIBUTE_WRITE (0x01)
139 #define GATT_NOTIFY_WRITE_REQ_AND_WAIT_FOR_APPL_RESP (0x02)
142 #define GATT_NOTIFY_READ_REQ_AND_WAIT_FOR_APPL_RESP (0x04)
153 #define CHAR_VALUE_LEN_CONSTANT (0x00)
154 #define CHAR_VALUE_LEN_VARIABLE (0x01)
155
167 #define MIN_ENCRY_KEY_SIZE (7)
168
172 #define MAX_ENCRY_KEY_SIZE (0x10)
173
181 typedef PACKED(struct) _charactFormat {
182 uint8_t format;
183 int8_t exp;
184 uint16_t unit;
185 uint8_t name_space;
186 uint16_t desc;
187 } charactFormat;
188
197 #define FORMAT_UINT8 0x04
198 #define FORMAT_UINT16 0x06
199 #define FORMAT_SINT16 0x0E
200 #define FORMAT_SINT24 0x0F
201
209 #define UNIT_UNITLESS 0x2700
210 #define UNIT_TEMP_CELSIUS 0x272F
211 #define UNIT_PRESSURE_BAR 0x2780
212
220 #define ATT_MTU (23)
221
228 #endif /* __GATT_SERVER_H__ */
charactFormat
charactFormat
Definition: bluenrg1_gatt_server.h:191
ble_status.h
Header file for BLE Stack status codes.
PACKED
typedef PACKED(struct) _charactFormat
Definition: bluenrg1_gatt_server.h:185