summaryrefslogtreecommitdiff
path: root/shared-module/_bleio/Characteristic.h
diff options
context:
space:
mode:
Diffstat (limited to 'shared-module/_bleio/Characteristic.h')
-rw-r--r--shared-module/_bleio/Characteristic.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/shared-module/_bleio/Characteristic.h b/shared-module/_bleio/Characteristic.h
index 409a57c76..7776b1fa5 100644
--- a/shared-module/_bleio/Characteristic.h
+++ b/shared-module/_bleio/Characteristic.h
@@ -27,6 +27,9 @@
#ifndef MICROPY_INCLUDED_SHARED_MODULE_BLEIO_CHARACTERISTIC_H
#define MICROPY_INCLUDED_SHARED_MODULE_BLEIO_CHARACTERISTIC_H
+// These are not the Bluetooth spec values. They are what is used by the Nordic SoftDevice.
+// The bit values are in different positions.
+
typedef enum {
CHAR_PROP_NONE = 0,
CHAR_PROP_BROADCAST = 1u << 0,
@@ -40,4 +43,14 @@ typedef enum {
} bleio_characteristic_properties_enum_t;
typedef uint8_t bleio_characteristic_properties_t;
+// Bluetooth spec property values
+#define BT_GATT_CHRC_BROADCAST 0x01
+#define BT_GATT_CHRC_READ 0x02
+#define BT_GATT_CHRC_WRITE_WITHOUT_RESP 0x04
+#define BT_GATT_CHRC_WRITE 0x08
+#define BT_GATT_CHRC_NOTIFY 0x10
+#define BT_GATT_CHRC_INDICATE 0x20
+#define BT_GATT_CHRC_AUTH 0x40
+#define BT_GATT_CHRC_EXT_PROP 0x80
+
#endif // MICROPY_INCLUDED_SHARED_MODULE_BLEIO_CHARACTERISTIC_H